JDK-8366269 : SA tests are failing: NullPointerException during stackwalking
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc-agent
  • Affected Version: 26
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2025-08-27
  • Updated: 2025-08-29
  • Resolved: 2025-08-29
Related Reports
Causes :  
Duplicate :  
Description
Tests affected so far:

sun/tools/jhsdb/JShellHeapDumpTest.java
serviceability/sa/ClhsdbJstackWithConcurrentLock.java
serviceability/sa/ClhsdbWhere.java
serviceability/sa/TestClhsdbJstackLock.java
serviceability/sa/TestJhsdbJstackUpcall.java
serviceability/sa/ClhsdbJstack.java


Starting ClhsdbJstack test
Command line: ['c:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-26+13-1329\\windows-x64-debug.jdk\\jdk-26\\fastdebug\\bin\\java.exe' '-XX:MaxRAMPercentage=4.16667' '-Dtest.boot.jdk=c:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk\\24\\36\\bundles\\windows-x64\\jdk-24_windows-x64_bin.zip\\jdk-24' '-Djava.io.tmpdir=c:\\sb\\prod\\1756304690\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_tier1_serviceability\\tmp' '-XX:+CreateCoredumpOnCrash' '-XX:AOTCache=c:\\sb\\prod\\1756304690\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_tier1_serviceability\\aot\\jdk.aotcache' '-XX:+AOTClassLinking' '-Xcomp' '-cp' 'C:\\sb\\prod\\1756304690\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_tier1_serviceability\\classes\\1\\serviceability\\sa\\ClhsdbJstack_id0.d;C:\\sb\\prod\\1756304690\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_tier1_serviceability\\classes\\1\\test\\lib' 'jdk.test.lib.apps.LingeredApp' '270ca23c-fbc3-4149-8857-d0eee989a173.lck']
LingeredApp startup took 13102ms
Check for hs_err_pid/core/mdmp files:
None.
Started LingeredApp (-Xcomp) with pid 56368
Starting clhsdb against 56368
[2025-08-27T14:30:03.147811900Z] Gathering output for process 32836
[2025-08-27T14:30:13.028793100Z] Waiting for completion for process 32836
[2025-08-27T14:30:13.028793100Z] Waiting for completion finished for process 32836
Output: 
[0.025s][error][aot] An error has occurred while processing the AOT cache. Run with -Xlog:aot for details.
[0.025s][error][aot] Mismatched values for property jdk.module.main: jdk.hotspot.agent specified during runtime but not during dump time
[0.025s][error][aot] Disabling optimized module handling
[0.025s][error][aot] AOT cache has aot-linked classes. It cannot be used when archived full module graph is not used.
[0.025s][error][aot] Unable to map shared spaces
Attaching to process 56368, please wait...
hsdb> hsdb> + verbose true
hsdb> + jstack -v
Deadlock Detection:

No deadlocks found.

"main" #3 prio=5 tid=0x000002565d4bdd80 nid=68652 waiting on condition [0x000000c075aff000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
   JavaThread state: _thread_blocked

Error occurred during stack walking:
java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.addOffsetTo(long)" because the return value of "sun.jvm.hotspot.code.NMethod.immutableDataBegin()" is null
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.scopesPCsBegin(NMethod.java:144)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getPCDescNearDbg(NMethod.java:328)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getScopeDescNearDbg(NMethod.java:427)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VFrame.newVFrame(VFrame.java:74)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:236)
	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)

"Reference Handler" #14 daemon prio=10 tid=0x0000025679861a20 nid=12704 waiting on condition [0x000000c0762fe000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked

Error occurred during stack walking:
java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.addOffsetTo(long)" because the return value of "sun.jvm.hotspot.code.NMethod.immutableDataBegin()" is null
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.scopesPCsBegin(NMethod.java:144)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getPCDescNearDbg(NMethod.java:328)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getScopeDescNearDbg(NMethod.java:427)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VFrame.newVFrame(VFrame.java:74)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:236)
	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)

