Anonymous | Login | 2024-04-18 16:34 UTC |
Main | My View | View Issues | Change Log | Docs |
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 | ||||||
|
There are no notes attached to this issue. |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |