-
Bug
-
Resolution: Fixed
-
P3
-
8, 9, 10, 11, 12
-
b23
On platforms where .attach_pid file is used to initate the attach it may remain in the process cwd after the attach attempt is finished.
Consider the sequence:
- attach process is started, VirtualMachineImpl.createAttachFile creates a file `"/proc/" + pid + "/cwd/" + ".attach_pid" + pid`
- process (pid) dies before we actually attached (and /proc/pid/cwd link is removed)
- after timeout it tries to delete .attach_pid file in the finally block and fail because cwd link from proc is no longer available
And the file remain in the real cwd folder (where /proc/pid/cwd link was pointing).
Consider the sequence:
- attach process is started, VirtualMachineImpl.createAttachFile creates a file `"/proc/" + pid + "/cwd/" + ".attach_pid" + pid`
- process (pid) dies before we actually attached (and /proc/pid/cwd link is removed)
- after timeout it tries to delete .attach_pid file in the finally block and fail because cwd link from proc is no longer available
And the file remain in the real cwd folder (where /proc/pid/cwd link was pointing).
- relates to
-
JDK-8228343 JCMD and attach fail to work across Linux Container boundary
-
- Resolved
-