.attach_pid files may remain in the process cwd

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 12
    • Affects Version/s: 8, 9, 10, 11, 12
    • Component/s: 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).

            Assignee:
            Gary Adams (Inactive)
            Reporter:
            Egor Ushakov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: