Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8179498 attach in linux should be relative to /proc/pid/root and namespace aware
  3. JDK-8187592

docs need to describe special considerations for using the Attach API with docker



    • Sub-task
    • Resolution: Fixed
    • P3
    • 10
    • 10
    • docs
    • None


      JDK-8179498 (the parent of this CR) describes a feature request to make the Attach API work better between a linux host and the docker containers it launches. Logically these containers are running on different machines/devices, and the Attach API does between 2 differences devices. However, since the the linux host has access to the processes in the docker containers, the Attach API can be made to work between them with some modifications and described in JDK-8179498.

      Since JDK-8179498 is being pushed to 10, this enhancement should be documented. However, what should also be documented is a gap in the full docker support as also noted in JDK-8179498. More specifically, the host has no ability to find and list all the JVMs running in the docker containers. This means, for instance, they won't show up in the "jcmd -l" output, and also won't be discovered when using "jcmd <MyClassName>". Instead you need to provide the PID of the JVM process you want to attach to. Other tools that use the Attach API will show similar JVM discovery issues, but I don't know these tools well enough to say exactly how they would manifest.


        Issue Links



              ssatish Savitha Satish
              cjplummer Chris Plummer
              0 Vote for this issue
              3 Start watching this issue