RFR (S): 8143408: Crash during InstanceKlass unloading when clearing dependency context
vladimir.kozlov at oracle.com
Tue Nov 24 18:28:18 UTC 2015
On 11/24/15 5:11 AM, Vladimir Ivanov wrote:
> The fix for 8139595  assumed that there shouldn't be any valid dependencies on a klass being unloaded (see changes in
> IK::release_C_heap_structures()). Only stale entries were accepted.
> Unfortunately, it's not the case. The problem is that the klass dependency context can contain live dependencies, since
> there's a race between nmethod & klass unloading. If the klass is dead when nmethod unloading happens, relevant
> dependencies aren't removed from the context associated with the class (see nmethod::flush_dependencies). It ends up
> during klass unloading as seemingly live dependencies pointing to unloaded nmethods and causes a crash in
> DC::remove_all_dependents() when it touches unloaded nmethod.
> The fix is to revert IK::release_C_heap_structures() to pre-8139595 state: deallocate all entries w/o consulting their
> state (DC::wipe()).
> Testing: jprt.
> Best regards,
> Vladimir Ivanov
>  http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/09ac9142d6ef
More information about the hotspot-compiler-dev