See:
void MethodHandles::remove_dependent_nmethod(oop call_site, nmethod* nm) {
assert_locked_or_safepoint(CodeCache_lock);
oop context = java_lang_invoke_CallSite::context(call_site);
nmethodBucket* deps = java_lang_invoke_MethodHandleNatives_CallSiteContext::vmdependencies(context);
if (nmethodBucket::remove_dependent_nmethod(deps, nm)) {
nmethodBucket* new_deps = nmethodBucket::clean_dependent_nmethods(deps);
if (deps != new_deps) {
java_lang_invoke_MethodHandleNatives_CallSiteContext::set_vmdependencies(context, new_deps);
}
}
}
The code in nmethodBucket::clean_dependent_nmethods deletes entries and cuts the list. This works for most callers but not when GC does Klass cleaning in parallel.
This is most likely the reason for multiple crashes seen when JSR292 intensive tests are run with G1.
- duplicates
-
JDK-8138639 GC thread crash in malloc on OS X
-
- Closed
-
-
JDK-8129810 G1: SIGSEGV in remove_dependent_nmethod
-
- Closed
-
-
JDK-8132159 Crash w/ G1 during nmethod dependency cleaning
-
- Closed
-
-
JDK-8133179 Crash in nmethodBucket::add_dependent_nmethod
-
- Closed
-
-
JDK-8077283 vm/mlvm/meth/stress/compiler/ crashed with SIGSEG on build with g1 as default
-
- Closed
-
-
JDK-8138639 GC thread crash in malloc on OS X
-
- Closed
-
-
JDK-8129810 G1: SIGSEGV in remove_dependent_nmethod
-
- Closed
-
-
JDK-8132159 Crash w/ G1 during nmethod dependency cleaning
-
- Closed
-
- relates to
-
JDK-8143408 Crash during InstanceKlass unloading when clearing dependency context
-
- Closed
-