-
Bug
-
Resolution: Fixed
-
P3
-
21
-
b16
If you run com/sun/jdi/InterruptHangTest.java with "-Xcomp -Dmain.wrapper=Virtual", you will get the following on about 2/3rds of the runs on all platforms except windows:
# Internal Error (/opt/mach5/mesos/work_dir/slaves/741e9afd-8c02-45c3-b2e2-9db1450d0832-S63265/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c5ec6d5f-d8aa-4e2f-8c1f-01846ed52adf/runs/37522b1b-b6e4-424b-b868-52f1f824e36d/workspace/open/src/hotspot/share/prims/jvmtiThreadState.cpp:795), pid=3340324, tid=3340459
# assert(_cur_stack_depth == num_frames) failed: cur_stack_depth out of sync _cur_stack_depth: 13 num_frames: 12
The test actually fails with:
java.lang.RuntimeException: Non-zero debuggee exitValue: 134
at TestScaffold.waitForVMDisconnect(TestScaffold.java:744)
at TestScaffold.resumeToVMDisconnect(TestScaffold.java:972)
at TestScaffold.listenUntilVMDisconnect(TestScaffold.java:705)
at InterruptHangTest.runTests(InterruptHangTest.java:181)
at TestScaffold.startTests(TestScaffold.java:434)
at InterruptHangTest.main(InterruptHangTest.java:118)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
at java.base/java.lang.Thread.run(Thread.java:1592)
Here's the full stack trace at the time of the assert:
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x106868c] JvmtiThreadState::cur_stack_depth()+0x13c (jvmtiThreadState.cpp:795)
V [libjvm.so+0x1027e84] JvmtiExport::post_method_exit_inner(JavaThread*, methodHandle&, JvmtiThreadState*, bool, frame, jvalue&) [clone .part.0]+0xa4 (jvmtiExport.cpp:1921)
V [libjvm.so+0x102d638] JvmtiExport::post_method_exit(JavaThread*, Method*, frame)+0x238 (javaThread.hpp:650)
V [libjvm.so+0xd27a88] InterpreterRuntime::post_method_exit(JavaThread*)+0xc8 (interpreterRuntime.cpp:1241)
j java.lang.invoke.LambdaForm$MH+0x0000000801008800.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+37 java.base@21-ea
J 4211 jdk.internal.vm.Continuation.enterSpecial(Ljdk/internal/vm/Continuation;ZZ)V java.base@21-ea (0 bytes) @ 0x0000fffba8ca94f4 [0x0000fffba8ca93c0+0x0000000000000134]
J 4215 c2 jdk.internal.vm.Continuation.run()V java.base@21-ea (586 bytes) @ 0x0000fffba8cab82c [0x0000fffba8cab380+0x00000000000004ac]
J 4209 c2 java.lang.VirtualThread.runContinuation()V java.base@21-ea (128 bytes) @ 0x0000fffba8ca9a18 [0x0000fffba8ca98c0+0x0000000000000158]
J 4207 c2 java.lang.VirtualThread$$Lambda+0x000000080104ba80.run()V java.base@21-ea (8 bytes) @ 0x0000fffba8ca9034 [0x0000fffba8ca8fc0+0x0000000000000074]
J 5222 c2 java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec()Z java.base@21-ea (11 bytes) @ 0x0000fffba8d88d3c [0x0000fffba8d88cc0+0x000000000000007c]
J 5198 c2 java.util.concurrent.ForkJoinTask.doExec()I java.base@21-ea (37 bytes) @ 0x0000fffba8d83a04 [0x0000fffba8d83980+0x0000000000000084]
J 5220 c2 java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Ljava/util/concurrent/ForkJoinTask;Ljava/util/concurrent/ForkJoinPool$WorkQueue;)V java.base@21-ea (83 bytes) @ 0x0000fffba8d8825c [0x0000fffba8d881c0+0x000000000000009c]
J 5212 c2 java.util.concurrent.ForkJoinPool.scan(Ljava/util/concurrent/ForkJoinPool$WorkQueue;II)I java.base@21-ea (263 bytes) @ 0x0000fffba8d876a8 [0x0000fffba8d87480+0x0000000000000228]
J 4188 c2 java.util.concurrent.ForkJoinPool.runWorker(Ljava/util/concurrent/ForkJoinPool$WorkQueue;)V java.base@21-ea (60 bytes) @ 0x0000fffba8ca532c [0x0000fffba8ca5280+0x00000000000000ac]
J 4180 c2 java.util.concurrent.ForkJoinWorkerThread.run()V java.base@21-ea (180 bytes) @ 0x0000fffba8ca06a4 [0x0000fffba8ca0600+0x00000000000000a4]
v ~StubRoutines::call_stub 0x0000fffba819017c
V [libjvm.so+0xd44174] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x434 (javaCalls.cpp:415)
V [libjvm.so+0xd44688] JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x248 (javaCalls.cpp:329)
V [libjvm.so+0xd44874] JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, JavaThread*)+0x64 (javaCalls.cpp:191)
V [libjvm.so+0xe8f1d4] thread_entry(JavaThread*, JavaThread*)+0xa0 (jvm.cpp:2918)
V [libjvm.so+0xd779a8] JavaThread::thread_main_inner()+0x184 (javaThread.cpp:717)
V [libjvm.so+0x15b2be0] Thread::call_run()+0xac (thread.cpp:224)
V [libjvm.so+0x13118c8] thread_native_entry(Thread*)+0x134 (os_linux.cpp:740)
C [libpthread.so.0+0x7908] start_thread+0x188
# Internal Error (/opt/mach5/mesos/work_dir/slaves/741e9afd-8c02-45c3-b2e2-9db1450d0832-S63265/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c5ec6d5f-d8aa-4e2f-8c1f-01846ed52adf/runs/37522b1b-b6e4-424b-b868-52f1f824e36d/workspace/open/src/hotspot/share/prims/jvmtiThreadState.cpp:795), pid=3340324, tid=3340459
# assert(_cur_stack_depth == num_frames) failed: cur_stack_depth out of sync _cur_stack_depth: 13 num_frames: 12
The test actually fails with:
java.lang.RuntimeException: Non-zero debuggee exitValue: 134
at TestScaffold.waitForVMDisconnect(TestScaffold.java:744)
at TestScaffold.resumeToVMDisconnect(TestScaffold.java:972)
at TestScaffold.listenUntilVMDisconnect(TestScaffold.java:705)
at InterruptHangTest.runTests(InterruptHangTest.java:181)
at TestScaffold.startTests(TestScaffold.java:434)
at InterruptHangTest.main(InterruptHangTest.java:118)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
at java.base/java.lang.Thread.run(Thread.java:1592)
Here's the full stack trace at the time of the assert:
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x106868c] JvmtiThreadState::cur_stack_depth()+0x13c (jvmtiThreadState.cpp:795)
V [libjvm.so+0x1027e84] JvmtiExport::post_method_exit_inner(JavaThread*, methodHandle&, JvmtiThreadState*, bool, frame, jvalue&) [clone .part.0]+0xa4 (jvmtiExport.cpp:1921)
V [libjvm.so+0x102d638] JvmtiExport::post_method_exit(JavaThread*, Method*, frame)+0x238 (javaThread.hpp:650)
V [libjvm.so+0xd27a88] InterpreterRuntime::post_method_exit(JavaThread*)+0xc8 (interpreterRuntime.cpp:1241)
j java.lang.invoke.LambdaForm$MH+0x0000000801008800.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+37 java.base@21-ea
J 4211 jdk.internal.vm.Continuation.enterSpecial(Ljdk/internal/vm/Continuation;ZZ)V java.base@21-ea (0 bytes) @ 0x0000fffba8ca94f4 [0x0000fffba8ca93c0+0x0000000000000134]
J 4215 c2 jdk.internal.vm.Continuation.run()V java.base@21-ea (586 bytes) @ 0x0000fffba8cab82c [0x0000fffba8cab380+0x00000000000004ac]
J 4209 c2 java.lang.VirtualThread.runContinuation()V java.base@21-ea (128 bytes) @ 0x0000fffba8ca9a18 [0x0000fffba8ca98c0+0x0000000000000158]
J 4207 c2 java.lang.VirtualThread$$Lambda+0x000000080104ba80.run()V java.base@21-ea (8 bytes) @ 0x0000fffba8ca9034 [0x0000fffba8ca8fc0+0x0000000000000074]
J 5222 c2 java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec()Z java.base@21-ea (11 bytes) @ 0x0000fffba8d88d3c [0x0000fffba8d88cc0+0x000000000000007c]
J 5198 c2 java.util.concurrent.ForkJoinTask.doExec()I java.base@21-ea (37 bytes) @ 0x0000fffba8d83a04 [0x0000fffba8d83980+0x0000000000000084]
J 5220 c2 java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Ljava/util/concurrent/ForkJoinTask;Ljava/util/concurrent/ForkJoinPool$WorkQueue;)V java.base@21-ea (83 bytes) @ 0x0000fffba8d8825c [0x0000fffba8d881c0+0x000000000000009c]
J 5212 c2 java.util.concurrent.ForkJoinPool.scan(Ljava/util/concurrent/ForkJoinPool$WorkQueue;II)I java.base@21-ea (263 bytes) @ 0x0000fffba8d876a8 [0x0000fffba8d87480+0x0000000000000228]
J 4188 c2 java.util.concurrent.ForkJoinPool.runWorker(Ljava/util/concurrent/ForkJoinPool$WorkQueue;)V java.base@21-ea (60 bytes) @ 0x0000fffba8ca532c [0x0000fffba8ca5280+0x00000000000000ac]
J 4180 c2 java.util.concurrent.ForkJoinWorkerThread.run()V java.base@21-ea (180 bytes) @ 0x0000fffba8ca06a4 [0x0000fffba8ca0600+0x00000000000000a4]
v ~StubRoutines::call_stub 0x0000fffba819017c
V [libjvm.so+0xd44174] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x434 (javaCalls.cpp:415)
V [libjvm.so+0xd44688] JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x248 (javaCalls.cpp:329)
V [libjvm.so+0xd44874] JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, JavaThread*)+0x64 (javaCalls.cpp:191)
V [libjvm.so+0xe8f1d4] thread_entry(JavaThread*, JavaThread*)+0xa0 (jvm.cpp:2918)
V [libjvm.so+0xd779a8] JavaThread::thread_main_inner()+0x184 (javaThread.cpp:717)
V [libjvm.so+0x15b2be0] Thread::call_run()+0xac (thread.cpp:224)
V [libjvm.so+0x13118c8] thread_native_entry(Thread*)+0x134 (os_linux.cpp:740)
C [libpthread.so.0+0x7908] start_thread+0x188
- relates to
-
JDK-8043571 [REDO] JDK-8041934 com/sun/jdi/RepStep.java fails in RT_Baseline on all platforms with assert(_cur_stack_depth == count_frames()) failed: cur_stack_depth out of sync
- Open
-
JDK-8324868 debug agent does not properly handle interrupts of a virtual thread
- Resolved
- links to
-
Commit(master) openjdk/jdk/a8f143c6
-
Review(master) openjdk/jdk/20943