RFR(S): 8152861: VM crash on assert: locked methods shouldn't be flushed
tobias.hartmann at oracle.com
Tue Mar 29 17:02:14 UTC 2016
please review the following patch:
JDK-8023191 made it possible for OSR nmethods to transition from not-entrant to flushed in one sweeper iteration. After making an OSR nmethod zombie, we need to check (again) if the nmethod is locked because JVMTI may claim the nmethod in JvmtiDeferredEvent::compiled_method_unload_event() which is called from nmethod::make_not_entrant_or_zombie() -> nmethod::post_compiled_method_unload(). In this case, we cannot flush the nmethod immediately but have to wait for another iteration of sweeper to finally flush it.
Tested with failing JVMTI tests, JPRT and RBT (running). This was not caught by the hs-comp nightlies because the problem is only triggered by two JVMTI tests...
More information about the hotspot-compiler-dev