JDK-8305621 : jvmti/vthread/SuspendResume1 fails "assert(_frame_index >= 0) failed: Using offset with a non-chunk frame"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 21,22
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86_64
  • Submitted: 2023-04-04
  • Updated: 2025-06-24
  • Resolved: 2025-06-24
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 :  
Duplicate :  
Relates :  
Description
The following test failed in the JDK21 CI:

serviceability/jvmti/vthread/SuspendResume1/SuspendResume1.java#default

Here's a snippet from the log file:

## Agent: thread TestedThread18 frame count: 15
Agent: GetFrameLocation: frame for current thread TestedThread18: method: yield(Ljdk/internal/vm/ContinuationScope;)Z, loc: 69
JVMTI Stack Trace for thread TestedThread18: frame count: 15
 0: jdk/internal/vm/Continuation: yield0(Ljdk/internal/vm/ContinuationScope;Ljdk/internal/vm/Continuation;)Z
 1: jdk/internal/vm/Continuation: yield(Ljdk/internal/vm/ContinuationScope;)Z
 2: java/lang/VirtualThread: yieldContinuation()Z
 3: java/lang/VirtualThread: parkNanos(J)V
 4: java/lang/VirtualThread: doSleepNanos(J)V
 5: java/lang/VirtualThread: sleepNanos(J)V
 6: java/lang/Thread: sleep(J)V
 7: SuspendResume1: sleep(J)V
 8: TestedThread: run()V
 9: java/lang/VirtualThread: runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V
10: java/lang/VirtualThread: run(Ljava/lang/Runnable;)V
11: java/lang/VirtualThread$VThreadContinuation: lambda$new$0(Ljava/lang/VirtualThread;Ljava/lang/Runnable;)V
12: java/lang/VirtualThread$VThreadContinuation$$Lambda.0x000000080104f108: run()V
13: jdk/internal/vm/Continuation: enter0()V
14: jdk/internal/vm/Continuation: enter(Ljdk/internal/vm/Continuation;Z)V

## Agent: thread TestedThread19 frame count: 15
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/mach5/mesos/work_dir/slaves/741e9afd-8c02-45c3-b2e2-9db1450d0832-S20155/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/76f263c8-dcd0-4e09-8849-b86319645a3d/runs/de6f8733-a46b-4c8e-afa2-efd921f29d36/workspace/open/src/hotspot/share/runtime/frame.hpp:89), pid=2539204, tid=2539316
#  assert(_frame_index >= 0) failed: Using offset with a non-chunk frame
#
# JRE version: Java(TM) SE Runtime Environment (21.0+17) (fastdebug build 21-ea+17-LTS-1395)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 21-ea+17-LTS-1395, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x1603ca6]  stackChunkOopDesc::top_frame(RegisterMap*)+0x576
#
# Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to /opt/mach5/mesos/work_dir/slaves/741e9afd-8c02-45c3-b2e2-9db1450d0832-S41167/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/586d6817-1215-44e5-8640-cd81fba9b3de/runs/daa8b116-9513-4c95-82cc-8ad3566d5eaa/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/scratch/3/core.2539204)
#
# An error report file with more information is saved as:
# /opt/mach5/mesos/work_dir/slaves/741e9afd-8c02-45c3-b2e2-9db1450d0832-S41167/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/586d6817-1215-44e5-8640-cd81fba9b3de/runs/daa8b116-9513-4c95-82cc-8ad3566d5eaa/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/scratch/3/hs_err_pid2539204.log
[48.734s][warning][os] Loading hsdis library failed
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
----------System.err:(0/0)----------
----------rerun:(47/8072)*----------

Here's the crashing thread's stack:

---------------  T H R E A D  ---------------

Current thread (0x00007fee683575d0):  JavaThread "MainThread" [_thread_in_vm, id=2539316, stack(0x00007fee4cd3d000,0x00007fee4ce3e000)] _threads_hazard_ptr=0x00007fee080456c0, _nested_threads_hazard_ptr_cnt=0

Stack: [0x00007fee4cd3d000,0x00007fee4ce3e000],  sp=0x00007fee4ce384d0,  free space=1005k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1603ca6]  stackChunkOopDesc::top_frame(RegisterMap*)+0x576  (frame.hpp:89)
V  [libjvm.so+0xa0c5a5]  continuation_top_frame(ContinuationWrapper const&, RegisterMap*)+0xb5  (continuation.cpp:159)
V  [libjvm.so+0xa0dddc]  Continuation::has_last_Java_frame(oop, frame*, RegisterMap*)+0xcc  (continuation.cpp:165)
V  [libjvm.so+0x181b1bc]  vframeStream::vframeStream(oop, Handle)+0x11c  (vframe.cpp:517)
V  [libjvm.so+0x11444f7]  JvmtiEnvBase::get_vthread_jvf(oop)+0x1c7  (jvmtiEnvBase.cpp:709)
V  [libjvm.so+0x1144bd6]  JvmtiEnvBase::get_frame_location(oop, int, _jmethodID**, long*)+0xe6  (jvmtiEnvBase.cpp:1282)
V  [libjvm.so+0x112c4db]  JvmtiEnv::GetFrameLocation(_jobject*, int, _jmethodID**, long*)+0x3ab  (jvmtiEnv.cpp:1940)
V  [libjvm.so+0x10d82d2]  jvmti_GetFrameLocation+0x112  (jvmtiEnter.cpp:1418)
C  [libSuspendResume1.so+0x2fbb]  test_jvmti_functions_for_threads+0x1cb  (jvmti.h:2011)
C  [libSuspendResume1.so+0x4dad]  Java_SuspendResume1_TestSuspendResume+0x1fd  (libSuspendResume1.cpp:326)
J 5647  SuspendResume1.TestSuspendResume()V (0 bytes) @ 0x00007fee58f09da3 [0x00007fee58f09cc0+0x00000000000000e3]
J 4118 c1 SuspendResume1.test_vthreads()I (127 bytes) @ 0x00007fee515a240c [0x00007fee515a1b80+0x000000000000088c]
J 4055 c1 SuspendResume1.runIt([Ljava/lang/String;Ljava/io/PrintStream;)I (43 bytes) @ 0x00007fee515770dc [0x00007fee51576fe0+0x00000000000000fc]
J 3357 c1 SuspendResume1.main([Ljava/lang/String;)V (27 bytes) @ 0x00007fee513dfa2c [0x00007fee513df840+0x00000000000001ec]
J 3432 c1 java.lang.invoke.LambdaForm$DMH+0x0000000801001800.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;)V java.base@21-ea (14 bytes) @ 0x00007fee513fb1fc [0x00007fee513fae20+0x00000000000003dc]
J 4019 c1 java.lang.invoke.LambdaForm$MH+0x0000000801002c00.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; java.base@21-ea (38 bytes) @ 0x00007fee51567314 [0x00007fee51566d80+0x0000000000000594]
J 4044 c1 java.lang.invoke.Invokers$Holder.invokeExact_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; java.base@21-ea (24 bytes) @ 0x00007fee515759dc [0x00007fee515752c0+0x000000000000071c]
J 4032 c1 jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base@21-ea (92 bytes) @ 0x00007fee5156e164 [0x00007fee5156d4c0+0x0000000000000ca4]
J 3321 c1 java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base@21-ea (108 bytes) @ 0x00007fee513cd7a4 [0x00007fee513cd220+0x0000000000000584]
J 3243 c1 com.sun.javatest.regtest.agent.MainWrapper$MainThread.run()V (438 bytes) @ 0x00007fee513a74b4 [0x00007fee513a66a0+0x0000000000000e14]
J 1832 c2 java.lang.Thread.run()V java.base@21-ea (23 bytes) @ 0x00007fee589e8084 [0x00007fee589e7fe0+0x00000000000000a4]
v  ~StubRoutines::call_stub 0x00007fee581ebd21
V  [libjvm.so+0xe6b502]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x462  (javaCalls.cpp:415)
V  [libjvm.so+0xe6bae3]  JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x283  (javaCalls.cpp:329)
V  [libjvm.so+0xe6bcf1]  JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, JavaThread*)+0x71  (javaCalls.cpp:191)
V  [libjvm.so+0xfba996]  thread_entry(JavaThread*, JavaThread*)+0x96  (jvm.cpp:2918)
V  [libjvm.so+0xe9d9ae]  JavaThread::thread_main_inner()+0x17e  (javaThread.cpp:717)
V  [libjvm.so+0x1766498]  Thread::call_run()+0xb8  (thread.cpp:224)
V  [libjvm.so+0x14695ea]  thread_native_entry(Thread*)+0x11a  (os_linux.cpp:740)
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 5647  SuspendResume1.TestSuspendResume()V (0 bytes) @ 0x00007fee58f09d34 [0x00007fee58f09cc0+0x0000000000000074]
J 4118 c1 SuspendResume1.test_vthreads()I (127 bytes) @ 0x00007fee515a240c [0x00007fee515a1b80+0x000000000000088c]
J 4055 c1 SuspendResume1.runIt([Ljava/lang/String;Ljava/io/PrintStream;)I (43 bytes) @ 0x00007fee515770dc [0x00007fee51576fe0+0x00000000000000fc]
J 3357 c1 SuspendResume1.main([Ljava/lang/String;)V (27 bytes) @ 0x00007fee513dfa2c [0x00007fee513df840+0x00000000000001ec]
J 3432 c1 java.lang.invoke.LambdaForm$DMH+0x0000000801001800.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;)V java.base@21-ea (14 bytes) @ 0x00007fee513fb1fc [0x00007fee513fae20+0x00000000000003dc]
J 4019 c1 java.lang.invoke.LambdaForm$MH+0x0000000801002c00.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; java.base@21-ea (38 bytes) @ 0x00007fee51567314 [0x00007fee51566d80+0x0000000000000594]
J 4044 c1 java.lang.invoke.Invokers$Holder.invokeExact_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; java.base@21-ea (24 bytes) @ 0x00007fee515759dc [0x00007fee515752c0+0x000000000000071c]
J 4032 c1 jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base@21-ea (92 bytes) @ 0x00007fee5156e164 [0x00007fee5156d4c0+0x0000000000000ca4]
J 3321 c1 java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base@21-ea (108 bytes) @ 0x00007fee513cd7a4 [0x00007fee513cd220+0x0000000000000584]
J 3243 c1 com.sun.javatest.regtest.agent.MainWrapper$MainThread.run()V (438 bytes) @ 0x00007fee513a74b4 [0x00007fee513a66a0+0x0000000000000e14]
J 1832 c2 java.lang.Thread.run()V java.base@21-ea (23 bytes) @ 0x00007fee589e8084 [0x00007fee589e7fe0+0x00000000000000a4]
v  ~StubRoutines::call_stub 0x00007fee581ebd21
Comments
My mistake, David. Thank you for catching it! Overlooked it is in the Fixed state. Corrected now.
24-06-2025

[~sspitsyn] If this is a dup then it needs to be resolved as a Duplicate, not Fixed.
16-06-2025

This issue with a big probability has to be a dup of JDK-8316682, so closing it as a dup.
11-06-2025