RFR: JDK-6546236 Thread interrupt() of Thread.sleep() can be lost on Solaris due to race with signal handler
frederic.parain at oracle.com
Mon Feb 10 07:58:19 PST 2014
Please review this fix for JDK-6546236.
A race condition exists in the implementation of
Thread.sleep() and Thread.interrupt() on the
Solaris platform. For historical reasons, the
Solaris implementation of sleep() and interrupt()
differs from the other Unices (Linux, BSD).
It uses poll() calls while Linux and BSD are
This changeset reconciles the Solaris code with
Linux and BSD code. And instead of having three
copies of this code, sleep() and interrupt()
code are moved to the os_posix.cpp from
Note that with this changeset, the Solaris
implementation of sleep() and interrupt()
is loosing the support for UseVMInterruptibleIO
but this is not an issue because this VM
flag has been deprecated in JDK8 and will be
removed in JDK9.
The code has been tested with JPRT, vm.quick.testlist
as well as jdk_lang, jdk_util, jdk_nio and jdk_awt
(not a random list, all those jdk_* test suites are
using Thread.sleep() and thread.interrupt()).
The bug description:
Frederic Parain - Oracle
Grenoble Engineering Center - France
Phone: +33 4 76 18 81 17
Email: Frederic.Parain at oracle.com
More information about the hotspot-runtime-dev