[Bugs] [Bug 1370921] New: Improve robustness by checking result of pthread_mutex_lock()
bugzilla at redhat.com
bugzilla at redhat.com
Sun Aug 28 11:00:04 UTC 2016
https://bugzilla.redhat.com/show_bug.cgi?id=1370921
Bug ID: 1370921
Summary: Improve robustness by checking result of
pthread_mutex_lock()
Product: GlusterFS
Version: mainline
Component: core
Keywords: Triaged
Severity: medium
Assignee: bugs at gluster.org
Reporter: ndevos at redhat.com
CC: bugs at gluster.org
Description of problem:
pthread_mutex_lock() can return without successfully locking the mutex. Many
calls to this function assume that is always blocks until the locking succeeds.
Version-Release number of selected component (if applicable):
all
How reproducible:
code review
Actual results:
Many data structures use a pthread_mutex for exclusive access and guaranteeing
atomic updates. Unfortunately a lot of occurrences do not check the
success/fail result of the call to pthread_mutex_lock().
Expected results:
In case pthread_mutex_lock() fails, a retry or abort of the function should be
done, depending on the result errno contains.
Additional info:
See 'man 3p pthreead_mutex_lock'.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list