Discussion:
[1003.1(2013)/Issue7+TC1 0000755]: reused thread id and mutex ownership
Austin Group Bug Tracker
2014-10-07 11:50:26 UTC
Permalink
A NOTE has been added to this issue.
======================================================================
http://austingroupbugs.net/view.php?id=755
======================================================================
Reported By: nsz
Assigned To:
======================================================================
Project: 1003.1(2013)/Issue7+TC1
Issue ID: 755
Category: System Interfaces
Type: Clarification Requested
Severity: Editorial
Priority: normal
Status: Interpretation Required
Name: Szabolcs Nagy
Organization: musl libc
User Reference:
Section: pthread_mutex_lock
Page Number: 1653
Line Number: 53580-53581
Interp Status: Approved
Final Accepted Text: See
http://austingroupbugs.net/view.php?id=755#c1875.
======================================================================
Date Submitted: 2013-09-21 00:42 UTC
Last Modified: 2014-10-07 11:50 UTC
======================================================================
Summary: reused thread id and mutex ownership
======================================================================

----------------------------------------------------------------------
(0002408) torvald (reporter) - 2014-10-07 11:50
http://austingroupbugs.net/view.php?id=755#c2408
----------------------------------------------------------------------
I think the accepted resolution is not practical. Have you considered the
consequences for implementations, in particular wrt. recursive locks? Why
do we have robust locks if this doesn't yield semantics for normal locks
that actually allow efficient implementations?

Furthermore, it is stated in Note: 1875 that a mutex is owned by the thread
that locks it. So, if the thread terminates and thus does not exist any
more as an entity, it also can't own a mutex, right? I agree that one may
argue that no other new thread can own it either, but this kind of
ambiguity indicates to me that it's best to do what was stated in Note:
1848: if a thread terminates that owns non-robust mutexes, you get
undefined behavior.

Issue History
Date Modified Username Field Change
======================================================================
2013-09-21 00:42 nsz New Issue
2013-09-21 00:42 nsz Name => Szabolcs Nagy
2013-09-21 00:42 nsz Organization => musl libc
2013-09-21 00:42 nsz Section => pthread_mutex_lock
2013-09-21 00:42 nsz Page Number => 0
2013-09-21 00:42 nsz Line Number => 0
2013-09-21 05:10 shware_systems Note Added: 0001842
2013-09-21 05:31 dalias Note Added: 0001843
2013-09-21 06:08 shware_systems Note Added: 0001845
2013-09-21 06:30 dalias Note Added: 0001846
2013-09-22 02:36 shware_systems Note Added: 0001847
2013-09-22 03:20 dalias Note Added: 0001848
2013-09-23 04:50 shware_systems Note Added: 0001849
2013-10-10 18:23 Don Cragun Page Number 0 => 1653
2013-10-10 18:23 Don Cragun Line Number 0 => 53580-53581
2013-10-10 18:23 Don Cragun Interp Status => ---
2013-10-10 18:23 Don Cragun Note Added: 0001875
2013-10-10 18:23 Don Cragun Status New => Under Review
2013-10-10 18:25 Don Cragun Final Accepted Text => See
http://austingroupbugs.net/view.php?id=755#c1875.
2013-10-17 15:10 Don Cragun Status Under Review =>
Interpretation Required
2013-10-17 15:10 Don Cragun Resolution Open => Accepted As
Marked
2013-10-17 15:10 Don Cragun Interp Status --- => Pending
2014-02-21 15:39 ajosey Interp Status Pending => Proposed
2014-02-21 15:39 ajosey Note Added: 0002155
2014-03-25 13:41 ajosey Interp Status Proposed => Approved
2014-03-25 13:41 ajosey Note Added: 0002196
2014-10-07 11:50 torvald Note Added: 0002408
======================================================================
Loading...