JDK-8005936 : PrintNMTStatistics doesn't work for normal JVM exit
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs24
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-01-09
  • Updated: 2014-06-26
  • Resolved: 2013-07-02
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 7 JDK 8 Other
7u40Fixed 8Fixed hs24Fixed
Related Reports
Relates :  
Description
The PrintNMTStatistics flag doesn't work for normal JVM exit, works for Ctrl-C / sigint though. Turns out that print_memory_usage() is called but when trying to get the snapshot with get_snapshot() we return NULL since NMT is shutting down also.

Attaching reproducer from Filipp Zhinkin who found this issue, repro with:

java -XX:+UnlockDiagnosticVMOptions -XX:NativeMemoryTracking=detail -XX:+PrintNMTStatistics Test 5