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

Utils.tryFindJvmPid sometimes find incorrect pid

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u101, 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b131

      Backports

        Description

        In this case tryFindJvmPid incorrectly parses jcmd output
        31717 com.sun.javatest.regtest.agent.MainWrapper /scratch/export/local/aurora/sandbox/results/workDir/compiler/5091921/Test6186134.d/main.0.jta 100000
        31594 ContextThread uniquePidId-4249459111068453435
        31597 sun.tools.jcmd.JCmd -l
        ...
        findJvmPid.pid: 100000
        Command line: [/export/local/aurora/CommonData/TEST_JAVA_HOME/bin/java sun.tools.jcmd.JCmd 100000 Thread.print ]
        100000:
        java.io.IOException: No such process
            at sun.tools.attach.LinuxVirtualMachine.sendQuitTo(Native Method)
            at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:91)
            at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:63)
            at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:208)
            at sun.tools.jcmd.JCmd.executeCommandForPid(JCmd.java:147)
            at sun.tools.jcmd.JCmd.main(JCmd.java:131)

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  bmoloden Boris Molodenkov (Inactive)
                  Reporter:
                  bmoloden Boris Molodenkov (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: