RFR: 6498581: ThreadInterruptTest3 produces wrong output on Windows

Yumin Qi yumin.qi at oracle.com
Tue Jan 14 17:00:41 PST 2014


Can I have your codereview of the change

http://cr.openjdk.java.net/~minqi/6498581/webrev00 
<http://cr.openjdk.java.net/%7Eminqi/6498581/webrev00/>

Summary: There is race condition between os::interrupt and 
os::is_interrupted on Windows.  See bug comments in detail. When thread 
sleep check if it gets interrupted, it may see interrupted but not 
really interrupted so cause spurious waking up (early return from 
sleep). Fix by checking if a real interrupt sent to thread interrupt 
event can prevent such false return. On windows we can get away the 
interrupted field but to keep consistent with other platforms, I choose 
to leave it as it is.

Contributed-By: David Holmes


Tests: vm.quick.testlist, specjbb2005, original test case, JPRT

Thanks
Yumin


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20140114/d90a1e02/attachment.html 


More information about the hotspot-runtime-dev mailing list