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

.attach_pid files may remain in the process cwd

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8, 9, 10, 11, 12
    • Fix Version/s: 12
    • Component/s: core-svc
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b23

      Description

      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).

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: