varnish-cache icon indicating copy to clipboard operation
varnish-cache copied to clipboard

pthread_cond_{timed,}wait shall not return an error code of [EINTR].

Open nigoroll opened this issue 1 year ago • 2 comments

Nitpick noticed during review of #4030

https://pubs.opengroup.org/onlinepubs/009604599/functions/pthread_cond_timedwait.html

Piling as a PR because of the freeze

FYI this goes back to eecd409d13f145765de3aeee4984179e0ae008b5

nigoroll avatar Feb 19 '24 16:02 nigoroll

I found something interesting about this: https://github.com/varnishcache/varnish-cache/commit/43af86cc40ed78a4b41be60fa3542e45ad644285

walid-git avatar Feb 20 '24 10:02 walid-git

I found something interesting about this: 43af86c

Should we maybe wrap the assertion and make acceptance of EINTR conditional like #if HAVE_SANITIZER_ASAN_INTERFACE_H or #if ENABLE_ASAN?

Note: I am an ASAN noob.

nigoroll avatar Feb 21 '24 12:02 nigoroll

bugwash: @Dridi will present something in this area

nigoroll avatar Feb 26 '24 14:02 nigoroll

So, I overlooked that it was me who initially added tolerance of EINTR in 0895d2e61f61c2942e6bc4db3347adec7966d6c2, which is embarrassing and I will go back to the elementary school of git.

The question was raised where this originates and I found this in my IRC attic of Mon 09 May 2016:

(10:13:40) phk: when does EINTR even happen ? (10:13:49) slink: on SIGSTOP

It might well have been something observed on Solaris.

so we'll just leave it as is.

nigoroll avatar Feb 26 '24 14:02 nigoroll

Also encountered with sanitizers, see 43af86cc40ed78a4b41be60fa3542e45ad644285 too.

dridi avatar Feb 26 '24 14:02 dridi