Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8214300

.attach_pid files may remain in the process cwd

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 12
    • 8, 9, 10, 11, 12
    • core-svc
    • 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).

            gadams Gary Adams (Inactive)
            eushakov Egor Ushakov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: