RFR (XS): 8236177: assert(status == 0) failed: error ETIMEDOUT(60), cond_wait
David Holmes
david.holmes at oracle.com
Fri Mar 27 22:56:08 UTC 2020
On 28/03/2020 2:26 am, gerard ziemski wrote:
> hi David,
>
> On 3/25/20 6:54 PM, David Holmes wrote:
>> On 26/03/2020 9:43 am, David Holmes wrote:
>>> Hi Gerard,
>>>
>>> On 26/03/2020 4:03 am, gerard ziemski wrote:
>>>> hi all,
>>>>
>>>> Please review this "workaround" for now, which can not be called an
>>>> actual fix just yet, designed to figure out why on Mac OS X, we get
>>>> (very rarely) ETIMEDOUT when calling pthread_cond_wait() API. On
>>>> other hand, it might actually fix it.
>>>
>>> The ETIMEDOUT should be treated as a "spurious wakeup" and we will
>>> naturally retry the wait if the condition is not yet met. All we have
>>> to do to our code is adjust the assert so that ETIMEDOUT doesn't
>>> cause it to fail.
>>
>> And I'm happy to explicitly show this is a macOS issue (though we
>> don't have an MACOS_ONLY macro)
>>
>> assert_status(status == 0 BSD_ONLY(|| status == ETIMEDOUT), status,
>> "cond_wait");
>
> Just to make sure, you are saying that you are OK with using "#ifdef
> __APPLE__" here, right? You are not suggesting we introduce "MACOS_ONLY"
> macro yet, correct?
I wouldn't object to introducing MACOS_ONLY :) it would be slightly
cleaner than
assert_status(status == 0
#ifdef __APPLE__
|| status == ETIMEDOUT
#endif
, status, "cond_wait");
Cheers,
David
>
> cheers
More information about the hotspot-runtime-dev
mailing list