I am getting Null Pointer Exceptions with both ClhsdbJstack.java and 
ClhsdbFindPC.java. It appears the addition of testing with  '-Xcomp` causing a 
Method to come back as null during the stack walk. I have included the results 
of the Jstack test (the FindPC is similar) for the Xcomp section below. I have 
created bug JDK-8196969<https://bugs.openjdk.java.net/browse/JDK-8196969>.  The 
full .jtr is attached there.  I am not familiar enough with the Java stack to 
know if having  a null Method pointer is valid or not.

Thanks,
Daniel

hsdb>
Command line: 
['/home/stewartd/openjdk/OpenJDK/hs/build/linux-aarch64-normal-server-release/images/jdk/bin/java'
 '-Xcomp' '-cp' 
'/home/stewartd/openjdk/OpenJDK/hs/JTwork/classes/serviceability/sa/ClhsdbJstack.d:/home/stewartd/openjdk/OpenJDK/hs/JTwork/classes/test/lib'
 'jdk.test.lib.apps.LingeredApp' '717a6b55-bcf8-405e-9d5a-afe1212f0fc6.lck' ]
Started LingeredApp (-Xcomp) with pid 23731
Starting clhsdb against 23731
Warning! JS Engine can't start, some commands will not be available.
hsdb> Deadlock Detection:

No deadlocks found.

"Common-Cleaner" #22 daemon prio=8 tid=0x0000ffffa0528000 nid=0x5d2d in 
Object.wait() [0x0000fffe427de000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
   JavaThread state: _thread_blocked
- java.lang.ref.ReferenceQueue.remove(long) @bci=59, line=151, 
pc=0x0000ffff892af7c4, Method*=0x0000fffe49851a98 (Compiled frame; information 
may be imprecise)
                - waiting to lock <0x0000000101c956f0> (a 
java.lang.ref.ReferenceQueue$Lock)
- jdk.internal.ref.CleanerImpl.run() @bci=65, line=148, pc=0x0000ffff892ac8e4, 
Method*=0x0000fffe49ab23d8 (Compiled frame)
- java.lang.Thread.run() @bci=11, line=844, pc=0x0000ffff892a9d30, 
Method*=0x0000fffe49738ee0 (Compiled frame)
- jdk.internal.misc.InnocuousThread.run() @bci=20, line=134, 
pc=0x0000ffff892a9d30, Method*=0x0000fffe49aba318 (Compiled frame)

Locked ownable synchronizers:
    - None

"Signal Dispatcher" #4 daemon prio=9 tid=0x0000ffffa04a6800 nid=0x5d05 runnable 
[0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked

Locked ownable synchronizers:
    - None

"Finalizer" #3 daemon prio=8 tid=0x0000ffffa0494000 nid=0x5d04 in Object.wait() 
[0x0000fffe492ee000]
   java.lang.Thread.State: WAITING (on object monitor)
   JavaThread state: _thread_blocked
- java.lang.ref.ReferenceQueue.remove(long) @bci=59, line=151, 
pc=0x0000ffff888e15a0, Method*=0x0000fffe49851a98 (Interpreted frame)
                - waiting to lock <0x0000000101c09528> (a 
java.lang.ref.ReferenceQueue$Lock)
- java.lang.ref.ReferenceQueue.remove() @bci=2, line=172, 
pc=0x0000ffff888e12c0, Method*=0x0000fffe49851b40 (Interpreted frame)
- java.lang.ref.Finalizer$FinalizerThread.run() @bci=37, line=216, 
pc=0x0000ffff888e12c0, Method*=0x0000fffe49856cb0 (Interpreted frame)

Locked ownable synchronizers:
    - None

"Reference Handler" #2 daemon prio=10 tid=0x0000ffffa0492000 nid=0x5d03 waiting 
on condition [0x0000fffe494ee000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked
- java.lang.ref.Reference.processPendingReferences() @bci=0, line=166, 
pc=0x0000ffff888e15a0, Method*=0x0000fffe49733100 (Interpreted frame)
- java.lang.ref.Reference.access$000() @bci=0, line=44, pc=0x0000ffff888e15a0, 
Method*=0x0000fffe49733788 (Interpreted frame)
- java.lang.ref.Reference$ReferenceHandler.run() @bci=0, line=138, 
pc=0x0000ffff888e15a0, Method*=0x0000fffe4984ffa0 (Interpreted frame)

Locked ownable synchronizers:
    - None

"main" #1 prio=5 tid=0x0000ffffa0010000 nid=0x5cb5 waiting on condition 
[0x0000ffffa5d2e000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
   JavaThread state: _thread_blocked
Error occurred during stack walking:

Locked ownable synchronizers:
    - None

hsdb>
----------System.err:(147/8216)----------
Attaching to process 23463, please wait...
javax.script.ScriptException: TypeError: sapkg.runtime.VM.getVM is not a 
function in sa.js at line number 54
javax.script.ScriptException: TypeError: sapkg.runtime.VM.getVM is not a 
function in sa.js at line number 54
Attaching to process 23731, please wait...
javax.script.ScriptException: TypeError: sapkg.runtime.VM.getVM is not a 
function in sa.js at line number 54
javax.script.ScriptException: TypeError: sapkg.runtime.VM.getVM is not a 
function in sa.js at line number 54
java.lang.NullPointerException
                at 
jdk.hotspot.agent/sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:83)
                at 
jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$26.doit(CommandProcessor.java:1073)
                at 
jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:1966)
                at 
jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:1936)
                at 
jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.run(CommandProcessor.java:1816)
                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:191)
                at 
jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:439)

Reply via email to