RFR: JDK-821430: .attach_pid files may remain in the process cwd
JC Beyler
jcbeyler at google.com
Thu Nov 29 22:27:33 UTC 2018
Hi Gary,
Somehow I still see the same webrev? Has it been updated and my browser
does not want to update it?
Thanks!
Jc
On Thu, Nov 29, 2018 at 11:10 AM Gary Adams <gary.adams at oracle.com> wrote:
> Sorry, coding before coffee this morning.
>
> Fixed.
>
> On 11/29/18, 11:54 AM, JC Beyler wrote:
>
> Hi Gary,
>
> Is there a reason why only
> http://cr.openjdk.java.net/~gadams/8214300/webrev.00/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java.udiff.html
> actually has the assignment after the call ?
> f = f.getCanonicalFile()?
>
> (Nit, there seems to be a space missing before the =).
>
> In the other two files, you just call the method but don't update the
> variable f making the call useless, no? (The patch in the bug has the
> assigments for all the cases),
> Jc
>
>
> On Thu, Nov 29, 2018 at 8:23 AM Gary Adams <gary.adams at oracle.com> wrote:
>
>> 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.
>>
>
>
> --
>
> Thanks,
> Jc
>
>
>
--
Thanks,
Jc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20181129/7ff2b7b2/attachment.html>
More information about the serviceability-dev
mailing list