RFR: 8192897: NPE occurs on clhsdb jstack

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: 8192897: NPE occurs on clhsdb jstack

Yasumasa Suenaga-4
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

Reply | Threaded
Open this post in threaded view
|

RE: RFR: 8192897: NPE occurs on clhsdb jstack

Sharath Ballal
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:[hidden email]]
Sent: Friday, December 01, 2017 7:26 PM
To: [hidden email]
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

Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8192897: NPE occurs on clhsdb jstack

Yasumasa Suenaga-4
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:[hidden email]]
> Sent: Friday, December 01, 2017 7:26 PM
> To: [hidden email]
> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8192897: NPE occurs on clhsdb jstack

serguei.spitsyn@oracle.com
In reply to this post by Yasumasa Suenaga-4
Hi Yasumasa,

The fix looks good.
Thank you for taking care about this issue.

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.

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


Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8192897: NPE occurs on clhsdb jstack

Yasumasa Suenaga-4
2017/12/02 8:43 "[hidden email]" <[hidden email]>:
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



Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8192897: NPE occurs on clhsdb jstack

David Holmes
In reply to this post by Yasumasa Suenaga-4
Hi Yasumasa,

On 1/12/2017 11:56 PM, 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.

How long does the test take to run with Xcomp? We have to watch
execution times for the tests in each tier.

Thanks,
David

>
> I cannot access mach5 and JPRT. So I need sponsor.
>
>
> Thanks,
>
> Yasumasa
>
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8192897: NPE occurs on clhsdb jstack

Yasumasa Suenaga-4
Hi David,

I got the result of execution time as below in ClhsdbJstack.jtr:

--------------
#-----testresult-----
description=file\:/home/ysuenaga/OpenJDK/jdk-hs/test/hotspot/jtreg/serviceability/sa/ClhsdbJstack.java
elapsed=24825 0\:00\:24.825
end=Mon Dec 04 09\:41\:41 JST 2017
--------------


Thanks,

Yasumasa



2017-12-04 5:38 GMT+09:00 David Holmes <[hidden email]>:

> Hi Yasumasa,
>
>
> On 1/12/2017 11:56 PM, 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.
>
>
> How long does the test take to run with Xcomp? We have to watch execution
> times for the tests in each tier.
>
> Thanks,
> David
>
>
>>
>> I cannot access mach5 and JPRT. So I need sponsor.
>>
>>
>> Thanks,
>>
>> Yasumasa
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8192897: NPE occurs on clhsdb jstack

David Holmes
On 4/12/2017 10:45 AM, Yasumasa Suenaga wrote:

> Hi David,
>
> I got the result of execution time as below in ClhsdbJstack.jtr:
>
> --------------
> #-----testresult-----
> description=file\:/home/ysuenaga/OpenJDK/jdk-hs/test/hotspot/jtreg/serviceability/sa/ClhsdbJstack.java
> elapsed=24825 0\:00\:24.825
> end=Mon Dec 04 09\:41\:41 JST 2017
> --------------

Thanks - no issue there.

David

>
> Thanks,
>
> Yasumasa
>
>
>
> 2017-12-04 5:38 GMT+09:00 David Holmes <[hidden email]>:
>> Hi Yasumasa,
>>
>>
>> On 1/12/2017 11:56 PM, 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.
>>
>>
>> How long does the test take to run with Xcomp? We have to watch execution
>> times for the tests in each tier.
>>
>> Thanks,
>> David
>>
>>
>>>
>>> I cannot access mach5 and JPRT. So I need sponsor.
>>>
>>>
>>> Thanks,
>>>
>>> Yasumasa
>>>
>>
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8192897: NPE occurs on clhsdb jstack

David Holmes
Sorry forgot to clearly say: Reviewed.

The fix is consistent with the other NULL checks applied to getScope().

David

On 4/12/2017 10:59 AM, David Holmes wrote:

> On 4/12/2017 10:45 AM, Yasumasa Suenaga wrote:
>> Hi David,
>>
>> I got the result of execution time as below in ClhsdbJstack.jtr:
>>
>> --------------
>> #-----testresult-----
>> description=file\:/home/ysuenaga/OpenJDK/jdk-hs/test/hotspot/jtreg/serviceability/sa/ClhsdbJstack.java
>>
>> elapsed=24825 0\:00\:24.825
>> end=Mon Dec 04 09\:41\:41 JST 2017
>> --------------
>
> Thanks - no issue there.
>
> David
>
>>
>> Thanks,
>>
>> Yasumasa
>>
>>
>>
>> 2017-12-04 5:38 GMT+09:00 David Holmes <[hidden email]>:
>>> Hi Yasumasa,
>>>
>>>
>>> On 1/12/2017 11:56 PM, 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.
>>>
>>>
>>> How long does the test take to run with Xcomp? We have to watch
>>> execution
>>> times for the tests in each tier.
>>>
>>> Thanks,
>>> David
>>>
>>>
>>>>
>>>> I cannot access mach5 and JPRT. So I need sponsor.
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Yasumasa
>>>>
>>>
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8192897: NPE occurs on clhsdb jstack

Jini George
In reply to this post by Yasumasa Suenaga-4
Hi Yasumasa,

Thanks for this. Looks good.

Thanks,
Jini. (Not a Reviewer).

On 12/1/2017 7:26 PM, 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
>
Reply | Threaded
Open this post in threaded view
|

RE: RFR: 8192897: NPE occurs on clhsdb jstack

Sharath Ballal
In reply to this post by Yasumasa Suenaga-4
Fix looks good Yasumasa.


Thanks,
Sharath (Not a Reviewer)


-----Original Message-----
From: Yasumasa Suenaga [mailto:[hidden email]]
Sent: Saturday, December 02, 2017 4:19 AM
To: Sharath Ballal; [hidden email]
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:[hidden email]]
> Sent: Friday, December 01, 2017 7:26 PM
> To: [hidden email]
> 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
>