Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000748 [1003.1(2013)/Issue7+TC1] System Interfaces Objection Error 2013-09-11 11:19 2019-06-10 08:55
Reporter geoffclare View Status public  
Assigned To
Priority normal Resolution Accepted  
Status Closed  
Name Geoff Clare
Organization The Open Group
User Reference
Section pthread_mutexattr_getrobust
Page Number 1674
Line Number 54314
Interp Status ---
Final Accepted Text
Summary 0000748: pthread_mutexattr_setrobust() and thread termination cases
Description All 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 Action Change:

    ... 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().
Tags tc2-2008
Attached Files

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

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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker