RFR for JDK-6772009 Intermittent test failure: java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java test failed with 'Completed != 2'

srikalyan srikalyan.chandrashekar at oracle.com
Wed Nov 20 19:54:04 UTC 2013

Hi David , webrev is hosted here 

Ph: (408)-585-8040

On 11/19/13, 11:03 AM, David Holmes wrote:
> Hi,
> Attachments are stripped. Please post on cr.openjdk.java.net (get a 
> colleague to host this if you don't have an account yet.)
> Thanks,
> David
> On 19/11/2013 4:12 PM, srikalyan chandrashekar wrote:
>> Hi all, I am working on bug JDK-6772009
>> <https://bugs.openjdk.java.net/browse/JDK-6772009> .
>> Root Cause:
>> The timeout value gives too much grace period on faster machines on
>> which the "TO BE INTERRUPTED" threads complete faster before being
>> interrupted at right time.
>> Suggested Fix:
>> a) Decrease the timeout from 100 to 50ms which will ensure that the test
>> will pass even on faster machines , and ensures the threads will be
>> canceled when running and anyways there is a Barrier to ensure the test
>> threads all complete gracefully.
>> Miscellaneous fixes
>> b) Convert result from int to long(possible integer overflow otherwise)
>> c) Catch BrokenBarrierException in more granular fashion in
>> ReentrantLockLoop to update and print the results (which will be missed
>> otherwise)
>> Add more diagnostics
>> d) Assign names to threads
>> e) Print which threads update the 'completed' variable.
>> I have attached the webrev for convenience as the changes are
>> interleaved and is best viewed as sdiff.
>> Please let me know if you have any comments or suggestions.
>> Thank you

More information about the core-libs-dev mailing list