JDK-8075773 : jps running as root fails after the fix of JDK-8050807
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 7u76
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-03-23
  • Updated: 2016-01-29
  • Resolved: 2015-08-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 JDK 8 JDK 9 Other
6u101Fixed 7u85Fixed 8u60Fixed 9 b79Fixed openjdk7uFixed
Related Reports
Duplicate :  
Relates :  
Sub Tasks
JDK-8143549 :  
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.