JDK-8316397 : StackTrace/Suspended/GetStackTraceSuspendedStressTest.java failed with "SingleStep event is NOT expected"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 22,23
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: linux
  • CPU: aarch64
  • Submitted: 2023-09-17
  • Updated: 2024-11-05
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 25
25Unresolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
The following test failed in an adhoc Tier4 job that is testing:

    JDK-8315880 Change LockingMode default from LM_LEGACY to LM_LIGHTWEIGHT

Here's a snippet from the log file:

#section:main
----------messages:(6/357)----------
command: main -agentlib:GetStackTraceSuspendedStress GetStackTraceSuspendedStressTest
reason: User specified action: run main/othervm/native -agentlib:GetStackTraceSuspendedStress GetStackTraceSuspendedStressTest 
started: Sat Sep 16 04:08:42 UTC 2023
Mode: othervm [/othervm specified]
finished: Sat Sep 16 04:09:13 UTC 2023
elapsed time (seconds): 30.654
----------configuration:(0/0)----------
----------System.out:(87/7889)----------
Agent_OnLoad started
Agent_OnLoad finished
Synchronization point checkStatus(0) called.
Data 0xffffa801fac0 0xffffa801ff10
Agent: waiting to start
Agent: started
VThread-Producer-3: started
VThread-Producer-0: started
VThread-Producer-1: started
VThread-Consumer-0: started
VThread-Consumer-3: started
VThread-Consumer-2: started
VThread-Consumer-1: started
VThread-Producer-2: started
VThread-Producer-5: started
VThread-Producer-7: started
Agent: Got SingleStep event:
JVMTI Stack Trace for thread VThread-Producer-5: frame count: 28
 0: java/lang/invoke/BoundMethodHandle$Species_LL: make(Ljava/lang/invoke/MethodType;Ljava/lang/invoke/LambdaForm;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/invoke/BoundMethodHandle;
 1: java/lang/invoke/DirectMethodHandle$Holder: invokeStatic(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
 2: java/lang/invoke/BoundMethodHandle$Species_L: copyWithExtendL(Ljava/lang/invoke/MethodType;Ljava/lang/invoke/LambdaForm;Ljava/lang/Object;)Ljava/lang/invoke/BoundMethodHandle;
 3: java/lang/invoke/LambdaFormEditor: bindArgumentL(Ljava/lang/invoke/BoundMethodHandle;ILjava/lang/Object;)Ljava/lang/invoke/BoundMethodHandle;
 4: java/lang/invoke/BoundMethodHandle: bindArgumentL(ILjava/lang/Object;)Ljava/lang/invoke/BoundMethodHandle;
 5: java/lang/invoke/MethodHandles: insertArguments(Ljava/lang/invoke/MethodHandle;I[Ljava/lang/Object;)Ljava/lang/invoke/MethodHandle;
 6: java/lang/invoke/StringConcatFactory: prepender(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/MethodHandle;
 7: java/lang/invoke/StringConcatFactory: prepender(Ljava/lang/String;Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/MethodHandle;
 8: java/lang/invoke/StringConcatFactory: prepender(I[Ljava/lang/String;[Ljava/lang/Class;I)Ljava/lang/invoke/MethodHandle;
 9: java/lang/invoke/StringConcatFactory: filterInPrependers(Ljava/lang/invoke/MethodHandle;[Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/invoke/MethodHandle;
10: java/lang/invoke/StringConcatFactory: generateMHInlineCopy(Ljava/lang/invoke/MethodType;[Ljava/lang/String;)Ljava/lang/invoke/MethodHandle;
11: java/lang/invoke/StringConcatFactory: makeConcatWithConstants(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;
12: java/lang/invoke/DirectMethodHandle$Holder: invokeStatic(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
13: java/lang/invoke/DelegatingMethodHandle$Holder: delegate(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
14: java/lang/invoke/Invokers$Holder: invokeExact_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
15: java/lang/invoke/BootstrapMethodInvoker: invoke(Ljava/lang/Class;Ljava/lang/invoke/MethodHandle;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;
16: java/lang/invoke/CallSite: makeSite(Ljava/lang/invoke/MethodHandle;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/invoke/CallSite;
17: java/lang/invoke/MethodHandleNatives: linkCallSiteImpl(Ljava/lang/Class;Ljava/lang/invoke/MethodHandle;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;
18: java/lang/invoke/MethodHandleNatives: linkCallSite(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;
19: GetStackTraceSuspendedStressTest: producer(Ljava/lang/String;)V
20: GetStackTraceSuspendedStressTest: producer()V
21: GetStackTraceSuspendedStressTest: lambda$static$0()V
22: GetStackTraceSuspendedStressTest$$Lambda.0x000001e801001c00: run()V
23: java/lang/Thread: runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V
24: java/lang/VirtualThread: run(Ljava/lang/Runnable;)V
25: java/lang/VirtualThread$VThreadContinuation$1: run()V
26: jdk/internal/vm/Continuation: enter0()V
27: jdk/internal/vm/Continuation: enter(Ljdk/internal/vm/Continuation;Z)V

JVMTI Stack Trace for thread ForkJoinPool-1-worker-2: frame count: 9
 0: jdk/internal/vm/Continuation: run()V
 1: java/lang/VirtualThread: runContinuation()V
 2: java/lang/VirtualThread$$Lambda.0x000001e8010502e0: run()V
 3: java/util/concurrent/ForkJoinTask$RunnableExecuteAction: exec()Z
 4: java/util/concurrent/ForkJoinTask: doExec()I
 5: java/util/concurrent/ForkJoinPool$WorkQueue: topLevelExec(Ljava/util/concurrent/ForkJoinTask;Ljava/util/concurrent/ForkJoinPool$WorkQueue;)V
 6: java/util/concurrent/ForkJoinPool: scan(Ljava/util/concurrent/ForkJoinPool$WorkQueue;II)I
 7: java/util/concurrent/ForkJoinPool: runWorker(Ljava/util/concurrent/ForkJoinPool$WorkQueue;)V
 8: java/util/concurrent/ForkJoinWorkerThread: run()V

FATAL ERROR in native method: SingleStep event is NOT expected
	at java.lang.invoke.BoundMethodHandle$Species_LL.make(java.base@22-internal/java/lang/invoke/BoundMethodHandle$Species_LL)
	at java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.base@22-internal/DirectMethodHandle$Holder)
	at java.lang.invoke.BoundMethodHandle$Species_L.copyWithExtendL(java.base@22-internal/BoundMethodHandle.java:236)
	at java.lang.invoke.LambdaFormEditor.bindArgumentL(java.base@22-internal/LambdaFormEditor.java:524)
	at java.lang.invoke.BoundMethodHandle.bindArgumentL(java.base@22-internal/BoundMethodHandle.java:72)
	at java.lang.invoke.MethodHandles.insertArguments(java.base@22-internal/MethodHandles.java:5278)
	at java.lang.invoke.StringConcatFactory.prepender(java.base@22-internal/StringConcatFactory.java:708)
	at java.lang.invoke.StringConcatFactory.prepender(java.base@22-internal/StringConcatFactory.java:777)
	at java.lang.invoke.StringConcatFactory.prepender(java.base@22-internal/StringConcatFactory.java:789)
	at java.lang.invoke.StringConcatFactory.filterInPrependers(java.base@22-internal/StringConcatFactory.java:621)
	at java.lang.invoke.StringConcatFactory.generateMHInlineCopy(java.base@22-internal/StringConcatFactory.java:549)
	at java.lang.invoke.StringConcatFactory.makeConcatWithConstants(java.base@22-internal/StringConcatFactory.java:365)
	at java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.base@22-internal/DirectMethodHandle$Holder)
	at java.lang.invoke.DelegatingMethodHandle$Holder.delegate(java.base@22-internal/DelegatingMethodHandle$Holder)
	at java.lang.invoke.Invokers$Holder.invokeExact_MT(java.base@22-internal/Invokers$Holder)
	at java.lang.invoke.BootstrapMethodInvoker.invoke(java.base@22-internal/BootstrapMethodInvoker.java:102)
	at java.lang.invoke.CallSite.makeSite(java.base@22-internal/CallSite.java:316)
	at java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(java.base@22-internal/MethodHandleNatives.java:275)
	at java.lang.invoke.MethodHandleNatives.linkCallSite(java.base@22-internal/MethodHandleNatives.java:265)
	at GetStackTraceSuspendedStressTest.producer(GetStackTraceSuspendedStressTest.java:50)
	at GetStackTraceSuspendedStressTest.producer(GetStackTraceSuspendedStressTest.java:57)
	at GetStackTraceSuspendedStressTest.lambda$static$0(GetStackTraceSuspendedStressTest.java:78)
	at GetStackTraceSuspendedStressTest$$Lambda/0x000001e801001c00.run(Unknown Source)
	at java.lang.Thread.runWith(java.base@22-internal/Thread.java:1583)
	at java.lang.VirtualThread.run(java.base@22-internal/VirtualThread.java:311)
	at java.lang.VirtualThread$VThreadContinuation$1.run(java.base@22-internal/VirtualThread.java:190)
	at jdk.internal.vm.Continuation.enter0(java.base@22-internal/Continuation.java:320)
	at jdk.internal.vm.Continuation.enter(java.base@22-internal/Continuation.java:312)
----------System.err:(0/0)----------
----------rerun:(44/8807)*----------

<snip>

result: Failed. Unexpected exit from test [exit code: 134]

I don't see any indicators that this failure is related to JDK-8315880
but I have not seen any sightings of this test failing like this in
the Oracle CIs. This is a JVM/TI stress test so I'm starting this
bug off in hotspot/jvmti for initial triage. There is also Loom
related code in the stack trace above the failure point so I've
added the 'loom' tag.
Comments
This is one of the tests which are not easy to stabilize. It has multiple issues related to -Xcomp, interp-only mode and deoptimiize a lot. There is a chance it is a test issue but I'm not that sure about it.
09-05-2024

Here's a log file snippet from the jdk-23+6-399-tier4 CI job set: serviceability/jvmti/stress/StackTrace/Suspended/GetStackTraceSuspendedStressTest.java #section:main ----------messages:(6/357)---------- command: main -agentlib:GetStackTraceSuspendedStress GetStackTraceSuspendedStressTest reason: User specified action: run main/othervm/native -agentlib:GetStackTraceSuspendedStress GetStackTraceSuspendedStressTest started: Thu Jan 18 10:53:35 UTC 2024 Mode: othervm [/othervm specified] finished: Thu Jan 18 10:54:04 UTC 2024 elapsed time (seconds): 28.741 ----------configuration:(0/0)---------- ----------System.out:(67/6387)---------- Agent_OnLoad started Agent_OnLoad finished Synchronization point checkStatus(0) called. Data 0x7fdd5401fd60 0x7fdd54020180 Agent: waiting to start Agent: started Agent: Got SingleStep event: JVMTI Stack Trace for thread VThread-Producer-1: frame count: 22 0: java/lang/invoke/BoundMethodHandle$Species_LL: make(Ljava/lang/invoke/MethodType;Ljava/lang/invoke/LambdaForm;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/invoke/BoundMethodHandle; 1: java/lang/invoke/DirectMethodHandle$Holder: invokeStatic(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 2: java/lang/invoke/BoundMethodHandle$Species_L: copyWithExtendL(Ljava/lang/invoke/MethodType;Ljava/lang/invoke/LambdaForm;Ljava/lang/Object;)Ljava/lang/invoke/BoundMethodHandle; 3: java/lang/invoke/LambdaFormEditor: bindArgumentL(Ljava/lang/invoke/BoundMethodHandle;ILjava/lang/Object;)Ljava/lang/invoke/BoundMethodHandle; 4: java/lang/invoke/BoundMethodHandle: bindArgumentL(ILjava/lang/Object;)Ljava/lang/invoke/BoundMethodHandle; 5: java/lang/invoke/MethodHandles: insertArguments(Ljava/lang/invoke/MethodHandle;I[Ljava/lang/Object;)Ljava/lang/invoke/MethodHandle; 6: java/lang/invoke/StringConcatFactory: generateMHInlineCopy(Ljava/lang/invoke/MethodType;[Ljava/lang/String;)Ljava/lang/invoke/MethodHandle; 7: java/lang/invoke/StringConcatFactory: makeConcatWithConstants(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; 8: java/lang/invoke/DirectMethodHandle$Holder: invokeStatic(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 9: java/lang/invoke/DelegatingMethodHandle$Holder: delegate(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 10: java/lang/invoke/Invokers$Holder: invokeExact_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 11: java/lang/invoke/BootstrapMethodInvoker: invoke(Ljava/lang/Class;Ljava/lang/invoke/MethodHandle;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object; 12: java/lang/invoke/CallSite: makeSite(Ljava/lang/invoke/MethodHandle;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/invoke/CallSite; 13: java/lang/invoke/MethodHandleNatives: linkCallSiteImpl(Ljava/lang/Class;Ljava/lang/invoke/MethodHandle;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName; 14: java/lang/invoke/MethodHandleNatives: linkCallSite(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName; 15: GetStackTraceSuspendedStressTest: lambda$static$0()V 16: GetStackTraceSuspendedStressTest$$Lambda.0x00007fdce3001c00: run()V 17: java/lang/Thread: runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V 18: java/lang/VirtualThread: run(Ljava/lang/Runnable;)V 19: java/lang/VirtualThread$VThreadContinuation$1: run()V 20: jdk/internal/vm/Continuation: enter0()V 21: jdk/internal/vm/Continuation: enter(Ljdk/internal/vm/Continuation;Z)V JVMTI Stack Trace for thread ForkJoinPool-1-worker-3: frame count: 11 0: jdk/internal/vm/Continuation: run()V 1: java/lang/VirtualThread: runContinuation()V 2: java/lang/VirtualThread$$Lambda.0x00007fdce30504e0: run()V 3: java/util/concurrent/ForkJoinTask$RunnableExecuteAction: compute()Ljava/lang/Void; 4: java/util/concurrent/ForkJoinTask$RunnableExecuteAction: compute()Ljava/lang/Object; 5: java/util/concurrent/ForkJoinTask$InterruptibleTask: exec()Z 6: java/util/concurrent/ForkJoinTask: doExec()V 7: java/util/concurrent/ForkJoinPool$WorkQueue: topLevelExec(Ljava/util/concurrent/ForkJoinTask;Ljava/util/concurrent/ForkJoinPool$WorkQueue;I)V 8: java/util/concurrent/ForkJoinPool: scan(Ljava/util/concurrent/ForkJoinPool$WorkQueue;JI)J 9: java/util/concurrent/ForkJoinPool: runWorker(Ljava/util/concurrent/ForkJoinPool$WorkQueue;)V 10: java/util/concurrent/ForkJoinWorkerThread: run()V FATAL ERROR in native method: SingleStep event is NOT expected at java.lang.invoke.BoundMethodHandle$Species_LL.make(java.base@23-ea/java/lang/invoke/BoundMethodHandle$Species_LL) at java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.base@23-ea/DirectMethodHandle$Holder) at java.lang.invoke.BoundMethodHandle$Species_L.copyWithExtendL(java.base@23-ea/BoundMethodHandle.java:236) at java.lang.invoke.LambdaFormEditor.bindArgumentL(java.base@23-ea/LambdaFormEditor.java:524) at java.lang.invoke.BoundMethodHandle.bindArgumentL(java.base@23-ea/BoundMethodHandle.java:72) at java.lang.invoke.MethodHandles.insertArguments(java.base@23-ea/MethodHandles.java:5299) at java.lang.invoke.StringConcatFactory.generateMHInlineCopy(java.base@23-ea/StringConcatFactory.java:476) at java.lang.invoke.StringConcatFactory.makeConcatWithConstants(java.base@23-ea/StringConcatFactory.java:365) at java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.base@23-ea/DirectMethodHandle$Holder) at java.lang.invoke.DelegatingMethodHandle$Holder.delegate(java.base@23-ea/DelegatingMethodHandle$Holder) at java.lang.invoke.Invokers$Holder.invokeExact_MT(java.base@23-ea/Invokers$Holder) at java.lang.invoke.BootstrapMethodInvoker.invoke(java.base@23-ea/BootstrapMethodInvoker.java:102) at java.lang.invoke.CallSite.makeSite(java.base@23-ea/CallSite.java:316) at java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(java.base@23-ea/MethodHandleNatives.java:275) at java.lang.invoke.MethodHandleNatives.linkCallSite(java.base@23-ea/MethodHandleNatives.java:265) at GetStackTraceSuspendedStressTest.lambda$static$0(GetStackTraceSuspendedStressTest.java:77) at GetStackTraceSuspendedStressTest$$Lambda/0x00007fdce3001c00.run(Unknown Source) at java.lang.Thread.runWith(java.base@23-ea/Thread.java:1588) at java.lang.VirtualThread.run(java.base@23-ea/VirtualThread.java:329) at java.lang.VirtualThread$VThreadContinuation$1.run(java.base@23-ea/VirtualThread.java:209) at jdk.internal.vm.Continuation.enter0(java.base@23-ea/Continuation.java:320) at jdk.internal.vm.Continuation.enter(java.base@23-ea/Continuation.java:312) ----------System.err:(0/0)---------- ----------rerun:(44/8014)*----------
18-01-2024

I've attached the log for the failing adhoc Tier4 run: dcubed-8315880_for_jdk22.git-20230916-0332-51497782-tier4-comp-open_test_hotspot_jtreg_hotspot_serviceability-linux-aarch64-debug-53-1694840544-172.log
17-09-2023