diff -r 0bda2308eded -r ad45b3802d4e src/hotspot/share/runtime/vmOperations.cpp --- a/src/hotspot/share/runtime/vmOperations.cpp Wed May 01 12:41:26 2019 -0400 +++ b/src/hotspot/share/runtime/vmOperations.cpp Wed May 01 12:31:29 2019 -0700 @@ -435,7 +435,20 @@ if (thr!=thr_cur && thr->thread_state() == _thread_in_native) { num_active++; if (thr->is_Compiler_thread()) { +#if INCLUDE_JVMCI + CompilerThread* ct = (CompilerThread*) thr; + if (ct->compiler() == NULL || !ct->compiler()->is_jvmci() || !UseJVMCINativeLibrary) { + num_active_compiler_thread++; + } else { + // When using a compiler in a JVMCI shared library, it's possible + // for one compiler thread to grab a lock in the shared library, + // enter HotSpot and go to sleep on the shutdown safepoint. Another + // JVMCI shared library compiler thread can then attempt to grab the + // lock and thus never make progress. + } +#else num_active_compiler_thread++; +#endif } } }