Fix looks good Yasumasa.
Thanks, Sharath (Not a Reviewer) -----Original Message----- From: Yasumasa Suenaga [mailto:[email protected]] Sent: Saturday, December 02, 2017 4:19 AM To: Sharath Ballal; [email protected] Subject: Re: RFR: 8192897: NPE occurs on clhsdb jstack Hi Sharath, I confirmed this issue with jshell and ClhsdbJstack with this change. You need to run the VM in current jdk/hs. Thanks, Yasumasa On 2017/12/02 1:22, Sharath Ballal wrote: > Hi Yasumasa, > I tried jhsdb with a simple HelloWorld (with -Xcomp) and did not see any > exception. > Your app does anything else ? > > Thanks, > Sharath > > > -----Original Message----- > From: Yasumasa Suenaga [mailto:[email protected]] > Sent: Friday, December 01, 2017 7:26 PM > To: [email protected] > Subject: RFR: 8192897: NPE occurs on clhsdb jstack > > 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 >
