Hi Andrew, I followed the same steps as the serviceabilty/sa/ClhsdbJstack.java test. You can see this failing in Linaro's results here:
http://openjdk.linaro.org/jdkX/openjdk-jtreg-nightly-tests/builds/release/2019/028/JTwork-hotspot/serviceability/sa/ClhsdbJstack.jtr The stack trace you sent below is incomplete, it's missing the frame for Spinner.run (i.e. the AARCH64Frame object corresponding to the native wrapper frame). Did you try on x86 or with the patch I posted? I'm not able to test at the moment but I think you will get one exra frame in the output. I don't know why you don't get the NPE, I guess it depends on what's in that stack slot. Nick ________________________________ From: Andrew Haley <a...@redhat.com> Sent: 06 February 2019 01:26:41 To: Nick Gasson (Arm Technology China); serviceability-dev@openjdk.java.net Cc: nd; aarch64-port-...@openjdk.java.net Subject: [aarch64-port-dev ] RFR: 8209413: AArch64: NPE in clhsdb jstack command On 2/1/19 9:22 AM, Nick Gasson (Arm Technology China) wrote: > On AArch64, if you use "jhsdb clhsdb --pid=..." to attach a debugger to > a Java process, and then run "jstack -v" while any thread is executing a > native method, you will get a NullPointerException like this: This does not happen for me. I have a test case which runs a native method; the native method does not return. I then run jstack -v and get a clean stack trace, regardless of whether it's interpreted or compiled: "main" #1 prio=5 tid=0x0000ffff7001a000 nid=0x596c runnable [0x0000ffff7624e000] java.lang.Thread.State: RUNNABLE JavaThread state: _thread_in_native - Spinner.main(java.lang.String[]) @bci=0, line=9, pc=0x0000ffff6d6954d8, Method*=0x0000ffff2321e380 (Compiled frame; information may be imprecise) Locked ownable synchronizers: - None I tried various combinations of Xcomp and tiered compilation, release and debug builds. What did you do? -- Andrew Haley Java Platform Lead Engineer Red Hat UK Ltd. <https://www.redhat.com> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671