RFR (XS) 8224692 appcds tests crash in "HotSpotJVMCI::compute_offset" when running in Graal as JIT mode
Ioi Lam
ioi.lam at oracle.com
Thu May 30 04:23:21 UTC 2019
https://bugs.openjdk.java.net/browse/JDK-8224692
http://cr.openjdk.java.net/~iklam/jdk13/8224692-dynamic-cds-tests-crash-with-graal-jit.v01/
Background:
The dynamic archive is created inside the before_exit() function. This
is a convenient place to do it -- the JVM could exit in multiple ways,
but they all come to this function.
The down side of the before_exit() function is that some small amount
Java code could run afterwards, including code executed by the Graal JIT.
The design of Dynamic CDS *should* support this -- the archive creation
happens inside a safepoint, saving a copy of the loaded classes into the
archive file. It should not have any side effects observable from the
Java code. As a result, it should be possible to resume the execution of
Java code after the archive is created.
The bug here is we incorrectly reset the shared symbol table during
archive creation. The fix is pretty simple -- don't do that.
I also fixed two other bugs that surface only with Graal JIT:
+ Avoid having an empty "MC" region.
+ In the test NoClassToArchive.java, when Graal JIT is used, anonymous
classes might be loaded.
Testing:
I verified that all of the failing tests now pass with Graal JIT.
More information about the hotspot-runtime-dev
mailing list