RFR: 8210511: TestSingleWriterSynchronizer can deadlock

Kim Barrett kim.barrett at oracle.com
Fri Sep 7 22:47:41 UTC 2018


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