PING: RFR: 8205992: jhsdb cannot attach to Java processes running in Docker containers

Yasumasa Suenaga yasuenag at gmail.com
Thu Jul 12 05:29:05 UTC 2018


Thanks Jini!

I'm waiting for Reviewer.


Yasumasa



2018-07-12 14:09 GMT+09:00 Jini George <jini.george at oracle.com>:
> Looks good to me.
>
> Thanks!
> Jini (Not a Reviewer).
>
>
> On 7/12/2018 10:12 AM, Yasumasa Suenaga wrote:
>>
>> Thanks Jini,
>>
>> I uploaded new webrev. It contains some comments and removing extra space.
>>
>> http://cr.openjdk.java.net/~ysuenaga/JDK-8205992/webrev.01/
>>
>>
>> Yasumasa
>>
>>
>>
>> 2018-07-12 2:32 GMT+09:00 Jini George <jini.george at oracle.com>:
>>>
>>> Hi Yasumasa,
>>>
>>> This looks good to me except for one nit. And some more comments would
>>> help.
>>> For e.g., it would help to say that NSPidMap is to map the host to
>>> container
>>> lwpids.
>>>
>>> The nit:
>>>
>>> *
>>>
>>> http://cr.openjdk.java.net/~ysuenaga/JDK-8205992/webrev.00/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.c.sdiff.html
>>> Line 253: extra space after the parentheses
>>>
>>> Thanks,
>>> Jini.
>>>
>>> On 7/4/2018 4:34 AM, Yasumasa Suenaga wrote:
>>>>
>>>>
>>>> PING: Could you review it?
>>>>
>>>>>    JBS:    https://bugs.openjdk.java.net/browse/JDK-8205992
>>>>>    webrev: http://cr.openjdk.java.net/~ysuenaga/JDK-8205992/webrev.00/
>>>>
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Yasumasa
>>>>
>>>>
>>>> On 2018/06/28 22:12, Yasumasa Suenaga wrote:
>>>>>
>>>>>
>>>>> 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
>>>>>
>>>
>


More information about the serviceability-dev mailing list