JDK-8247940 : SA tests failed with "Error attaching to process: Doesn't appear to be a HotSpot VM"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc-agent
  • Affected Version: 16,17,18,21,22,23,24
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: os_x
  • CPU: x86_64,aarch64
  • Submitted: 2020-06-19
  • Updated: 2024-10-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.
Other
tbdUnresolved
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Sub Tasks
JDK-8339825 :  
Description
The following test failed in the JDK16 CI:

serviceability/sa/ClhsdbAttach.java

Here's a snippet from the log file:

----------System.out:(74/5079)----------
Starting ClhsdbAttach test
Command line: ['/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-16+3-42/macosx-x64-debug.jdk/jdk-16/fastdebug/bin/java' '-XX:MaxRAMPercentage=6' '-Xshare:off' '-showversion' '-cp' '/System/Volumes/Data/mesos/work_dir/slaves/52628e90-e5e7-4ef3-af97-10d8776d10db-S857/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/80a54f56-be5e-493b-bc0e-4d0ffca2388c/runs/24b6faa8-5201-457c-806f-9ffa24f279aa/testoutput/test-support/jtreg_open_test_hotspot_jtreg_tier1_serviceability/classes/2/serviceability/sa/ClhsdbAttach.d:/System/Volumes/Data/mesos/work_dir/slaves/52628e90-e5e7-4ef3-af97-10d8776d10db-S857/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/80a54f56-be5e-493b-bc0e-4d0ffca2388c/runs/24b6faa8-5201-457c-806f-9ffa24f279aa/testoutput/test-support/jtreg_open_test_hotspot_jtreg_tier1_serviceability/classes/2/test/lib' 'jdk.test.lib.apps.LingeredApp' '4746a893-7c5c-4917-b5f9-3d684f2582d9.lck']
Started LingeredApp with pid 9403
Target JDK is not signed.
Adding 'sudo -E -n' to the command.
[2020-06-19T06:58:04.868478Z] Gathering output for process 9407
[2020-06-19T06:58:15.093093Z] Waiting for completion for process 9407
[2020-06-19T06:58:15.093475Z] Waiting for completion finished for process 9407
Output: 
hsdb> hsdb> + verbose true
hsdb> + where
Command not valid until attached to a VM
hsdb> + attach 9403
hsdb> + flags MaxJavaStackTraceDepth
Command not valid until attached to a VM
hsdb> + detach
Command not valid until attached to a VM
hsdb> + universe
Command not valid until attached to a VM
hsdb> + reattach
hsdb> + longConstant markWord::locked_value
Command not valid until attached to a VM
hsdb> + quit
java version "16-ea" 2021-03-16
Java(TM) SE Runtime Environment (fastdebug build 16-ea+3-42)
Java HotSpot(TM) 64-Bit Server VM (fastdebug build 16-ea+3-42, mixed mode)
Attaching to process 9403, please wait...
Unable to connect to process ID 9403:

Doesn't appear to be a HotSpot VM (could not find symbol
"gHotSpotVMStructEntryTypeNameOffset" in remote process)
sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMStructEntryTypeNameOffset" in remote process)
	at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:431)
	at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:330)
	at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:139)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.attachDebugger(CLHSDB.java:180)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB$2.attach(CLHSDB.java:75)
	at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$2.doit(CommandProcessor.java:411)
	at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2051)
	at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2021)
	at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.run(CommandProcessor.java:1901)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:99)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:40)
	at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runCLHSDB(SALauncher.java:280)
	at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:483)
Attaching to process 9403, please wait...
Unable to connect to process ID 9403:

Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in
remote process)
sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in remote process)
	at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:431)
	at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:330)
	at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:139)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.attachDebugger(CLHSDB.java:180)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB$2.attach(CLHSDB.java:75)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB$2.reattach(CLHSDB.java:88)
	at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$1.doit(CommandProcessor.java:402)
	at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2051)
	at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2021)
	at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.run(CommandProcessor.java:1901)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:99)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:40)
	at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runCLHSDB(SALauncher.java:280)
	at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:483)

[2020-06-19T06:58:15.107355Z] Waiting for completion for process 9407
[2020-06-19T06:58:15.107524Z] Waiting for completion finished for process 9407
 LingeredApp stdout: [];
 LingeredApp stderr: [java version "16-ea" 2021-03-16
Java(TM) SE Runtime Environment (fastdebug build 16-ea+3-42)
Java HotSpot(TM) 64-Bit Server VM (fastdebug build 16-ea+3-42, mixed mode)
]
 LingeredApp exitValue = 0
----------System.err:(85/5656)----------
java version "16-ea" 2021-03-16
Java(TM) SE Runtime Environment (fastdebug build 16-ea+3-42)
Java HotSpot(TM) 64-Bit Server VM (fastdebug build 16-ea+3-42, mixed mode)
 stdout: [hsdb> hsdb> + verbose true
hsdb> + where
Command not valid until attached to a VM
hsdb> + attach 9403
hsdb> + flags MaxJavaStackTraceDepth
Command not valid until attached to a VM
hsdb> + detach
Command not valid until attached to a VM
hsdb> + universe
Command not valid until attached to a VM
hsdb> + reattach
hsdb> + longConstant markWord::locked_value
Command not valid until attached to a VM
hsdb> + quit
];
 stderr: [java version "16-ea" 2021-03-16
Java(TM) SE Runtime Environment (fastdebug build 16-ea+3-42)
Java HotSpot(TM) 64-Bit Server VM (fastdebug build 16-ea+3-42, mixed mode)
Attaching to process 9403, please wait...
Unable to connect to process ID 9403:

Doesn't appear to be a HotSpot VM (could not find symbol
"gHotSpotVMStructEntryTypeNameOffset" in remote process)
sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMStructEntryTypeNameOffset" in remote process)
	at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:431)
	at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:330)
	at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:139)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.attachDebugger(CLHSDB.java:180)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB$2.attach(CLHSDB.java:75)
	at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$2.doit(CommandProcessor.java:411)
	at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2051)
	at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2021)
	at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.run(CommandProcessor.java:1901)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:99)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:40)
	at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runCLHSDB(SALauncher.java:280)
	at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:483)
Attaching to process 9403, please wait...
Unable to connect to process ID 9403:

Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in
remote process)
sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in remote process)
	at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:431)
	at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:330)
	at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:139)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.attachDebugger(CLHSDB.java:180)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB$2.attach(CLHSDB.java:75)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB$2.reattach(CLHSDB.java:88)
	at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$1.doit(CommandProcessor.java:402)
	at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2051)
	at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2021)
	at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.run(CommandProcessor.java:1901)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:99)
	at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:40)
	at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runCLHSDB(SALauncher.java:280)
	at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:483)
]
 exitValue = 0

java.lang.RuntimeException: Test ERROR java.lang.RuntimeException: '^sun.jvm.hotspot.debugger.DebuggerException:.*$' found in stderr: 'sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMStructEntryTypeNameOffset" in remote process)' 

	at ClhsdbAttach.main(ClhsdbAttach.java:75)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.RuntimeException: '^sun.jvm.hotspot.debugger.DebuggerException:.*$' found in stderr: 'sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMStructEntryTypeNameOffset" in remote process)' 

	at jdk.test.lib.process.OutputAnalyzer.shouldNotMatch(OutputAnalyzer.java:372)
	at ClhsdbLauncher.runCmd(ClhsdbLauncher.java:148)
	at ClhsdbLauncher.run(ClhsdbLauncher.java:200)
	at ClhsdbAttach.main(ClhsdbAttach.java:71)
	... 6 more

JavaTest Message: Test threw exception: java.lang.RuntimeException: Test ERROR java.lang.RuntimeException: '^sun.jvm.hotspot.debugger.DebuggerException:.*$' found in stderr: 'sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMStructEntryTypeNameOffset" in remote process)' 

JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Test ERROR java.lang.RuntimeException: '^sun.jvm.hotspot.debugger.DebuggerException:.*$' found in stderr: 'sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMStructEntryTypeNameOffset" in remote process)'
----------rerun:(34/6234)*----------


This failure happened on a macOSX 10.15.5 machine which
is a very recent update.
Comments
Hello Chris, > [~jpai] Shouldn't the synchronization done in LinuxDebuggerLocalWorkerThread run() and execute() methods preclude the need for volatile. I think you are right and my theory about the missing volatile may not be accurate. I'll have to read up a bit about the memory model expected semantics to be sure.
05-10-2024

[~jpai] Shouldn't the synchronization done in LinuxDebuggerLocalWorkerThread run() and execute() methods preclude the need for volatile. If not, it seems we also need volatile on LookupByAddressTask.addr and LinuxDebuggerLocalWorkerThread.task. And there are other WorkerThreadTask sub-classes that would also need volatile added to some fields.
04-10-2024

Looking at the code in question in src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/bsd/BsdDebuggerLocal.java, there appear to be two threads involved. The symbol lookup happens in a task, through a worker thread, and the main thread waits for the result of that task. Upon completion of the task, the main thread picks up and returns the result set by the worker thread. That code is here https://github.com/openjdk/jdk/blob/master/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/bsd/BsdDebuggerLocal.java#L358 and looks like: class LookupByNameTask implements WorkerThreadTask { String objectName, symbol; Address result; public void doit(BsdDebuggerLocal debugger) { long addr = debugger.lookupByName0(objectName, symbol); result = (addr == 0 ? null : new BsdAddress(debugger, handleGCC32ABI(addr, symbol))); } } LookupByNameTask task = new LookupByNameTask(); task.objectName = objectName; task.symbol = symbol; workerThread.execute(task); return task.result; I suspect the "Address result;" field in LookupByNameTask is missing a "volatile" on it, which in theory could make the main thread read a null "task.result" even if a non-null value was computed and set in the task (by the worker thread). A null return from this method would then translate into the NoSuchSymbolException being observed in these test failures.
04-10-2024

The issue disappeared from the 21u and 17u GHA runs. I am not aware of what might have caused this.
26-09-2024

Are there any details on the hosts that this is reproducing on (other than I believe it is always macosx-aarch64)?
13-09-2024

We see errors like this with various Clhsdb tests in the GHA tests of jdk21u*. Almost every run has one or two of these failures, rarely they succeed. A short overview: ClhsdbDumpheap, ClhsdbSymbol https://github.com/openjdk/jdk21u-dev/pull/966 ClhsdbDumpheap, https://github.com/openjdk/jdk21u-dev/pull/969 https://github.com/openjdk/jdk21u-dev/pull/970 ClhsdbDumpheap, ClhsdbFindPC https://github.com/openjdk/jdk21u-dev/pull/972 ClhsdbFindPC, ClshdbPstack https://github.com/openjdk/jdk21u-dev/pull/967 https://github.com/openjdk/jdk21u-dev/pull/968
13-09-2024

GHA of jdk23u (https://github.com/openjdk-bots/jdk23u/actions/runs/10768363660/job/29868047902) report the similar failure from ClhsdbPstack.java#process and ClhsdbSource.java: Attaching to process 4365, please wait... hsdb> hsdb> + verbose true hsdb> + pstack -v Command not valid until attached to a VM hsdb> + quit Unable to connect to process ID 4365: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in remote process) sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in remote process) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:428) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:338) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:142) at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.attachDebugger(CLHSDB.java:188) at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:67) at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:44) at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runCLHSDB(SALauncher.java:281) at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:500) Caused by: sun.jvm.hotspot.debugger.NoSuchSymbolException: Could not find symbol "gHotSpotVMTypes" in any of the known library names (libjvm.dylib) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotTypeDataBase.lookupInProcess(HotSpotTypeDataBase.java:622) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotTypeDataBase.readVMTypes(HotSpotTypeDataBase.java:154) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotTypeDataBase.<init>(HotSpotTypeDataBase.java:89) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:419) ... 7 more
12-09-2024

jdk21u-dev also seen this failure: https://github.com/sendaoYan/jdk21u-dev-ysd/actions/runs/10774948680/job/29907380098 Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in remote process) sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in remote process) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:428) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:338) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:142) at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.attachDebugger(CLHSDB.java:188) at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:67) at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:44) at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runCLHSDB(SALauncher.java:281) at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:500) Caused by: sun.jvm.hotspot.debugger.NoSuchSymbolException: Could not find symbol "gHotSpotVMTypes" in any of the known library names (libjvm.dylib) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotTypeDataBase.lookupInProcess(HotSpotTypeDataBase.java:622) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotTypeDataBase.readVMTypes(HotSpotTypeDataBase.java:154) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotTypeDataBase.<init>(HotSpotTypeDataBase.java:89) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:419) ... 7 more
10-09-2024

This seems to be quite a bit more common now. Recent failures mostly seem to by zgc testing with virtual threads. As I mentioned early, sun/tools/jhsdb/JStackStressTest.java does 4 back to back attaches. Maybe that has something to do with the issue. Possibly a short delay between attaches would help. UPDATE: One problem with adding a short delay is that is has to be very short because the purpose of the test is to do repeated jstacks as the process (jshell) is starting up. We want the jstacks to be done while the process is actively executing java code, not after it has finished starting and is essentially idol.
17-04-2024

Here's a log file snippet from the jdk-23+8-505-tier5 sighting: sun/tools/jhsdb/JStackStressTest.java #section:main ----------messages:(7/346)---------- command: main JStackStressTest reason: User specified action: run main/timeout=240 JStackStressTest started: Mon Jan 29 15:30:37 GMT 2024 Mode: othervm [test requires non-default system module] Additional options from @modules: --add-modules jdk.hotspot.agent,java.management finished: Mon Jan 29 15:30:42 GMT 2024 elapsed time (seconds): 5.582 ----------configuration:(3/61)---------- Boot Layer add modules: jdk.hotspot.agent java.management ----------System.out:(53/3640)---------- STDOUT: Executable=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-23+8-505/macosx-aarch64-debug.jdk/jdk-23/fastdebug/bin/java STDOUT: Identifier=com.oracle.java.java STDOUT: Format=Mach-O thin (arm64) STDOUT: CodeDirectory v=20400 size=749 flags=0x2(adhoc) hashes=13+7 location=embedded Target JDK is adhoc signed, but not hardened. STDOUT: Signature=adhoc STDOUT: Info.plist entries=5 STDOUT: TeamIdentifier=not set STDOUT: Sealed Resources=none STDOUT: Internal requirements count=0 size=12 DevToolsSecurity stdout: Developer mode is currently enabled. DevToolsSecurity stderr: Starting Jshell [JShell]:/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-23+8-505/macosx-aarch64-debug.jdk/jdk-23/fastdebug/bin/jshell -J-Xmx768m -J-XX:MaxRAMPercentage=6.25 -J-Dtest.boot.jdk=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk/21/35/bundles/macos-aarch64/jdk-21_macos-aarch64_bin.tar.gz/jdk-21.jdk/Contents/Home -J-Djava.io.tmpdir=/System/Volumes/Data/mesos/work_dir/slaves/73e57426-9086-438c-bf1c-51bfaf1790ad-S29316/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8b22c8e0-fbb9-4b9b-866d-235ab63735ff/runs/dbe4a4e2-7d88-4095-ad08-368c5a47d7d4/testoutput/test-support/jtreg_open_test_jdk_svc_tools/tmp -J-ea -J-esa -J-Duse.JTREG_TEST_THREAD_FACTORY=Virtual -J-XX:+UseZGC -J-XX:-VerifyContinuations [2024-01-29T15:30:37.643567Z] Gathering output for process 40474 ###### Starting jstack iteration 1 against 40474 DevToolsSecurity stdout: Developer mode is currently enabled. DevToolsSecurity stderr: [2024-01-29T15:30:37.680573Z] Gathering output for process 40476 [2024-01-29T15:30:37.680789Z] Waiting for completion for process 40476 [2024-01-29T15:30:37.953796Z] Waiting for completion finished for process 40476 Output and diagnostic info for process 40476 was saved into 'pid-40476-output.log' jhsdb jstack stdout: Attaching to process ID 40474, please wait... jhsdb jstack stderr: Error attaching to process: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in remote process) sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in remote process) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:428) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:338) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:142) at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.start(Tool.java:203) 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:302) at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:500) Caused by: sun.jvm.hotspot.debugger.NoSuchSymbolException: Could not find symbol "gHotSpotVMTypes" in any of the known library names (libjvm.dylib) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotTypeDataBase.lookupInProcess(HotSpotTypeDataBase.java:622) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotTypeDataBase.readVMTypes(HotSpotTypeDataBase.java:154) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotTypeDataBase.<init>(HotSpotTypeDataBase.java:89) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:419) ... 7 more ###### End of all output for iteration 1 which took 379ms
29-01-2024

Here's a log file snippet for the dk-18+11-535-tier3 sighting: serviceability/sa/ClhsdbWhere.java ----------System.out:(40/3281)---------- Starting ClhsdbWhere test Command line: ['/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-18+11-535/macosx-x64-debug.jdk/jdk-18/fastdebug/bin/java' '-XX:MaxRAMPercentage=4.16667' '-Djava.io.tmpdir=/System/Volumes/Data/mesos/work_dir/slaves/ff806ead-2cac-495d-9cbc-62116f99bf14-S27966/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/0f44af31-fc78-49dd-be3a-0ec0db7475bd/runs/9ab3f3ba-58c7-42ab-945e-64f6b435cf00/testoutput/test-support/jtreg_open_test_hotspot_jtreg_tier1_serviceability/tmp' '-Xshare:off' '-showversion' '-cp' '/System/Volumes/Data/mesos/work_dir/slaves/ff806ead-2cac-495d-9cbc-62116f99bf14-S27966/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/0f44af31-fc78-49dd-be3a-0ec0db7475bd/runs/9ab3f3ba-58c7-42ab-945e-64f6b435cf00/testoutput/test-support/jtreg_open_test_hotspot_jtreg_tier1_serviceability/classes/5/serviceability/sa/ClhsdbWhere.d:/System/Volumes/Data/mesos/work_dir/slaves/ff806ead-2cac-495d-9cbc-62116f99bf14-S27966/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/0f44af31-fc78-49dd-be3a-0ec0db7475bd/runs/9ab3f3ba-58c7-42ab-945e-64f6b435cf00/testoutput/test-support/jtreg_open_test_hotspot_jtreg_tier1_serviceability/classes/5/test/lib' 'jdk.test.lib.apps.LingeredApp' '95094e4d-f6bc-4dca-9a85-0209c9c08dd5.lck'] Started LingeredApp with pid 38591 Target JDK is not signed. Starting clhsdb against 38591 Adding 'sudo -E -n' to the command. [2021-08-17T01:32:18.966389Z] Gathering output for process 38601 [2021-08-17T01:32:20.270518Z] Waiting for completion for process 38601 [2021-08-17T01:32:20.270754Z] Waiting for completion finished for process 38601 Output: Attaching to process 38591, please wait... hsdb> hsdb> + verbose true hsdb> + where -a Command not valid until attached to a VM hsdb> + quit java version "18-ea" 2022-03-15 Java(TM) SE Runtime Environment (fastdebug build 18-ea+11-535) Java HotSpot(TM) 64-Bit Server VM (fastdebug build 18-ea+11-535, mixed mode) Unable to connect to process ID 38591: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMIntConstantEntryNameOffset" in remote process) sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMIntConstantEntryNameOffset" in remote process) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:438) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:337) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:141) at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.attachDebugger(CLHSDB.java:188) at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:67) at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:44) at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runCLHSDB(SALauncher.java:281) at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:500) [2021-08-17T01:32:20.284816Z] Waiting for completion for process 38601 [2021-08-17T01:32:20.284995Z] Waiting for completion finished for process 38601 LingeredApp stdout: []; LingeredApp stderr: [java version "18-ea" 2022-03-15 Java(TM) SE Runtime Environment (fastdebug build 18-ea+11-535) Java HotSpot(TM) 64-Bit Server VM (fastdebug build 18-ea+11-535, mixed mode) ] LingeredApp exitValue = 0 ----------System.err:(50/3485)----------
25-08-2021

tools/jhsdb/JStackStressTest.java failed with "could not find symbol "gHotSpotVMTypes" in remote process" jhsdb jstack stdout: Attaching to process ID 80725, please wait... jhsdb jstack stderr: Error attaching to process: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in remote process) sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in remote process) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:432) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:331) at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:140) at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.start(Tool.java:203) 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:303) at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:493)
23-04-2021

Just to clarify, the DebuggerException happens early on during the "attach 9403" command. It appears out of order in the log since it is written to stderr instead of stdout. This is also why right after the "attach 9403" command, the "flags MaxJavaStackTraceDepth" command is failing.
19-06-2020