Bug 1330225 - gluster is not using pthread_equal to compare thread
Summary: gluster is not using pthread_equal to compare thread
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: posix
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: M. Scherer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-25 16:36 UTC by M. Scherer
Modified: 2016-06-16 14:04 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.8rc2
Clone Of:
Environment:
Last Closed: 2016-06-16 14:04:21 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description M. Scherer 2016-04-25 16:36:05 UTC
In libglusterfs/src/syncop.c, there is this line:

  if (pthread_self () == lock->owner_tid) {

according to man pages, this is incorrect, since pthread_id is supposed to be a opaque structure, and cannot be compared with '='. I will send a patch to fix that.

Comment 1 Vijay Bellur 2016-04-25 16:38:33 UTC
REVIEW: http://review.gluster.org/14064 (Use pthread_equal to compare threads) posted (#1) for review on master by Michael Scherer (misc)

Comment 2 Vijay Bellur 2016-04-25 16:43:48 UTC
REVIEW: http://review.gluster.org/14064 (Use pthread_equal to compare threads) posted (#2) for review on master by Michael Scherer (misc)

Comment 3 Vijay Bellur 2016-04-25 16:43:51 UTC
COMMIT: http://review.gluster.org/14064 committed in master by Michael Scherer (misc) 
------
commit c3353cdc4a3bcea416953af0585a08f33c5d4639
Author: Michael Scherer <misc>
Date:   Mon Apr 25 18:23:48 2016 +0200

    Use pthread_equal to compare threads
    
    The man pages about pthreads are quite clear on the fact that pthread_t
    is supposed to be opaque, and so can't be compared using the equality
    operator.
    
    Change-Id: Id69e166ed73a98668d19a71cd6d9ab9a0429ec38
    BUG: 1330225
    Signed-off-by: Michael Scherer <mscherer>

Comment 4 M. Scherer 2016-04-25 17:01:37 UTC
So this was pushed by error on the main git repo, I didn't knew i could do that, so I didn't check, sorry about that.

Comment 5 Niels de Vos 2016-06-16 14:04:21 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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