View Issue Details

IDProjectCategoryView StatusLast Update
00007481003.1(2013)/Issue7+TC1System Interfacespublic2019-06-10 08:55
Reportergeoffclare Assigned To 
PrioritynormalSeverityObjectionTypeError
Status ClosedResolutionAccepted 
NameGeoff Clare
OrganizationThe Open Group
User Reference
Sectionpthread_mutexattr_getrobust
Page Number1674
Line Number54314
Interp Status---
Final Accepted Text
Summary0000748: pthread_mutexattr_setrobust() and thread termination cases
DescriptionAll of the calls that return EOWNERDEAD distinguish between a
"shall fail" case where the process containing the owning thread
terminated and a "may fail" case where the owning thread terminated
(but its containing process did not terminate). The description of
PTHREAD_MUTEX_ROBUST on the pthread_mutexattr_getrobust() page
attempts to do the same, but it gets it wrong.

After describing the process termination case, it says:

    If the owning thread of a robust mutex terminates while holding
    the mutex lock, the next thread that acquires the mutex may be
    notified about the termination by the return value [EOWNERDEAD].

The problem is that if the "may fail" EOWNERDEAD case is not
supported, and the process containing the terminated thread does
not terminate, then the mutex cannot be acquired - any attempt to
do so will either block indefinitely, fail with EBUSY, or timeout.
The fix is simple: change "acquires" to "attempts to acquire".

Also, the subsequent sentence:

    The notified thread can then attempt to mark the state protected
    by the mutex as consistent again by a call to
    pthread_mutex_consistent().

mixes up two different things: attempting to make the state
protected by the mutex consistent, and marking the mutex state
as consistent by calling pthread_mutex_consistent().
Desired ActionChange:

    ... the next thread that acquires the mutex may be notified
    about the termination by the return value [EOWNERDEAD]. The
    notified thread can then attempt to mark the state protected
    by the mutex as consistent again by a call to
    pthread_mutex_consistent().

to:

    ... the next thread that attempts to acquire the mutex may be
    notified about the termination by the return value [EOWNERDEAD].
    The notified thread can then attempt to make the state protected
    by the mutex consistent again, and if successful can mark the
    mutex state as consistent by calling pthread_mutex_consistent().
Tagstc2-2008

Relationships

related to 0000759 Closed Is "may fail" case adequately specified? 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2013-09-11 11:19 geoffclare New Issue
2013-09-11 11:19 geoffclare Name => Geoff Clare
2013-09-11 11:19 geoffclare Organization => The Open Group
2013-09-11 11:19 geoffclare Section => pthread_mutexattr_getrobust
2013-09-11 11:19 geoffclare Page Number => 1674
2013-09-11 11:19 geoffclare Line Number => 54314
2013-09-11 11:19 geoffclare Interp Status => ---
2013-10-03 15:56 Don Cragun Tag Attached: tc2-2008
2013-10-03 15:56 msbrown Status New => Resolved
2013-10-03 15:56 msbrown Resolution Open => Accepted
2013-10-17 15:32 nick Relationship added related to 0000759
2019-06-10 08:55 agadmin Status Resolved => Closed