RFR (XS) 8213383 : Wrap up pthread_cond_wait into a loop to workaround potential spurious wakeups
Ivan Gerasimov
ivan.gerasimov at oracle.com
Mon Nov 5 22:37:08 UTC 2018
Hi David!
On 11/5/18 1:42 PM, David Holmes wrote:
> Hi Ivan,
>
> I hadn't realized this is hotspot code?
>
I wasn't sure where to file it either, so I looked for the components of
the recent fixes in the file jsig.c (e.g. JDK-8200298
<https://bugs.openjdk.java.net/browse/JDK-8200298> or JDK-8017498
<https://bugs.openjdk.java.net/browse/JDK-8017498>).
With kind regards,
Ivan
> Your fix addresses exactly what you claimed.
>
> I'll refrain on commenting on this code in general. ;-)
>
> Thanks,
> David
>
> On 6/11/2018 5:59 AM, Ivan Gerasimov wrote:
>> Hello!
>>
>> In src/java.base/unix/native/libjsig/jsig.c:
>>
>> signal_lock() makes all the thread that are not jvm wait while the
>> later is installing signal handlers.
>> This is done via a call to pthread_cond_wait().
>> Spurious wakeups from pthread_cond_wait() are allowed, so it needs to
>> be wrapped up into a loop.
>>
>> Would you please help review the trivial fix?
>> Control build and testing of tier1,2,3 went fine on all supported
>> platforms.
>>
>> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8213383
>> WEBREV: http://cr.openjdk.java.net/~igerasim/8213383/00/webrev/
>>
>> Thanks!
>>
>
--
With kind regards,
Ivan Gerasimov
More information about the hotspot-runtime-dev
mailing list