RFR: 8263670: pmap and pstack in jhsdb do not work on debug server

Chris Plummer cjplummer at openjdk.java.net
Wed Mar 17 00:28:14 UTC 2021


On Tue, 16 Mar 2021 12:01:30 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:

> jhsdb supports pmap (jhsdb jmap) and pstack (jhsdb jstack --mixed), and they work fine if they attach to live process or to coredump, however they do not work on debug server as following:
> 
> $ jhsdb jmap --connect localhost
> Attaching to remote server localhost, please wait...
> Debugger attached successfully.
> Server compiler detected.
> JVM version is 11.0.10+9
> remote configuration is not yet implemented
> 
> pmap and pstack depend on CDebugger in SA, however it would not be set in case of remote debugger client. We can avoid it if we can delegate the process to debug server.

If I understand correctly, this is very different than the way we normally implement remote debugging support. Normally pages are read in from the remote VM process and into the local SA client, where it can then implement SA support in much the same way as it normally does. For PStack and PMap, you've chosen to instead just execute the commands in the remote debugd server, and return the (text) result to the client. It's not clear to me why the normal model (of reading in the remote pages and leveraging existing PStack and PMAp  supprt) can't instead be used so we can keep the remote debugging support consistent. How are PStack and PMap different from other SA support that does not require remote execution of commands.

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

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


More information about the serviceability-dev mailing list