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

jps running as root fails after the fix of JDK-8050807

    Details

    • Subcomponent:
    • Resolved In Build:
      b79

      Backports

        Description

        When running jps as root in solaris or linux, it should be able to display process information for all running java process in the system. This worked fine untill 7u72:
        For example:

        jps running In 7u72 solaris machine:
        7u72/bin/jps
        1771 ControlPanel
        722 Bootstrap
        1224 ContainerPrivate
        1637 swupna.jar
        1772 Jp

        jps running In 7u75 solaris machine:
        7u75/bin/jps
        1746 Jps
        1739 -- process information unavailable
        722 -- process information unavailable
        1224 ContainerPrivate
        1637 -- process information unavailable

        This bug has been introduced when fix JDK-8050807 was merged in JDK repository. In this fix UID of directory is matched with the effective Id of process. When JPS command is executed as root, it tries to read the process information from "/tmp/hsperfdata_$username_$ProcessID" file. Before reading the process file or directory, it checks if the file or directory is secure or not. It opens the user directory and match the UID of that directory (which belong to other user) with the current process(root-jps) effective ID,which gets fail and process returns failure.

          Issue Links

            Activity

            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/0762dac98888
            User: kevinw
            Date: 2015-08-06 15:41:30 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/0762dac98888 User: kevinw Date: 2015-08-06 15:41:30 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/0762dac98888
            User: lana
            Date: 2015-08-25 17:44:57 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/0762dac98888 User: lana Date: 2015-08-25 17:44:57 +0000

              People

              • Assignee:
                csahu Cheleswer Sahu (Inactive)
                Reporter:
                shadowbug Shadow Bug
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: