[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-serviceability-dev
Subject: RFR: 8205992: jhsdb cannot attach to Java processes running in Docker containers
From: Yasumasa Suenaga <yasuenag () gmail ! com>
Date: 2018-06-28 13:12:28
Message-ID: 5acf45c6-b666-f4f5-2947-8e026701b29a () gmail ! com
[Download RAW message or body]
Hi all,
Please review this change.
JBS: https://bugs.openjdk.java.net/browse/JDK-8205992
webrev: http://cr.openjdk.java.net/~ysuenaga/JDK-8205992/webrev.00/
I tried to attach jhsdb to java process in docker container from container host, but \
it couldn't. jcmd supports PID namespace in JDK-8193710, but jhsdb hasn't yet.
SA gets LWP ID via thread stack and funcs in libthread_db.so, but they returns PIDs \
in container - they are different from host's PID. So I added the code to scan \
/proc/<PID>/task to get all LWP IDs and they are kept in a Map in LinuxDebuggerLocal.
Also SA_ALTROOT is set to /proc/<PID>/root if SA detects debuggee runs in container. \
It helps SA to parse binaries in container.
This change has been pushed to submit repo, and it was failed on OS X \
(mach5-one-ysuenaga-JDK-8205992-20180628-1015-28963). But I guess it causes \
JDK-8205906. This change affects to Linux only.
Could you review it?
Thanks,
Yasumasa
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic