RFR(S) 8234429: appcds/dynamicArchive tests crashing with Graal

Ioi Lam ioi.lam at oracle.com
Wed Nov 20 22:28:41 UTC 2019


https://bugs.openjdk.java.net/browse/JDK-8234429
http://cr.openjdk.java.net/~iklam/jdk14/8234429-dynamic-cds-graal-crash.v01/

In JDK-8231610, the implementation of DynamicArchive::is_mapped() is 
changed to

     static bool is_mapped() { return FileMapInfo::dynamic_info() != 
NULL; }

During dynamic dumping, we temporarily (inside a safepoint) allocate a 
dynamic FileMapInfo, which makes it appear as if the dynamic archive has 
been mapped.

When graal is enabled, the VM actually continues to run for a little 
(compiling Java methods) after dynamic dumping has finished. During this 
time, when JVMCI tries to resolves a class, it might try to look up from 
the dynamic archive, which will fail as the dynamic archive isn't really 
mapped.

The fix is to free the temporarily allocated FileMapInfo when dynamic 
dumping is finished.

Thanks
- Ioi


More information about the hotspot-runtime-dev mailing list