RFR : JDK-8170299 - Debugger does not stop inside the low memory notifications code

Harsha Wardhana B harsha.wardhana.b at oracle.com
Tue Jul 17 06:23:50 UTC 2018

Hi All,

Please review the fix for the bug,

JDK-8170299 - Debugger does not stop inside the low memory notifications 
webrev at,


Description of the fix:

The debugger does not stop inside the listeners registered for 
notification from

1. com.sun.management.GarbageCollectorMXBean 2. sun.management.MemoryImpl (MemoryMXBean)
3. com.sun.management.DiagnosticCommandMBean

The listeners registered for above MBeans are invoked by 'ServiceThread' which is a hidden thread and is not visible to the debugger.

This issue was was already worked on before and below is the review thread for the same.


With the current fix, all the user registered callbacks for above MBeans 
are executed in a newly created SingleThreadExecutor. The above file is 
also re-factored to use CopyOnWriteArrayList for managing the listeners.

The fix has been tested in Mach5 by running all the tests under 
open/:jdk_management and closed/:jdk_management. The tests under 
open/test/jdk/java/lang/management/MemoryMXBean cover the above code 
changes. I can add more tests in the subsequent reviews if need arises.

Please review the above change and let me know your comments.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20180717/3da80f9c/attachment.html>

More information about the serviceability-dev mailing list