On Sat, 31 Oct 2026 04:06:35 GMT, Yasumasa Suenaga <[email protected]> wrote:
>> test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackWithVirtualThread.java
>> checks whether `jhsdb jstack` for VirtualThread works, and it seems to pass
>> so far. However .jtr file includes following lines. It would not trigger the
>> test failure.
>>
>>
>> "ForkJoinPool-1-worker-1" #24 daemon prio=5 tid=0x00007f9b0c4fb3e0 nid=91489
>> runnable [0x00007f9af18ff000]
>> java.lang.Thread.State: RUNNABLE
>> JavaThread state: _thread_in_native
>> -
>> java.lang.invoke.LambdaForm$MH+0x0000000070047800.invoke(java.lang.Object,
>> long, int) @bci=10 (Interpreted frame)
>> -
>> java.lang.invoke.LambdaForm$MH+0x000000007004d400.invokeExact_MT(java.lang.Object,
>> long, int, java.lang.Object) @bci=21 (Interpreted frame)
>> -
>> jdk.internal.foreign.abi.DowncallStub+0x0000000070048800.invoke(java.lang.foreign.SegmentAllocator,
>> java.lang.foreign.MemorySegment, int) @bci=44 (Interpreted frame)
>> -
>> java.lang.invoke.LambdaForm$DMH+0x0000000070048c00.invokeStaticInit(java.lang.Object,
>> java.lang.Object, java.lang.Object, int) @bci=14 (Interpreted frame)
>> -
>> java.lang.invoke.LambdaForm$MH+0x000000007004c800.invoke(java.lang.Object,
>> int) @bci=44 (Interpreted frame)
>> -
>> java.lang.invoke.LambdaForm$MH+0x000000007004c400.invoke_MT(java.lang.Object,
>> int, java.lang.Object) @bci=18 (Interpreted frame)
>> - LingeredAppWithVirtualThread.run() @bci=15, line=69 (Interpreted frame)
>>
>> Error occurred during stack walking:
>> sun.jvm.hotspot.debugger.UnalignedAddressException: Trying to read at
>> address: 0x000000000000000d with alignment: 8
>> at
>> jdk.hotspot.agent/sun.jvm.hotspot.debugger.DebuggerUtilities.checkAlignment(DebuggerUtilities.java:68)
>> at
>> jdk.hotspot.agent/sun.jvm.hotspot.debugger.DebuggerBase.readCInteger(DebuggerBase.java:352)
>> at
>> jdk.hotspot.agent/sun.jvm.hotspot.debugger.DebuggerBase.readAddressValue(DebuggerBase.java:385)
>> at
>> jdk.hotspot.agent/sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.readAddress(LinuxDebuggerLocal.java:493)
>> at
>> jdk.hotspot.agent/sun.jvm.hotspot.debugger.linux.LinuxAddress.getAddressAt(LinuxAddress.java:73)
>> at
>> jdk.hotspot.agent/sun.jvm.hotspot.runtime.amd64.AMD64Frame.getLink(AMD64Frame.java:453)
>> at
>> jdk.hotspot.agent/sun.jvm.hotspot.runtime.amd64.AMD64Frame.sender(AMD64Frame.java:304)
>> at jdk.hotspot.agent/sun.jvm.hotspot.runtime.Frame.sender(Frame.java:218)
>> at jdk.hotspot.agent/sun.jvm.hotspot.runtime.Frame.realSender(Frame.java:223)
>> at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VFrame.sender(VFrame.java:120)
>> at jdk.hotspot.agent/sun.jvm.hotspot.run...
>
> Yasumasa Suenaga has updated the pull request incrementally with one
> additional commit since the last revision:
>
> Add RISC-V change
>
> Contributed-by: @RealFYang
Thanks for the ping! I couldn't see the error on linuxppc64le. Neither with nor
without the change. Should we change it for consistency reasons?
diff --git
a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java
b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java
index a663d016011..bfb73d1fe50 100644
---
a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java
+++
b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java
@@ -337,7 +337,25 @@ private Frame senderForInterpreterFrame(PPC64RegisterMap
map) {
Address unextendedSP =
addressOfStackSlot(INTERPRETER_FRAME_SENDER_SP_OFFSET).getAddressAt(0);
Address sp = getSenderSP();
- return new PPC64Frame(sp, unextendedSP, getLink(), getSenderPC());
+ Address senderPC = getSenderPC();
+
+ if (Continuation.isReturnBarrierEntry(senderPC)) {
+ // We assume WalkContinuation is "WalkContinuation::skip".
+ // It is same with c'tor arguments of RegisterMap in frame::next_frame().
+ //
+ // frame::sender_for_interpreter_frame() in cpu/ppc/frame_ppc.cpp:
+ //
+ // if (Continuation::is_return_barrier_entry(sender_pc)) {
+ // if (map->walk_cont()) { // about to walk into an h-stack
+ // return Continuation::top_frame(*this, map);
+ // } else {
+ // return Continuation::continuation_bottom_sender(map->thread(),
*this, sender_sp);
+ // }
+ // }
+ return Continuation.continuationBottomSender(map.getThread(), this, sp);
+ }
+
+ return new PPC64Frame(sp, unextendedSP, getLink(), senderPC);
}
private Frame senderForCompiledFrame(PPC64RegisterMap map, CodeBlob cb) {
-------------
PR Comment: https://git.openjdk.org/jdk/pull/33656#issuecomment-6607513071