JDK-8005936 : PrintNMTStatistics doesn't work for normal JVM exit
  • Type: Bug
  • Status: Closed
  • Resolution: Fixed
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Affected Version: hs24
  • Submit Date: 2013-01-09
  • Updated Date: 2014-06-26
  • Resolved Date: 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 Availabitlity Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u40Fixed 8Fixed
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