RFR: JDK-821430: .attach_pid files may remain in the process cwd

Gary Adams gary.adams at oracle.com
Thu Nov 29 16:24:26 UTC 2018


If a process exits during an attempt to attach to it, the .attach_pid file
will not be removed properly, if the path used included symbolic link 
traversal,
which is typically done for "/proc/<pid>/cwd/". Using getCanonicalFile() 
before the
initial file is created should prevent this edge case for left over files.

   Webrev: http://cr.openjdk.java.net/~gadams/8214300/webrev.00/index.html
   Issue: https://bugs.openjdk.java.net/browse/JDK-8214300

Testing is in progress for every attach test I can find, but there is no
explicit test available for the case where the attachee exits while the 
attacher
is making the initial connection.


More information about the serviceability-dev mailing list