JDK-8163272 : jhsdb jinfo cannot show system properties
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc-agent
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-08-05
  • Updated: 2018-01-17
  • Resolved: 2016-08-08
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 9
9 b133Fixed
Related Reports
Relates :  
Description
I tried to get system properties via "jhsdb jinfo".
However, it did not work as below:

----------------
$ /usr/local/jdk-9/bin/jhsdb jinfo --pid 1002
Attaching to process ID 1002, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 9-ea+129
Java System Properties:

java.lang.NullPointerException
        at sun.jvm.hotspot.utilities.ObjectReader.getHashtable(jdk.hotspot.agent@9-ea/ObjectReader.java:217)
        at sun.jvm.hotspot.utilities.ObjectReader.readInstance(jdk.hotspot.agent@9-ea/ObjectReader.java:247)
        at sun.jvm.hotspot.utilities.ObjectReader.readObject(jdk.hotspot.agent@9-ea/ObjectReader.java:105)
        at sun.jvm.hotspot.runtime.VM$2.doOop(jdk.hotspot.agent@9-ea/VM.java:940)
        at sun.jvm.hotspot.oops.InstanceKlass.visitField(jdk.hotspot.agent@9-ea/InstanceKlass.java:872)
        at sun.jvm.hotspot.oops.InstanceKlass.iterateStaticFieldsInternal(jdk.hotspot.agent@9-ea/InstanceKlass.java:572)
        at sun.jvm.hotspot.oops.InstanceKlass.iterateStaticFields(jdk.hotspot.agent@9-ea/InstanceKlass.java:560)
        at sun.jvm.hotspot.runtime.VM.readSystemProperties(jdk.hotspot.agent@9-ea/VM.java:935)
        at sun.jvm.hotspot.runtime.VM.getSystemProperties(jdk.hotspot.agent@9-ea/VM.java:928)
        at sun.jvm.hotspot.tools.SysPropsDumper.run(jdk.hotspot.agent@9-ea/SysPropsDumper.java:44)
        at sun.jvm.hotspot.tools.JInfo$1.run(jdk.hotspot.agent@9-ea/JInfo.java:80)
        at sun.jvm.hotspot.tools.JInfo.run(jdk.hotspot.agent@9-ea/JInfo.java:95)
        at sun.jvm.hotspot.tools.Tool.startInternal(jdk.hotspot.agent@9-ea/Tool.java:260)
        at sun.jvm.hotspot.tools.Tool.start(jdk.hotspot.agent@9-ea/Tool.java:223)
        at sun.jvm.hotspot.tools.Tool.execute(jdk.hotspot.agent@9-ea/Tool.java:118)
        at sun.jvm.hotspot.tools.JInfo.runWithArgs(jdk.hotspot.agent@9-ea/JInfo.java:139)
        at sun.jvm.hotspot.tools.JInfo.main(jdk.hotspot.agent@9-ea/JInfo.java:144)
        at sun.jvm.hotspot.SALauncher.runJINFO(jdk.hotspot.agent@9-ea/SALauncher.java:344)
        at sun.jvm.hotspot.SALauncher.main(jdk.hotspot.agent@9-ea/SALauncher.java:425)
System Properties info not available!
----------------

I think this is caused by JDK-8029891.
JDK-8029891 changes that j.u.Properties stores properties to j.u.c.ConcurrentHashMap.
ObjectReader should be adapted to this change.