sun.management.Agent: the properties.putAll API may fail with ConcurrentModifcationException on multi-thread scenario (original) (raw)

Dmitry Samersoff Dmitry.Samersoff at oracle.com
Mon Apr 23 15:56:46 UTC 2012


Deven,

Sorry for stepping latter.

I'll sponsor this fix, but I need some time to take a close look at changes as I don't understand clearly why synchronization should help in this case.

-Dmitry

On 2012-04-23 23:36, Mandy Chung wrote:

On 04/23/2012 02:36 PM, David Holmes wrote: > Except of course that Properties is a Hashtable and synchronizes on > 'this' for all public methods. So locking the properties object in the > client code will guarantee exclusive access to it.

David, thanks for looking at this closer. I missed that all public methods of Hashtable are synchronized. On 4/23/2012 12:52 AM, David Holmes wrote:

You can count me as a Reviewer, but it still needs sign-off from Mandy as a serviceability representative. I am not a serviceability representative (I was a member to that group). I'll defer this to the serviceability team sign off and sponsor your patch. There are a couple issues with the test. The test needs to be a jtreg test [1] (basically you need to add the jtreg tags) and should use the 4-space indentation. This new test case should be cleaned up so that it will exit with and without the bug fix. Your test currently loops forever when running with the JDK with your patch. This test should be able to run in samevm mode (other tests may run in the same VM with this test) and the threads this test starts should be cleaned up before the test exits. Mandy [1] http://openjdk.java.net/jtreg

-- Dmitry Samersoff Java Hotspot development team, SPB04



More information about the core-libs-dev mailing list