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

jcmd, windows x64: cannot list other processes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      svc
    • OS:
      windows

      Description

      On my local laptop, jcmd does not list any other processes but itself. I can attach just fine (via pid), just the listing fails.

      The setup is very simple.

      On my local machine, I build jdk-hs from the current tip. Then I run a simple java HelloWorld, without any options given. The program just waits on a keystroke.

      $ ../../openjdk/jdk-hs/output-fastdbg/images/jdk/bin/java HelloWorld

      Then I start jcmd from the same image with no special options.

      $ ./images/jdk/bin/jcmd
      248472 jdk.jcmd/sun.tools.jcmd.JCmd

      And I only see the jcmd process itself.

      Note that in this example I run from cygwin shells, but the same error happens when running from cmd.exe.

      Also note that I also have other java processes running on the same box, eg an Eclipse instance using openjdk9. It does not show up in the jcmd process listing either.

      I can attach to my HelloWorld process via pid:

      $ ./images/jdk/bin/jcmd 248204 help
      248204:
      The following commands are available:
      VM.log
      VM.native_memory
      .....

      But unsurprisingly not via name:

      $ ./images/jdk/bin/jcmd HelloWorld help
      Could not find any processes matching : 'HelloWorld'

      I took some minutes to check if the issue is easy to fix: - I set a native breakpoint at Java_sun_tools_attach_AttachProviderImpl_enumProcesses(), but never hit it. I did not have time to investigate further.

      My machine runs Windows 10.

        Attachments

          Activity

            People

            • Assignee:
              stuefe Thomas Stuefe
              Reporter:
              stuefe Thomas Stuefe
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: