JDK-8065346 : WB_AddToBootstrapClassLoaderSearch calls JvmtiEnv::create_a_jvmti when not in _thread_in_vm state
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-11-19
  • Updated: 2017-07-26
  • Resolved: 2014-11-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u40Fixed 9 b42Fixed
Related Reports
Relates :  
Description
JDK-8064701 added the function WB_AddToBootstrapClassLoaderSearch. This function calls JvmtiEnv::create_a_jvmti() while the thread is in "native" state. JvmtiEnv::create_a_jvmti() requires the thread to be in "vm" state.

This results in an assert:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/jprt/T/P1/005732.iklam/s/hotspot/src/share/vm/runtime/mutex.cpp:1367), pid=15057, tid=140678647793408
#  assert((!thread->is_Java_thread() || ((JavaThread *)thread)->thread_state() == _thread_in_vm) || rank() == Mutex::special) failed: wrong thread state for using locks
#
# JRE version: Java(TM) SE Runtime Environment (9.0) (build 1.9.0-internal-fastdebug-201411190057.iklam.jdk9-b00)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.9.0-internal-fastdebug-201411190057.iklam.jdk9-b00 compiled mode, sharing linux-amd64 compressed oops)
# Core dump written. Default location: /export/local/aurora/sandbox/results/workDir/closed/runtime/AppCDS/JvmtiAddPath/core or core.15057
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#