public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tuliom at ascii dot art.br" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug nptl/26964] pthread_mutex_timedlock returning EAGAIN after futex is locked Date: Tue, 01 Dec 2020 23:07:26 +0000 [thread overview] Message-ID: <bug-26964-131-UivDEECOMG@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-26964-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=26964 Tulio Magno Quites Machado Filho <tuliom at ascii dot art.br> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.33 Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #1 from Tulio Magno Quites Machado Filho <tuliom at ascii dot art.br> --- Fixed with: commit 61855081017dff30c577855cda882740356b5d98 Author: Lucas A. M. Magalhaes <lamm@linux.ibm.com> Date: Tue Dec 1 18:05:07 2020 -0300 nptl: Fix __futex_clocklock64 return error check [BZ #26964] The earlier implementation of this, __lll_clocklock, calls lll_clockwait that doesn't return the futex syscall error codes. It always tries again if that fails. However in the current implementation, when the futex returns EAGAIN, __futex_clocklock64 will also return EGAIN, even if the futex is taken. This patch fixes the EAGAIN issue and also adds a check for EINTR. As futex syscall can return EINTR if the thread is interrupted by a signal. In this case I'm assuming the function should continue trying to lock as there is no mention to about it on POSIX. Also add a test for both scenarios. -- You are receiving this mail because: You are on the CC list for the bug.
prev parent reply other threads:[~2020-12-01 23:07 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-27 14:31 [Bug nptl/26964] New: " lamm at linux dot ibm.com 2020-11-27 14:37 ` [Bug nptl/26964] " tuliom at ascii dot art.br 2020-12-01 23:07 ` tuliom at ascii dot art.br [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-26964-131-UivDEECOMG@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).