This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1464418 - tcmu-runner: fix pthread_*() return value checks
tcmu-runner: fix pthread_*() return value checks
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: tcmu-runner (Show other bugs)
3.3
Unspecified Unspecified
unspecified Severity unspecified
: ---
: RHGS 3.3.0
Assigned To: Prasanna Kumar Kalever
Sweta Anandpara
3.3.0-devel-freeze-exception
:
Depends On:
Blocks: 1417151
  Show dependency treegraph
 
Reported: 2017-06-23 07:48 EDT by Prasanna Kumar Kalever
Modified: 2017-09-21 00:20 EDT (History)
6 users (show)

See Also:
Fixed In Version: tcmu-runner-1.2.0-7.el7rhgs
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-09-21 00:20:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Prasanna Kumar Kalever 2017-06-23 07:48:30 EDT
Description of problem:
In tcmu-runner currently most of the pthread_*() functions return value checks looks like

ret = pthread_mutex_init(&lock, NULL);
if (ret < 0) {
   ...
}

Which is wrong, and this is practiced almost every where they are used. Which could result in unknown behaviors.

Fix:
Summary of manual pages of all pthread_*() functions,
On success, pthread_*() returns 0; on error, they returns an error number

ret = pthread_mutex_init(&lock, NULL);
if (ret != 0) {
    ... That magic ...
}
Comment 7 Sweta Anandpara 2017-07-14 02:14:29 EDT
Prasanna, Please refer comment6.
Comment 10 Sweta Anandpara 2017-07-18 02:53:49 EDT
A round of testing has been done on glusterfs-3.8.4-33 and gluster-block-0.2.1-6. No crashes/issues have been seen, nor are there any unexpected error messages present in the logs. 

Based on comment 8 and 9, with the developer's and release leads' aggreeement, moving this bug to (conditionally) verified.
Comment 13 errata-xmlrpc 2017-09-21 00:20:54 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:2773

Note You need to log in before you can comment on or make changes to this bug.