Discussion:
[1003.1(2008)/Issue 7 0000615]: pthread_setcancelstate should be async-signal-safe
Austin Group Bug Tracker
2014-05-29 16:24:39 UTC
Permalink
The following issue NEEDS AN INTERPRETATION.
======================================================================
http://austingroupbugs.net/view.php?id=615
======================================================================
Reported By: dalias
Assigned To: ajosey
======================================================================
Project: 1003.1(2008)/Issue 7
Issue ID: 615
Category: System Interfaces
Type: Enhancement Request
Severity: Editorial
Priority: normal
Status: Interpretation Required
Name: Rich Felker
Organization: musl libc
User Reference:
Section: XSH 2.4.3 Signal Actions
Page Number: unknown
Line Number: unknown
Interp Status: ---
Final Accepted Text:
======================================================================
Date Submitted: 2012-09-26 02:32 UTC
Last Modified: 2014-05-29 16:24 UTC
======================================================================
Summary: pthread_setcancelstate should be async-signal-safe
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0000622 Disallow loophole for asynchronous canc...
======================================================================

----------------------------------------------------------------------
(0002254) Don Cragun (manager) - 2014-05-29 16:24
http://austingroupbugs.net/view.php?id=615#c2254
----------------------------------------------------------------------
Interpretation response
------------------------
The standard states that when a thread's cancelability state is
PTHREAD_CANCEL_DEFERRED, cancellation requests are held pending until a
cancellation point is reached, and conforming implementations must conform
to this. However, concerns have been raised about this which are being
referred to the sponsor (some cancellation points may be reached in an
asynchronous signal handler because some cancellation points are in
async-signal-safe functions).

Rationale:
-------------
In order to write a signal handler for an asynchronous signal which can run
safely in a cancellable thread, pthread_setcancelstate() must be used to
disable cancellation for the duration of any calls that the signal handler
makes which are cancellation points. However, the standard does not
currently permit strictly conforming applications to do this since
pthread_setcancelstate() is not required to be async-signal-safe.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
At page 489 line 16756 (XSH 2.4.3 Signal Actions), change:
All functions not in the above table are considered to be unsafe with
respect to signals.
to:
Any function not in the above table may be unsafe with respect to
signals. Implementations may make other interfaces async-signal-safe.

At page 1695 line 54349 (XSH pthread_setcancelstate() future directions),
change:
None.
to:
The pthread_setcancelstate() function may be added to the table of
async-signal-safe functions in section 2.4.3 on page 489.

Issue History
Date Modified Username Field Change
======================================================================
2012-09-26 02:32 dalias New Issue
2012-09-26 02:32 dalias Status New => Under Review
2012-09-26 02:32 dalias Assigned To => ajosey
2012-09-26 02:32 dalias Name => Rich Felker
2012-09-26 02:32 dalias Organization => musl libc
2012-09-26 02:32 dalias Section => XSH 2.4.3 Signal
Actions
2012-09-26 02:32 dalias Page Number => unknown
2012-09-26 02:32 dalias Line Number => unknown
2013-04-25 16:19 Don Cragun Relationship added related to 0000622
2013-05-23 15:11 msbrown Note Added: 0001623
2013-05-30 14:24 jim_pugsley Note Added: 0001628
2014-05-22 16:14 geoffclare Note Added: 0002249
2014-05-23 04:15 rhansen Note Added: 0002250
2014-05-29 16:24 Don Cragun Interp Status => ---
2014-05-29 16:24 Don Cragun Note Added: 0002254
2014-05-29 16:24 Don Cragun Status Under Review =>
Interpretation Required
2014-05-29 16:24 Don Cragun Resolution Open => Accepted As
Marked
======================================================================
Austin Group Bug Tracker
2014-05-29 16:25:45 UTC
Permalink
The following issue has been set PARENT OF issue 0000841.
======================================================================
http://austingroupbugs.net/view.php?id=615
======================================================================
Reported By: dalias
Assigned To: ajosey
======================================================================
Project: 1003.1(2008)/Issue 7
Issue ID: 615
Category: System Interfaces
Type: Enhancement Request
Severity: Editorial
Priority: normal
Status: Interpretation Required
Name: Rich Felker
Organization: musl libc
User Reference:
Section: XSH 2.4.3 Signal Actions
Page Number: unknown
Line Number: unknown
Interp Status: ---
Final Accepted Text:
======================================================================
Date Submitted: 2012-09-26 02:32 UTC
Last Modified: 2014-05-29 16:25 UTC
======================================================================
Summary: pthread_setcancelstate should be async-signal-safe
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0000622 Disallow loophole for asynchronous canc...
parent of 0000841 pthread_setcancelstate should be async-...
======================================================================

Issue History
Date Modified Username Field Change
======================================================================
2012-09-26 02:32 dalias New Issue
2012-09-26 02:32 dalias Status New => Under Review
2012-09-26 02:32 dalias Assigned To => ajosey
2012-09-26 02:32 dalias Name => Rich Felker
2012-09-26 02:32 dalias Organization => musl libc
2012-09-26 02:32 dalias Section => XSH 2.4.3 Signal
Actions
2012-09-26 02:32 dalias Page Number => unknown
2012-09-26 02:32 dalias Line Number => unknown
2013-04-25 16:19 Don Cragun Relationship added related to 0000622
2013-05-23 15:11 msbrown Note Added: 0001623
2013-05-30 14:24 jim_pugsley Note Added: 0001628
2014-05-22 16:14 geoffclare Note Added: 0002249
2014-05-23 04:15 rhansen Note Added: 0002250
2014-05-29 16:24 Don Cragun Interp Status => ---
2014-05-29 16:24 Don Cragun Note Added: 0002254
2014-05-29 16:24 Don Cragun Status Under Review =>
Interpretation Required
2014-05-29 16:24 Don Cragun Resolution Open => Accepted As
Marked
2014-05-29 16:25 nick Issue cloned 0000841
2014-05-29 16:25 nick Relationship added parent of 0000841
======================================================================
Austin Group Bug Tracker
2014-05-29 16:26:33 UTC
Permalink
The following issue has been UPDATED.
======================================================================
http://austingroupbugs.net/view.php?id=615
======================================================================
Reported By: dalias
Assigned To: ajosey
======================================================================
Project: 1003.1(2008)/Issue 7
Issue ID: 615
Category: System Interfaces
Type: Enhancement Request
Severity: Editorial
Priority: normal
Status: Interpretation Required
Name: Rich Felker
Organization: musl libc
User Reference:
Section: XSH 2.4.3 Signal Actions
Page Number: 489
Line Number: 16756
Interp Status: Pending
Final Accepted Text: See http://austingroupbugs.net/view.php?id=615#c2254

======================================================================
Date Submitted: 2012-09-26 02:32 UTC
Last Modified: 2014-05-29 16:26 UTC
======================================================================
Summary: pthread_setcancelstate should be async-signal-safe
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0000622 Disallow loophole for asynchronous canc...
parent of 0000841 pthread_setcancelstate should be async-...
======================================================================

Issue History
Date Modified Username Field Change
======================================================================
2012-09-26 02:32 dalias New Issue
2012-09-26 02:32 dalias Status New => Under Review
2012-09-26 02:32 dalias Assigned To => ajosey
2012-09-26 02:32 dalias Name => Rich Felker
2012-09-26 02:32 dalias Organization => musl libc
2012-09-26 02:32 dalias Section => XSH 2.4.3 Signal
Actions
2012-09-26 02:32 dalias Page Number => unknown
2012-09-26 02:32 dalias Line Number => unknown
2013-04-25 16:19 Don Cragun Relationship added related to 0000622
2013-05-23 15:11 msbrown Note Added: 0001623
2013-05-30 14:24 jim_pugsley Note Added: 0001628
2014-05-22 16:14 geoffclare Note Added: 0002249
2014-05-23 04:15 rhansen Note Added: 0002250
2014-05-29 16:24 Don Cragun Interp Status => ---
2014-05-29 16:24 Don Cragun Note Added: 0002254
2014-05-29 16:24 Don Cragun Status Under Review =>
Interpretation Required
2014-05-29 16:24 Don Cragun Resolution Open => Accepted As
Marked
2014-05-29 16:25 nick Issue cloned 0000841
2014-05-29 16:25 nick Relationship added parent of 0000841
2014-05-29 16:26 Don Cragun Page Number unknown => 489
2014-05-29 16:26 Don Cragun Line Number unknown => 16756
2014-05-29 16:26 Don Cragun Interp Status --- => Pending
2014-05-29 16:26 Don Cragun Final Accepted Text => See
http://austingroupbugs.net/view.php?id=615#c2254
======================================================================
Loading...