"Finalizer" #15 daemon prio=8 tid=0x00000256798626f0 nid=44512 in Object.wait() [0x000000c0763fe000]
   java.lang.Thread.State: WAITING (on object monitor)
   JavaThread state: _thread_blocked

Error occurred during stack walking:
java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.addOffsetTo(long)" because the return value of "sun.jvm.hotspot.code.NMethod.immutableDataBegin()" is null
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.scopesPCsBegin(NMethod.java:144)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getPCDescNearDbg(NMethod.java:328)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getScopeDescNearDbg(NMethod.java:427)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VFrame.newVFrame(VFrame.java:74)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:236)
	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)

"Signal Dispatcher" #16 daemon prio=9 tid=0x00000256798637d0 nid=25008 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked

"Attach Listener" #17 daemon prio=5 tid=0x00000256798655e0 nid=71684 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked

"Common-Cleaner" #24 daemon prio=8 tid=0x000002567f683da0 nid=45252 in Object.wait() [0x000000c076aff000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
   JavaThread state: _thread_blocked

Error occurred during stack walking:
java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.addOffsetTo(long)" because the return value of "sun.jvm.hotspot.code.NMethod.immutableDataBegin()" is null
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.scopesPCsBegin(NMethod.java:144)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getPCDescNearDbg(NMethod.java:328)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getScopeDescNearDbg(NMethod.java:427)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VFrame.newVFrame(VFrame.java:74)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:236)
	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)

"Notification Thread" #26 daemon prio=9 tid=0x000002567f5fe000 nid=27148 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked

"SteadyStateThread" #27 prio=5 tid=0x000002560035c260 nid=55612 waiting for monitor entry [0x000000c076dff000]
   java.lang.Thread.State: BLOCKED (on object monitor)
   JavaThread state: _thread_blocked
 - jdk.test.lib.apps.LingeredApp.steadyState(java.lang.Object) @bci=7, line=566, pc=0x0000025666027930, Method*=0x000002567a403b38 (Compiled frame)
	- waiting to lock <0x00000000d7eadbb8> (a jdk.test.lib.apps.LingeredApp$SteadyStateLock)
 - jdk.test.lib.apps.LingeredApp$1.run() @bci=4, line=573, pc=0x0000025666027514, Method*=0x000002567a404668 (Compiled frame)

hsdb> + quit

 LingeredApp stdout: [];
 LingeredApp stderr: []
 LingeredApp exitValue = 0
----------System.err:(238/16704)*----------
 stdout: [ + jstack -v
Deadlock Detection:

No deadlocks found.

"main" #3 prio=5 tid=0x000002565d4bdd80 nid=68652 waiting on condition [0x000000c075aff000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
   JavaThread state: _thread_blocked

Error occurred during stack walking:
java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.addOffsetTo(long)" because the return value of "sun.jvm.hotspot.code.NMethod.immutableDataBegin()" is null
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.scopesPCsBegin(NMethod.java:144)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getPCDescNearDbg(NMethod.java:328)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getScopeDescNearDbg(NMethod.java:427)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VFrame.newVFrame(VFrame.java:74)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:236)
	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)

"Reference Handler" #14 daemon prio=10 tid=0x0000025679861a20 nid=12704 waiting on condition [0x000000c0762fe000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked

Error occurred during stack walking:
java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.addOffsetTo(long)" because the return value of "sun.jvm.hotspot.code.NMethod.immutableDataBegin()" is null
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.scopesPCsBegin(NMethod.java:144)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getPCDescNearDbg(NMethod.java:328)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getScopeDescNearDbg(NMethod.java:427)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VFrame.newVFrame(VFrame.java:74)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:236)
	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)

"Finalizer" #15 daemon prio=8 tid=0x00000256798626f0 nid=44512 in Object.wait() [0x000000c0763fe000]
   java.lang.Thread.State: WAITING (on object monitor)
   JavaThread state: _thread_blocked

