On Thu, 13 Nov 2025 12:53:50 GMT, Yasumasa Suenaga <[email protected]> wrote:

>> We've fixed mixed mode jstack for the debuggee running with `-Xcomp` in 
>> [JDK-8370176](https://bugs.openjdk.org/browse/JDK-8370176), but it was not 
>> enough. We need to handle like unifying `CFrame` and `Frame` in stack 
>> unwinding as possible, and need to change how to get caller SP/FP from stack.
>> 
>> This PR works fine on both Linux AMD64 and Linux AArch64. All of 
>> `hotspot/jtreg/serviceability/sa` tests have been passed on both platforms.
>> 
>> Big thanks to @pchilano for your help!
>
> Yasumasa Suenaga has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Update for Linux PPC64 and RISC-V

With your diffs ClhsdbPStack.java is passing but now I'm seeing issues with the 
following 3 core file tests on both aarch64 and x64:


serviceability/sa/ClhsdbFindPC.java#xcomp-core
serviceability/sa/ClhsdbFindPC.java#no-xcomp-core
serviceability/sa/ClhsdbCDSCore.java


In the log it is having trouble with the stack trace:


hsdb> + jstack -v
Deadlock Detection:

No deadlocks found.

"main" #3 prio=5 tid=0x00007fa48a809010 nid=10499 runnable [0x000070000b780000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_in_native

Error occurred during stack walking:
sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs failed for a lwp
        at 
jdk.hotspot.agent/sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal.getThreadIntegerRegisterSet0(Native
 Method)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal.getThreadIntegerRegisterSet(BsdDebuggerLocal.java:462)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.debugger.bsd.BsdThread.getContext(BsdThread.java:68)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.runtime.bsd_amd64.BsdAMD64JavaThreadPDAccess.getCurrentFrameGuess(BsdAMD64JavaThreadPDAccess.java:98)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.runtime.JavaThread.getCurrentFrameGuess(JavaThread.java:266)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:228)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:81)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$23.doit(CommandProcessor.java:1020)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2088)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2058)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.run(CommandProcessor.java:1929)
        at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:113)
        at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:45)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runCLHSDB(SALauncher.java:285)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:507)


This repeats for every thread.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/28284#issuecomment-3550910458

Reply via email to