public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fweimer at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug nptl/19193] pthread_kill, pthread_cancel return ESRCH for a thread ID whose lifetime has not ended
Date: Mon, 13 Sep 2021 10:46:27 +0000	[thread overview]
Message-ID: <bug-19193-131-jRrLucOy65@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-19193-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=19193

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.35
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Florian Weimer <fweimer at redhat dot com> ---
Fixed for 2.35 via:

commit 8af8456004edbab71f8903a60a3cae442cf6fe69
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Sep 13 11:06:08 2021 +0200

    nptl: pthread_kill, pthread_cancel should not fail after exit (bug 19193)

    This closes one remaining race condition related to bug 12889: if
    the thread already exited on the kernel side, returning ESRCH
    is not correct because that error is reserved for the thread IDs
    (pthread_t values) whose lifetime has ended.  In case of a
    kernel-side exit and a valid thread ID, no signal needs to be sent
    and cancellation does not have an effect, so just return 0.

    sysdeps/pthread/tst-kill4.c triggers undefined behavior and is
    removed with this commit.

    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2021-09-13 10:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-31 11:42 [Bug nptl/19193] New: pthread_kill returns " fweimer at redhat dot com
2021-08-17  6:23 ` [Bug nptl/19193] " fweimer at redhat dot com
2021-08-17  6:25 ` fweimer at redhat dot com
2021-08-17 12:01 ` fweimer at redhat dot com
2021-08-17 12:01 ` fweimer at redhat dot com
2021-08-17 12:01 ` [Bug nptl/19193] pthread_kill, pthread_cancel return " fweimer at redhat dot com
2021-08-17 12:45 ` fweimer at redhat dot com
2021-08-17 13:52 ` fweimer at redhat dot com
2021-09-13 10:46 ` fweimer at redhat dot com [this message]
2021-09-17 11:29 ` fweimer at redhat dot com
2021-09-20 12:58 ` cvs-commit at gcc dot gnu.org
2021-09-20 13:49 ` cvs-commit at gcc dot gnu.org

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-19193-131-jRrLucOy65@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: link
Be 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).