-
Bug
-
Resolution: Fixed
-
P4
-
1.4.1
-
mantis
-
generic, x86
-
linux, solaris
-
Verified
Name: elR10090 Date: 04/25/2002
J2SE 1.4.1-b10 crashes with the following asertion:
##
## HotSpot Virtual Machine Error, assertion failure
## Please report this error at
## http://java.sun.com/cgi-bin/bugreport.cgi
##
## Java VM: Java HotSpot(TM) Server VM (1.4.1-beta-b10-debug mixed mode)
##
## assert(map()->req() <= jvms()->endoff(), "no extra garbage on map")
##
## Error ID: /BUILD_AREA/jdk1.4.1/hotspot/src/share/vm/opto/graphKit.cpp, 98
##
## Problematic Thread: prio=1 tid=0x0x80cd060 nid=0x6ee runnable
##
#Current thread is 0x2009
#Dumping core ...
Such crash is observed against Server VM: Linux/x86, Solaris/x86
and Solaris/SPARC/32-bit, and at 64-bit Solaris for SPARC/v9.
To reproduce this crash, use the following testcase:
javac b4510834.java
java_g -server b4510834
Here is the testcase sources:
import java.io.*;
public class b4510834 {
private int WAITTIME = 2; // minutes
private int THREADS = 50;
public static void main(String args[]) {
new b4510834().run(args);
}
private void run(String args[]) {
for (int i=0; i<args.length; i++)
if (args[i].toLowerCase().startsWith("-waittime="))
WAITTIME = Integer.parseInt(args[i].substring(10));
else if (!args[i].startsWith("-"))
THREADS = Integer.parseInt(args[i]);
else
throw new IllegalArgumentException(
"unknown keyword: " + args[i]);
buzz = new Buzz [ THREADS ];
for (int t=0; t<buzz.length; t++) {
buzz[t] = new Buzz();
buzz[t].setDaemon(true);
buzz[t].start();
};
Guard guard = new Guard();
guard.setDaemon(true);
guard.start();
new PressBuzz().start();
try {
synchronized (buzz) {
buzz.wait();
}
} catch (InterruptedException exception) {
error("# run(args[]): " + exception);
}
}
private class PressBuzz extends Thread {
public void run() {
synchronized (buzz) {
buzz.notify();
};
for (int t=0; t<buzz.length; t++)
buzz[t].suspend();
}
}
private Buzz buzz[] = null;
private class Buzz extends Thread {
public void run() {
while (true)
yield();
}
}
private class Guard extends Thread {
public void run() {
try {
sleep(WAITTIME * 60000L);
} catch (InterruptedException exception) {
error("# Guard.run(): " + exception);
};
error("TEST FAILED: time exceeded (" + WAITTIME + " min)");
}
}
private synchronized void error(String message) {
System.out.println(message);
Runtime.getRuntime().halt(1);
}
}
This test tries to provoke a race between jni->DestroyJavaVM()
(implicitely invoked by finishing the main thread) and thread
suspend efforts - in order to reproduce the bug:
4510834 JNI DestroyJavaVM/VMThread/sampler thread race hangs VM
The test will appear with the next "r14" release of the testbase_nsk;
its full name would be:
nsk/regression/b4510834
The crash reported here looks similar (but not identical)
to the crashes reported by the bugs:
4614060 api.java.lang.ThreadGroup.enumerate0203 fails in solaris platform in -Xmixed
4426707 runThese crashes in 64Bit mode with assertion at parse1.cpp, 1472
======================================================================
- relates to
-
JDK-4614060 api.java.lang.ThreadGroup.enumerate0203 fails in solaris platform in -Xmixed
- Closed