RFR(XS): 8233491: Crash in AdapterHandlerLibrary::get_adapter with CDS due to code cache exhaustion

Tobias Hartmann tobias.hartmann at oracle.com
Wed Nov 6 13:34:15 UTC 2019


Hi,

please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8233491
http://cr.openjdk.java.net/~thartmann/8233491/webrev.00/

When running a stress test with CDS, we fail to create adapters when linking a method from a shared
class because the code cache is full. This case is not properly handled by the CDS specific code and
instead of throwing a VirtualMachineError, we crash because "entry" is NULL.

I'm able to spuriously reproduce this with a test (see [1]) but since the problem depends on the
class loading sequence, I was not able to make it more reliable or convert it to a robust jtreg
test. However, I've verified that the patch fixes the problem.

Thanks,
Tobias

[1]
https://bugs.openjdk.java.net/browse/JDK-8233491?focusedCommentId=14298462&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14298462


More information about the hotspot-compiler-dev mailing list