[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8265505: findsym does not work on remote debug server [v2]
From:       Yasumasa Suenaga <ysuenaga () openjdk ! java ! net>
Date:       2021-04-25 2:08:31
Message-ID: -GGoLAFTdcm55ZYO7pkOwclHH2BUPaXeFoQviRUnQWk=.4fd5d698-99bd-42e6-874f-b59c50c65193 () github ! com
[Download RAW message or body]

On Tue, 20 Apr 2021 23:18:43 GMT, Yasumasa Suenaga <ysuenaga@openjdk.org> wrote:

> > We can see following error when we run `findsym` on CLHSDB which connects to \
> > remote debug server. 
> > 
> > hsdb> verbose true
> > hsdb> findsym gHotSpotVMTypes
> > 0x00007f913d4a45b0Error: java.lang.NullPointerException: Cannot invoke \
> > "sun.jvm.hotspot.debugger.cdbg.CDebugger.loadObjectContainingPC(sun.jvm.hotspot.debugger.Address)" \
> >                 because "cdbg" is null
> > java.lang.NullPointerException: Cannot invoke \
> > "sun.jvm.hotspot.debugger.cdbg.CDebugger.loadObjectContainingPC(sun.jvm.hotspot.debugger.Address)" \
> > because "cdbg" is null at \
> > jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$7.doit(CommandProcessor.java:618)
> >  at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2116)
> >  at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2086)
> >  at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.run(CommandProcessor.java:1957)
> >  at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:112)
> > at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:44)
> > at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runCLHSDB(SALauncher.java:282)
> > at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:493)
> > 
> > 
> > The cause of this NPE is that CDebugger is null.  It happens when the debugger is \
> > running on debugd server. Command line debugger like CLHSDB can delegate the \
> > command to debugd, like `pmap` and `pstack`. `findsym` can also use this scheme. 
> > This PR has passed serviceability/sa tests on Linux x64.
> 
> Yasumasa Suenaga has updated the pull request incrementally with one additional \
> commit since the last revision: 
> Remove unused imports

This PR adds a new test \
[RunCommandOnServerTest.java](https://github.com/YaSuenag/jdk/blob/JDK-8265505/test/hotspot/jtreg/serviceability/sa/sadebugd/RunCommandOnServerTest.java). \
I confirmed it can be passed with ZGC on Linux x64. I'm waiting for second reviewer.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3582


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic