RFR: 8210511: TestSingleWriterSynchronizer can deadlock

Kim Barrett kim.barrett at oracle.com
Mon Sep 10 17:54:35 UTC 2018

> On Sep 10, 2018, at 1:41 PM, coleen.phillimore at oracle.com wrote:
> This looks good.
> Coleen


> On 9/7/18 6:47 PM, Kim Barrett wrote:
>> Please review this fix of a possible hang by the gtest for
>> SingleWriterSynchronizer. The test threads run (without safepoint
>> checks) until the driver thread signals them to stop.  If the driver
>> thread blocks waiting for a safepoint in os::sleep, that signal will
>> never be made.
>> The fix being made is to add safepoint checks to the test threads,
>> avoiding that deadlock.
>> The readers are also changed to report the number of changed values
>> they detected, demonstrating that we're actually testing something.
>> The time to run the test was reduced from 3sec to 1sec, in the
>> interest of saving a few watts in the test farm.
>> CR:
>> https://bugs.openjdk.java.net/browse/JDK-8210511
>> Webrev:
>> http://cr.openjdk.java.net/~kbarrett/8210511/open.00/
>> Testing:
>> Ran test locally, both in final form and with 100sec runtime.
>> mach5 tier1.

More information about the hotspot-runtime-dev mailing list