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.
EVALUATION
This is a duplicate of 7019226 G1: There are exceptions in LowMemoryThread (used Memory > commited)
which is deferred. The exception IllegalArgumentException is thrown in the <init> function for the newly created MemoryPool object in MemoryService::create_MemoryUsage_obj so it returns null. The caller is:
43 JNIEXPORT jobject JNICALL
44 Java_sun_management_MemoryPoolImpl_getUsage0
45 (JNIEnv *env, jobject pool)
46 {
47 jobject usage = jmm_interface->GetMemoryPoolUsage(env, pool);
48 if (usage == NULL) {
49 // Throw internal error since this implementation expects the
50 // pool will never become invalid.
51 JNU_ThrowInternalError(env, "Memory Pool not found");
52 }
53 return usage;
54 }
Which throws the InternalError. Here's a trace of stopping with AbortVMOnException=java.lang.InternalError:
[Full GC 7762K->634K(5120K), 0.5041588 secs]
[Times: user=0.76 sys=0.00, real=0.50 secs]
# ERROR: MemoryMonitor > Unexpected exception while retrieving isCollectionUsageThresholdExceeded() for pool G1 Old Gen
java.lang.IllegalArgumentException: used = 6900216 should be <= committed = 6291456
at java.lang.management.MemoryUsage.<init>(MemoryUsage.java:158)
at sun.management.MemoryPoolImpl.getCollectionUsage0(Native Method)
at sun.management.MemoryPoolImpl.isCollectionUsageThresholdExceeded(MemoryPoolImpl.java:251)
at nsk.share.monitoring.MemoryMonitor$Polling.pollCollectionThresholds(MemoryMonitor.java:1484)
at nsk.share.monitoring.MemoryMonitor$Polling.run(MemoryMonitor.java:1270)
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/exceptions.cpp:403
==============================================================================
Unexpected Error
------------------------------------------------------------------------------
Internal Error at exceptions.cpp:403, pid=29109, tid=20
fatal error: Saw java.lang.InternalError, aborting
...
If anything needs to be fixed it is that all the functions in jdk/src/share/native/sun/management/MemoryPoolImpl.c that throw InternalError should propagate the exception returned from the jmm function rather than throwing InternalError. Also the error message should be changed because memory pools not found are not always the cause. Another low priority bug can be opened (point to this one) to improve error handling in this function.
This bug will be fixed when 7019226 is fixed so I'm closing as a duplicate.