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

On linux with the old thread lib, jps should return the same PID as $!

    Details

    • Subcomponent:
    • Introduced In Build:
      b59
    • Introduced In Version:
      6
    • Resolved In Build:
      b67
    • CPU:
      generic
    • OS:
      generic, linux

      Description

      In 5.0, if you do this:

       .../java Hello &
        
      You will be told a PID for the process. This PID is also in shell var $!.
      If you then to a jps command, you will see this PID reported for
      this java process. This is the PID that is given to the other command
      line tools, jstat, jstack, jconsole, jmap.

      After the fix for
           6316197 Java launcher should create JVM from non-primordial thread

      the above is no longer true on linux systems running the old thread lib,
      eg, RH AS 2.1. Instead, jps will report the PID of the new thread
      created by the Java launcher. After the fix for
        6348630: initial thread != primordial thread confuses attach tests (LinuxThreads only)

      the command line tools must be given the PID reported by jps
      instead of the pid reported by the shell in $!.

      This should be fixed so that the old behavior returns, ie, so
      that the PID reported by jps is the same as the PID reported by $!
      so that the command line tools on linux-with-old-threads behave the
      same way as they do on other platforms.
      The following is the list of the jtreg tests affected by this bug:
        com/sun/tools/attach/BasicTests.sh
        com/sun/tools/attach/PermissionTests.sh
        com/sun/tools/attach/ProviderTests.sh
        sun/tools/jstack/Basic.sh
        sun/tools/jmap/Basic.sh
        com/sun/jdi/ProcessAttachTest.sh
        sun/management/jmxremote/bootstrap/LocalManagementTest.sh

      The jstack and jmap tests (and maybe attach tests too) were changed to silently pass
      without execution on old Linux systems with LinuxThreads.
      They have to be fixed back in the SDK build b68.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sspitsyn Serguei Spitsyn
                Reporter:
                jjh James Holmlund (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: