public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/17463] New: mutexes owned by a terminated thread are supposed to be owned by an imaginary thread
@ 2014-10-07 12:50 triegel at redhat dot com
  2014-10-07 12:51 ` [Bug nptl/17463] " triegel at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: triegel at redhat dot com @ 2014-10-07 12:50 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 17463
           Summary: mutexes owned by a terminated thread are supposed to
                    be owned by an imaginary thread
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: nptl
          Assignee: unassigned at sourceware dot org
          Reporter: triegel at redhat dot com
                CC: drepper.fsp at gmail dot com

IMHO, if a thread that owns a mutex terminates, this should result in undefined
behavior.  The Austin Group thinks differently:
http://austingroupbugs.net/view.php?id=755

Essentially, what they want is that an imaginary thread (because the initial
owner doesn't exist anymore) continues to own such mutex.  Our recursive and
non-robust PI mutexes don't fulfill this requirement, because we have an ABA
issue on the thread ID that's used to represent ownership.

My preferred solution would be to not change the implementation yet document
that we deviate from POSIX in this aspect.  (The requirement is not explicitly
made, but may be determined based on what's in the spec; I think that the
people are as likely to interpret the spec in a way that's compatbile with our
implementation.)

Alternatively, we should change from thread ID to an ID obtained from a global
64b counter by each thread (on first acquisition of an affected mutex).  That
means one more indirection for the lock, and we need a TLS slot for it.

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug nptl/17463] mutexes owned by a terminated thread are supposed to be owned by an imaginary thread
  2014-10-07 12:50 [Bug nptl/17463] New: mutexes owned by a terminated thread are supposed to be owned by an imaginary thread triegel at redhat dot com
@ 2014-10-07 12:51 ` triegel at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: triegel at redhat dot com @ 2014-10-07 12:51 UTC (permalink / raw)
  To: glibc-bugs

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

Torvald Riegel <triegel at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugdal at aerifal dot cx

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-07 12:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-07 12:50 [Bug nptl/17463] New: mutexes owned by a terminated thread are supposed to be owned by an imaginary thread triegel at redhat dot com
2014-10-07 12:51 ` [Bug nptl/17463] " triegel at redhat dot com

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).