RFR 8203174: [Graal] JDI tests fail with Unexpected exception: com.sun.jdi.ObjectCollectedException
Daniil Titov
daniil.x.titov at oracle.com
Fri Nov 2 23:29:14 UTC 2018
Please review the change that fixes several tests failing with com.sun.jdi.ObjectCollectedException when running with Graal.
There main problem here is that with Graal on JVMCI Compiler threads in the target VM create a lot of objects and sporadically trigger GC that results in the objects created in the target VM in the tests being GCed before the tests complete. The other problem is that for some classes the tests use, e.g. "java.lang.String", there is already a huge number of instances created by JVMCI threads.
The fix suspends target VM to prevent JVMCI compiler threads from creating new objects during the tests execution. In cases when IOPipe is used for communication between the test and the debuggee the fix suspends all threads but the main rather than suspending the VM. The fix also filters out the checks for some test classes (e.g. "java.lang.String") in cases when the target VM is run with JVMCI compiler options on.
Webrev: http://cr.openjdk.java.net/~dtitov/8203174/webrev.01/
Bug: https://bugs.openjdk.java.net/browse/JDK-8203174
Thanks,
Daniil
More information about the serviceability-dev
mailing list