On Wed, 11 Feb 2026 01:21:23 GMT, Yasumasa Suenaga <[email protected]> wrote:

> We've introduced new test TestJhsdbJstackMixedCore.java in 
> [JDK-8374482](https://bugs.openjdk.org/browse/JDK-8374482) to check mixed 
> jstack could unwind signal trampoline on Linux AMD64. However it did not work 
> with following error in some case. We saw it on Oracle Linux 8.10 
> intermittently.
> 
> 
> java.lang.NullPointerException: Cannot invoke 
> "sun.jvm.hotspot.debugger.Address.addOffsetTo(long)" because "this.cfa" is 
> null
> at 
> jdk.hotspot.agent/sun.jvm.hotspot.debugger.linux.amd64.LinuxAMD64CFrame.getNextRSP(LinuxAMD64CFrame.java:143)
> at 
> jdk.hotspot.agent/sun.jvm.hotspot.debugger.linux.amd64.LinuxAMD64CFrame.sender(LinuxAMD64CFrame.java:189)
> at jdk.hotspot.agent/sun.jvm.hotspot.tools.PStack.run(PStack.java:195)
> at jdk.hotspot.agent/sun.jvm.hotspot.tools.PStack.run(PStack.java:65)
> at jdk.hotspot.agent/sun.jvm.hotspot.tools.PStack.run(PStack.java:60)
> at jdk.hotspot.agent/sun.jvm.hotspot.tools.JStack.run(JStack.java:67)
> at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:278)
> at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.start(Tool.java:241)
> at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.execute(Tool.java:134)
> at jdk.hotspot.agent/sun.jvm.hotspot.tools.JStack.runWithArgs(JStack.java:90)
> at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runJSTACK(SALauncher.java:306)
> at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:507)
> 
> 
> It was caused by incorrect calculation for virtual address alignment. It 
> exists before JDK-8374482. We aligned `base address + virtual address` in 
> ELF, but it should be aligned virtual address only.
> 
> This fix works fine with the coredump which we saw the error in above, and 
> also it passed CI on Oracle Linux 8.10.
> 
> Thanks a lot @plummercj for your help!

Looks good!

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

Marked as reviewed by cjplummer (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/29662#pullrequestreview-3782660482

Reply via email to