Error occurred during stack walking:
java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.addOffsetTo(long)" because the return value of "sun.jvm.hotspot.code.NMethod.immutableDataBegin()" is null
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.scopesPCsBegin(NMethod.java:144)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getPCDescNearDbg(NMethod.java:328)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getScopeDescNearDbg(NMethod.java:427)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VFrame.newVFrame(VFrame.java:74)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:236)
	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)

"Signal Dispatcher" #16 daemon prio=9 tid=0x00000256798637d0 nid=25008 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked

"Attach Listener" #17 daemon prio=5 tid=0x00000256798655e0 nid=71684 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked

"Common-Cleaner" #24 daemon prio=8 tid=0x000002567f683da0 nid=45252 in Object.wait() [0x000000c076aff000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
   JavaThread state: _thread_blocked

Error occurred during stack walking:
java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.addOffsetTo(long)" because the return value of "sun.jvm.hotspot.code.NMethod.immutableDataBegin()" is null
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.scopesPCsBegin(NMethod.java:144)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getPCDescNearDbg(NMethod.java:328)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getScopeDescNearDbg(NMethod.java:427)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VFrame.newVFrame(VFrame.java:74)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:236)
	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)

"Notification Thread" #26 daemon prio=9 tid=0x000002567f5fe000 nid=27148 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked

"SteadyStateThread" #27 prio=5 tid=0x000002560035c260 nid=55612 waiting for monitor entry [0x000000c076dff000]
   java.lang.Thread.State: BLOCKED (on object monitor)
   JavaThread state: _thread_blocked
 - jdk.test.lib.apps.LingeredApp.steadyState(java.lang.Object) @bci=7, line=566, pc=0x0000025666027930, Method*=0x000002567a403b38 (Compiled frame)
	- waiting to lock <0x00000000d7eadbb8> (a jdk.test.lib.apps.LingeredApp$SteadyStateLock)
 - jdk.test.lib.apps.LingeredApp$1.run() @bci=4, line=573, pc=0x0000025666027514, Method*=0x000002567a404668 (Compiled frame)

];
 stderr: [ + jstack -v
Deadlock Detection:

No deadlocks found.

"main" #3 prio=5 tid=0x000002565d4bdd80 nid=68652 waiting on condition [0x000000c075aff000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
   JavaThread state: _thread_blocked

Error occurred during stack walking:
java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.addOffsetTo(long)" because the return value of "sun.jvm.hotspot.code.NMethod.immutableDataBegin()" is null
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.scopesPCsBegin(NMethod.java:144)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getPCDescNearDbg(NMethod.java:328)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getScopeDescNearDbg(NMethod.java:427)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VFrame.newVFrame(VFrame.java:74)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:236)
	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)

"Reference Handler" #14 daemon prio=10 tid=0x0000025679861a20 nid=12704 waiting on condition [0x000000c0762fe000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked

Error occurred during stack walking:
java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.addOffsetTo(long)" because the return value of "sun.jvm.hotspot.code.NMethod.immutableDataBegin()" is null
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.scopesPCsBegin(NMethod.java:144)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getPCDescNearDbg(NMethod.java:328)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getScopeDescNearDbg(NMethod.java:427)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VFrame.newVFrame(VFrame.java:74)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:236)
	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)

"Finalizer" #15 daemon prio=8 tid=0x00000256798626f0 nid=44512 in Object.wait() [0x000000c0763fe000]
   java.lang.Thread.State: WAITING (on object monitor)
   JavaThread state: _thread_blocked

Error occurred during stack walking:
java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.addOffsetTo(long)" because the return value of "sun.jvm.hotspot.code.NMethod.immutableDataBegin()" is null
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.scopesPCsBegin(NMethod.java:144)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getPCDescNearDbg(NMethod.java:328)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getScopeDescNearDbg(NMethod.java:427)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VFrame.newVFrame(VFrame.java:74)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:236)
	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)

