Bug 1170643 - Potential race while checking/updating graph->used
Summary: Potential race while checking/updating graph->used
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: fuse
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Niels de Vos
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-04 14:12 UTC by Niels de Vos
Modified: 2015-05-14 17:45 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.7.0
Clone Of:
Environment:
Last Closed: 2015-05-14 17:28:39 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Niels de Vos 2014-12-04 14:12:18 UTC
Description of problem:
While reviewing http://review.gluster.org/#/c/9060/ we noticed that fuse checks/modifies graph->used in a unlocked way. There is a potential race in case when fuse_graph_setup() gets called from two different threads (currently unlikely, but poller/notify() might change in future?).

In libgfapi we came to the conclusion that each glfs structure can be used to protect the checking/updating of graph->used. In fuse this would be the fuse_private_t with sync_mutex.

Comment 1 Anand Avati 2014-12-04 14:43:44 UTC
REVIEW: http://review.gluster.org/9237 (fuse: protect checking/modifying graph->used with a mutex) posted (#1) for review on master by Niels de Vos (ndevos)

Comment 2 Anand Avati 2014-12-12 14:26:07 UTC
COMMIT: http://review.gluster.org/9237 committed in master by Niels de Vos (ndevos) 
------
commit 09af313fe6b49b03501939dd9e46b783ca4b5416
Author: Niels de Vos <ndevos>
Date:   Thu Dec 4 15:40:52 2014 +0100

    fuse: protect checking/modifying graph->used with a mutex
    
    While reviewing http://review.gluster.org/#/c/9060/ we noticed that fuse
    checks/modifies graph->used in a unlocked way. There is a potential race
    in case when fuse_graph_setup() gets called from two different threads
    (currently  unlikely, but poller/notify() might change in future?).
    
    In libgfapi we came to the conclusion that each glfs structure can be
    used to protect the checking/updating of graph->used. In fuse this would
    be the fuse_private_t with sync_mutex.
    
    BUG: 1170643
    Change-Id: If5ab5468d22fdb92cfb24a469f538f63f12baf78
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: http://review.gluster.org/9237
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Raghavendra G <rgowdapp>

Comment 3 Niels de Vos 2015-05-14 17:28:39 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 4 Niels de Vos 2015-05-14 17:35:45 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 5 Niels de Vos 2015-05-14 17:38:07 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 6 Niels de Vos 2015-05-14 17:45:14 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[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.