<core-libs-dev> sun.management.Agent: the properties.putAll API may fail with ConcurrentModifcationException on multi-thread scenario

Deven You youdwei at linux.vnet.ibm.com
Wed Apr 11 07:36:37 UTC 2012


Hi core-libs-devs,

I am not sure if sun.management.Agent belongs to jmx-dev mailing list, 
if so please anyone tell me.

This issue is that the sun.management.Agent.loadManagementProperties() 
will invoke properties.putAll which will throw 
ConcurrentModifcationException if there are other threads which modify 
the properties concurrently.

I have made a patch[1] which synchronize the sysProps so that putAll can 
work on multi-thread scenario. The test case is also available in [1].

Thanks a lot!

[1] http://cr.openjdk.java.net/~littlee/OJDK-256/webrev.00 
<http://cr.openjdk.java.net/%7Elittlee/OJDK-256/webrev.00>

-- 
Best Regards,

Deven




More information about the core-libs-dev mailing list