"Signal Dispatcher" #16 daemon prio=9 tid=0x00000256798637d0 nid=25008 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked

"Attach Listener" #17 daemon prio=5 tid=0x00000256798655e0 nid=71684 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked

"Common-Cleaner" #24 daemon prio=8 tid=0x000002567f683da0 nid=45252 in Object.wait() [0x000000c076aff000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
   JavaThread state: _thread_blocked

Error occurred during stack walking:
java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.addOffsetTo(long)" because the return value of "sun.jvm.hotspot.code.NMethod.immutableDataBegin()" is null
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.scopesPCsBegin(NMethod.java:144)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getPCDescNearDbg(NMethod.java:328)
	at jdk.hotspot.agent/sun.jvm.hotspot.code.NMethod.getScopeDescNearDbg(NMethod.java:427)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VFrame.newVFrame(VFrame.java:74)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:236)
	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)

"Notification Thread" #26 daemon prio=9 tid=0x000002567f5fe000 nid=27148 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked

"SteadyStateThread" #27 prio=5 tid=0x000002560035c260 nid=55612 waiting for monitor entry [0x000000c076dff000]
   java.lang.Thread.State: BLOCKED (on object monitor)
   JavaThread state: _thread_blocked
 - jdk.test.lib.apps.LingeredApp.steadyState(java.lang.Object) @bci=7, line=566, pc=0x0000025666027930, Method*=0x000002567a403b38 (Compiled frame)
	- waiting to lock <0x00000000d7eadbb8> (a jdk.test.lib.apps.LingeredApp$SteadyStateLock)
 - jdk.test.lib.apps.LingeredApp$1.run() @bci=4, line=573, pc=0x0000025666027514, Method*=0x000002567a404668 (Compiled frame)

]
 exitValue = -1

java.lang.RuntimeException: Test ERROR (with -Xcomp=true) java.lang.RuntimeException: 'java.lang.ref.Finalizer\\$FinalizerThread.run' missing from stdout/stderr
	at ClhsdbJstack.testJstack(ClhsdbJstack.java:82)
	at ClhsdbJstack.main(ClhsdbJstack.java:91)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1474)
Caused by: java.lang.RuntimeException: 'java.lang.ref.Finalizer\\$FinalizerThread.run' missing from stdout/stderr
	at jdk.test.lib.process.OutputAnalyzer.shouldMatch(OutputAnalyzer.java:372)
	at ClhsdbLauncher.runCmd(ClhsdbLauncher.java:175)
	at ClhsdbLauncher.run(ClhsdbLauncher.java:212)
	at ClhsdbJstack.testJstack(ClhsdbJstack.java:78)
	... 5 more

JavaTest Message: Test threw exception: java.lang.RuntimeException: Test ERROR (with -Xcomp=true) java.lang.RuntimeException: 'java.lang.ref.Finalizer\\$FinalizerThread.run' missing from stdout/stderr
Comments
[~coleenp]This needs to be fixed as part of the redo of JDK-8366341. It can't be done before or after.
29-08-2025

We don't really want this closed because we want to reintegrate JDK-8366341 once this is fixed.
29-08-2025

Re-Closed as Duplicate
29-08-2025

Fixed by backing out in https://bugs.openjdk.org/browse/JDK-8366341 (switched resolution from Fixed to Delivered)
28-08-2025

Fixed by backing out in https://bugs.openjdk.org/browse/JDK-8366341
28-08-2025

We see similar failures in our CI in test sun/tools/jhsdb/JShellHeapDumpTest.java .
28-08-2025

It seems like when _immutable_data is null, the returned Address is the Java null object, when it probably should be Address(0).
28-08-2025

Same issue with test: sun/tools/jhsdb/JShellHeapDumpTest.java
28-08-2025