Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2138697 | 6 | Robert Field | P2 | Resolved | Fixed | b87 |
Hi,
the Hotspot crashes when a JVMTI agent tries to get all loaded classes
triggered by a thread stop event and that dying thread has an async
exception pending. You can reproduce the problem with the following
small program:
public class AsynchronousExceptionTest {
public static void main(String[] args) {
while (true) {
final Thread t1 = new Thread(new Runnable() {
public void run() {
try {
Thread.sleep((int) (Math.random() * 100));
} catch (InterruptedException e) {
// Ignore.
}
System.gc();
}
});
Thread t2 = new Thread(new Runnable() {
public void run() {
try {
Thread.sleep((int) (Math.random() * 100));
t1.stop();
} catch (InterruptedException e) {
// Ignore.
}
}
});
t1.start();
t2.start();
try {
t1.join();
t2.join();
} catch (InterruptedException e) {
// Ignore.
}
}
}
}
and starting the VM with the following commandline:
java -agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=n AsynchronousExceptionTest
the Hotspot crashes when a JVMTI agent tries to get all loaded classes
triggered by a thread stop event and that dying thread has an async
exception pending. You can reproduce the problem with the following
small program:
public class AsynchronousExceptionTest {
public static void main(String[] args) {
while (true) {
final Thread t1 = new Thread(new Runnable() {
public void run() {
try {
Thread.sleep((int) (Math.random() * 100));
} catch (InterruptedException e) {
// Ignore.
}
System.gc();
}
});
Thread t2 = new Thread(new Runnable() {
public void run() {
try {
Thread.sleep((int) (Math.random() * 100));
t1.stop();
} catch (InterruptedException e) {
// Ignore.
}
}
});
t1.start();
t2.start();
try {
t1.join();
t2.join();
} catch (InterruptedException e) {
// Ignore.
}
}
}
}
and starting the VM with the following commandline:
java -agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=n AsynchronousExceptionTest
- backported by
-
JDK-2138697 Unexpected async exception in jvmti_GetLoadedClasses()
- Resolved
- relates to
-
JDK-6512128 Cannot profile glassfish server using netbeans profiler
- Closed