RFR: 8192897: NPE occurs on clhsdb jstack
Yasumasa Suenaga
yasuenag at gmail.com
Fri Dec 1 23:54:13 UTC 2017
2017/12/02 8:43 "serguei.spitsyn at oracle.com" <serguei.spitsyn at oracle.com>:
Hi Yasumasa,
The fix looks good.
Thank you for taking care about this issue.
Thanks Serguei!
One minor:
+ throw new RuntimeException("Test ERROR (with -Xcomp=" +
withXcomp + ") "+ ex, ex);
A space is missed before '+ ex'.
No need in new webrev if you fix it.
Oh, I will fix it.
I'm waiting for second reviewer and sponsor.
Thanks,
Yasumasa
Thanks,
Serguei
On 12/1/17 05:56, Yasumasa Suenaga wrote:
Hi all,
I saw NPE when I run jstack on clhsdb as below:
----------------
hsdb> jstack
Deadlock Detection:
No deadlocks found.
"NonBlockingInputStreamThread" #27 daemon prio=5 tid=0x00007f0924674000
nid=0xf429 in Object.wait() [0x00007f08cf6fd000]
java.lang.Thread.State: WAITING (on object monitor)
JavaThread state: _thread_blocked
- java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be
imprecise)
- waiting on <no object reference available>
Error occurred during stack walking:
java.lang.NullPointerException
at jdk.hotspot.agent/sun.jvm.hotspot.runtime.
CompiledVFrame.getMonitors(CompiledVFrame.java:131)
at jdk.hotspot.agent/sun.jvm.hotspot.runtime.JavaVFrame.
printLockInfo(JavaVFrame.java:125)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.StackTrace.run(
StackTrace.java:114)
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$26.
doit(CommandProcessor.java:1073)
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.
executeCommand(CommandProcessor.java:1964)
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.
executeCommand(CommandProcessor.java:1934)
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.run(
CommandProcessor.java:1814)
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)
----------------
It is caused by CompiledVFrame#getScope() returns null.
We should consider it at CompiledVFrame#getMonitors().
I uploaded a webrev. Could you review it?
I checked this change with hotspot/jtreg/serviceability/sa on Linux x64.
http://cr.openjdk.java.net/~ysuenaga/JDK-8192897/webrev.00/
We can reproduce this issue when we run the app with -Xcomp option.
So I changed ClhsdbJstack.java to run with it.
I cannot access mach5 and JPRT. So I need sponsor.
Thanks,
Yasumasa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20171202/8d76188f/attachment-0001.html>
More information about the serviceability-dev
mailing list