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

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

XMLWordPrintable

    • b79

        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.

          There are no Sub-Tasks for this issue.

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

                Created:
                Updated:
                Resolved: