JDK-8312064 : assert(!thread->is_in_VTMS_transition()) failed: sanity check
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 21,22,23
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2023-07-13
  • Updated: 2025-06-17
  • Resolved: 2025-06-17
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 26
26Resolved
Related Reports
Duplicate :  
Relates :  
Sub Tasks
JDK-8326117 :  
JDK-8359733 :  
Description
java 21-ea 2023-09-19 LTS
Java(TM) SE Runtime Environment (fastdebug build 21-ea+32-LTS-2452)
Java HotSpot(TM) 64-Bit Server VM (fastdebug build 21-ea+32-LTS-2452, mixed mode, sharing)
Successfully attached to JVM with id: 3198423
Native agent successfully loaded:  name=jckjvmti  opts=stop00103
[StopThread] returned JVMTI_ERROR_NONE#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/mach5/mesos/work_dir/slaves/cd627e65-f015-4fb1-a1d2-b6c9b8127f98-S9620/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/ea66c338-a703-49bc-aaea-6d194e6e6fda/runs/3e661b91-9f94-4fa6-b8b2-cd06888ab435/workspace/open/src/hotspot/share/prims/jvmtiThreadState.cpp:545), pid=3198423, tid=3198716
#  assert(!thread->is_in_VTMS_transition()) failed: sanity check
#
# JRE version: Java(TM) SE Runtime Environment (21.0+32) (fastdebug build 21-ea+32-LTS-2452)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 21-ea+32-LTS-2452, mixed mode, sharing, tiered, compressed class ptrs, z gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x11c86ff]  JvmtiVTMSTransitionDisabler::VTMS_vthread_end(_jobject*)+0x2cf

I couldn't find reports of this same crash happening elsewhere.
Comments
Closing as a dup of JDK-8316682.
17-06-2025

Hi [~dholmes], we observed a similar failure in our CI : test serviceability/jvmti/vthread/SuspendWithInterruptLock/SuspendWithInterruptLock.java#default (linuxppc64le , jdk23 fastdebug) # Internal Error (/openjdk-jdk-dev-linux_ppc64le-dbg/jdk/src/hotspot/share/prims/jvmtiEnvBase.cpp:1731), pid=29725, tid=29919 # assert(!java_thread->is_in_VTMS_transition()) failed: sanity check # Problematic frame: # V [libjvm.so+0x12fa5e8] JvmtiEnvBase::suspend_thread(oop, JavaThread*, bool, int*)+0x478 --------------- T H R E A D --------------- Current thread (0x00007fff38030a00): JavaThread "Thread-1" [_thread_in_vm, id=29919, stack(0x00007fff80750000,0x00007fff80950000) (2048K)] _threads_hazard_ptr=0x00007fff3c002080, _nested_threads_hazard_ptr_cnt=0 Stack: [0x00007fff80750000,0x00007fff80950000], sp=0x00007fff8094d7b0, free space=2037k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x12fa5e8] JvmtiEnvBase::suspend_thread(oop, JavaThread*, bool, int*)+0x478 (jvmtiEnvBase.cpp:1731) V [libjvm.so+0x12d7458] JvmtiEnv::SuspendThread(_jobject*)+0x108 (jvmtiEnv.cpp:948) V [libjvm.so+0x127b61c] jvmti_SuspendThread+0x22c (jvmtiEnter.cpp:534) C [libJvmtiUtils.so+0x32e4] Java_jvmti_JVMTIUtils_suspendThread0+0x34 (jvmti.h:1883) j jvmti.JVMTIUtils.suspendThread0(Ljava/lang/Thread;)I+0 j jvmti.JVMTIUtils.suspendThread(Ljava/lang/Thread;)V+1 j SuspendWithInterruptLock.suspendThread(Ljava/lang/Thread;)V+1 j SuspendWithInterruptLock.suspender(Ljava/lang/Thread;)V+7 j SuspendWithInterruptLock.lambda$main$2(Ljava/lang/Thread;)V+1 j SuspendWithInterruptLock$$Lambda+0x000002a301003458.run()V+4 j java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V+5 java.base@23-internal j java.lang.Thread.run()V+19 java.base@23-internal v ~StubRoutines::call_stub 0x00007fff9be6084c V [libjvm.so+0x1012bb0] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x490 (javaCalls.cpp:415) V [libjvm.so+0x16d928c] os::os_exception_wrapper(void (*)(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*), JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x3c (os_linux.cpp:4885) V [libjvm.so+0x10131bc] JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x32c (javaCalls.cpp:329) V [libjvm.so+0x10134b0] JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, JavaThread*)+0x80 (javaCalls.cpp:191) V [libjvm.so+0x11efc68] thread_entry(JavaThread*, JavaThread*)+0xc8 (jvm.cpp:2937) V [libjvm.so+0x106576c] JavaThread::thread_main_inner()+0x14c (javaThread.cpp:721) V [libjvm.so+0x1bbb490] Thread::call_run()+0xe0 (thread.cpp:220) V [libjvm.so+0x16dc6ac] thread_native_entry(Thread*)+0x19c (os_linux.cpp:789) C [libpthread.so.0+0x9684] start_thread+0x104 Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j jvmti.JVMTIUtils.suspendThread0(Ljava/lang/Thread;)I+0 j jvmti.JVMTIUtils.suspendThread(Ljava/lang/Thread;)V+1 j SuspendWithInterruptLock.suspendThread(Ljava/lang/Thread;)V+1 j SuspendWithInterruptLock.suspender(Ljava/lang/Thread;)V+7 j SuspendWithInterruptLock.lambda$main$2(Ljava/lang/Thread;)V+1 j SuspendWithInterruptLock$$Lambda+0x000002a301003458.run()V+4 j java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V+5 java.base@23-internal j java.lang.Thread.run()V+19 java.base@23-internal v ~StubRoutines::call_stub 0x00007fff9be6084c
29-12-2023

Test serviceability/jvmti/vthread/SuspendWithInterruptLock/SuspendWithInterruptLock.java#default has also failed now. --------------- T H R E A D --------------- Current thread (0x0000fffb0c06f030): JavaThread "Thread-1" [_thread_in_vm, id=1158036, stack(0x0000fffb65221000,0x0000fffb6541f000) (2040K)] _threads_hazard_ptr=0x0000fffb10001c60, _nested_threads_hazard_ptr_cnt=0 Stack: [0x0000fffb65221000,0x0000fffb6541f000], sp=0x0000fffb6541d120, free space=2032k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x102b088] JvmtiEnvBase::suspend_thread(oop, JavaThread*, bool, int*)+0x528 (jvmtiEnvBase.cpp:1731) V [libjvm.so+0x1014e68] JvmtiEnv::SuspendThread(_jobject*)+0xb8 (jvmtiEnv.cpp:948) V [libjvm.so+0xfd3044] jvmti_SuspendThread+0x194 (jvmtiEnter.cpp:534) J 5359 jvmti.JVMTIUtils.suspendThread0(Ljava/lang/Thread;)I (0 bytes) @ 0x0000ffff90d46410 [0x0000ffff90d46340+0x00000000000000d0] J 5354 c1 jvmti.JVMTIUtils.suspendThread(Ljava/lang/Thread;)V (22 bytes) @ 0x0000ffff897501a8 [0x0000ffff89750100+0x00000000000000a8] J 5299 c1 SuspendWithInterruptLock$$Lambda+0x00000070010018d8.run()V (8 bytes) @ 0x0000ffff897366e0 [0x0000ffff89736500+0x00000000000001e0] J 1646 c2 java.lang.Thread.run()V java.base@23-ea (23 bytes) @ 0x0000ffff908a8360 [0x0000ffff908a8280+0x00000000000000e0] v ~StubRoutines::call_stub 0x0000ffff9015e180 V [libjvm.so+0xd3fbbc] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x43c (javaCalls.cpp:415) V [libjvm.so+0xd4015c] JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x29c (javaCalls.cpp:329) V [libjvm.so+0xd4035c] JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, JavaThread*)+0x6c (javaCalls.cpp:191) V [libjvm.so+0xe99370] thread_entry(JavaThread*, JavaThread*)+0xa0 (jvm.cpp:2937) V [libjvm.so+0xd73ddc] JavaThread::thread_main_inner()+0xcc (javaThread.cpp:721) V [libjvm.so+0x15ad800] Thread::call_run()+0xac (thread.cpp:220) V [libjvm.so+0x13204ec] thread_native_entry(Thread*)+0x12c (os_linux.cpp:789) C [libpthread.so.0+0x7928] start_thread+0x188 Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) J 5359 jvmti.JVMTIUtils.suspendThread0(Ljava/lang/Thread;)I (0 bytes) @ 0x0000ffff90d46410 [0x0000ffff90d46340+0x00000000000000d0] J 5354 c1 jvmti.JVMTIUtils.suspendThread(Ljava/lang/Thread;)V (22 bytes) @ 0x0000ffff897501a8 [0x0000ffff89750100+0x00000000000000a8] J 5299 c1 SuspendWithInterruptLock$$Lambda+0x00000070010018d8.run()V (8 bytes) @ 0x0000ffff897366e0 [0x0000ffff89736500+0x00000000000001e0] J 1646 c2 java.lang.Thread.run()V java.base@23-ea (23 bytes) @ 0x0000ffff908a8360 [0x0000ffff908a8280+0x00000000000000e0] v ~StubRoutines::call_stub 0x0000ffff9015e180
21-12-2023

Unfortunately, I was not able to reproduce this issue yet.
19-07-2023