RFR: JDK-6546236 Thread interrupt() of Thread.sleep() can be lost on Solaris due to race with signal handler
frederic.parain at oracle.com
Thu Feb 13 05:49:25 PST 2014
I'm still looking for reviews on this changeset.
On 10/02/2014 16:58, Frederic Parain wrote:
> 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
> using ParkEvents.
> 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
> os_[solaris|linux|bsd].cpp files.
> 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:
> The webrev:
> Thank you,
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