Bug 1404104 - Incorrect incrementation of volinfo refcnt during volume start
Summary: Incorrect incrementation of volinfo refcnt during volume start
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: 3.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Avra Sengupta
QA Contact:
URL:
Whiteboard:
Depends On: 1403770 1403780 1404105
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-13 05:32 UTC by Avra Sengupta
Modified: 2017-03-08 10:22 UTC (History)
5 users (show)

Fixed In Version: glusterfs-3.9.1
Clone Of: 1403780
Environment:
Last Closed: 2017-03-08 10:22:04 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Avra Sengupta 2016-12-13 05:32:06 UTC
+++ This bug was initially created as a clone of Bug #1403780 +++

+++ This bug was initially created as a clone of Bug #1403770 +++

Description of problem:
When a volume is started, in glusterd_op_start_volume(), we increase the refcount of the volume, but in 'out:' the logic to decrement the refcount is faulty. As a result, every time a volume stops and starts, it's refcount has increased by 1. This is pretty serious given that we use refcount as a parameter to delete a volume.

What happens when we delete a volume which has gone through the above:
We don't see it listed in the vol info, as we explicitly remove it frm the list. But the volinfo continues to stay in memory.

In events of reverting a failed snapshot restore, this has catastrophic consequences, as the stale volinfo not only stays back in memory, but also corrupts the volume list.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Red Hat Bugzilla Rules Engine on 2016-12-12 05:58:04 EST ---

This bug is automatically being proposed for the current release of Red Hat Gluster Storage 3 under active development, by setting the release flag 'rhgs‑3.2.0' to '?'. 

If this bug should be proposed for a different release, please manually change the proposed release flag.

--- Additional comment from Worker Ant on 2016-12-12 06:20:52 EST ---

REVIEW: http://review.gluster.org/16108 (glusterd: Do not increment refcnt of volinfo on every start) posted (#1) for review on master by Avra Sengupta (asengupt)

--- Additional comment from Worker Ant on 2016-12-13 00:08:30 EST ---

REVIEW: http://review.gluster.org/16108 (glusterd: Handle volinfo->refcnt properly during volume start command) posted (#2) for review on master by Avra Sengupta (asengupt)

--- Additional comment from Worker Ant on 2016-12-13 00:27:48 EST ---

COMMIT: http://review.gluster.org/16108 committed in master by Atin Mukherjee (amukherj) 
------
commit 9b1c9395a397e337e4a0acac55b935cb1ce094b7
Author: Avra Sengupta <asengupt>
Date:   Mon Dec 12 16:41:23 2016 +0530

    glusterd: Handle volinfo->refcnt properly during volume start command
    
    While running the volume start command, the refcnt of the volume is
    incremented. At the end of the command, the refcnt should also be
    decremented. This is currently not the case.
    
    This patch, makes sure the refcnt is also decremented at the end of the
    volume start command.
    
    Change-Id: I017b5039be5948df41dde6bc89d2955d5d18971f
    BUG: 1403780
    Signed-off-by: Avra Sengupta <asengupt>
    Reviewed-on: http://review.gluster.org/16108
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: Atin Mukherjee <amukherj>

Comment 1 Worker Ant 2016-12-13 05:34:13 UTC
REVIEW: http://review.gluster.org/16113 (glusterd: Handle volinfo->refcnt properly during volume start command) posted (#1) for review on release-3.9 by Avra Sengupta (asengupt)

Comment 2 Worker Ant 2016-12-13 09:52:47 UTC
COMMIT: http://review.gluster.org/16113 committed in release-3.9 by Atin Mukherjee (amukherj) 
------
commit 316023db02a3548ec4b14f837009ab30f2704724
Author: Avra Sengupta <asengupt>
Date:   Mon Dec 12 16:41:23 2016 +0530

    glusterd: Handle volinfo->refcnt properly during volume start command
    
    While running the volume start command, the refcnt of the volume is
    incremented. At the end of the command, the refcnt should also be
    decremented. This is currently not the case.
    
    This patch, makes sure the refcnt is also decremented at the end of the volume start command.
    
    > Reviewed-on: http://review.gluster.org/16108
    > NetBSD-regression: NetBSD Build System <jenkins.org>
    > CentOS-regression: Gluster Build System <jenkins.org>
    > Smoke: Gluster Build System <jenkins.org>
    > Reviewed-by: Atin Mukherjee <amukherj>
    
    (cherry picked from commit 9b1c9395a397e337e4a0acac55b935cb1ce094b7)
    
    Change-Id: I017b5039be5948df41dde6bc89d2955d5d18971f
    BUG: 1404104
    Signed-off-by: Avra Sengupta <asengupt>
    Reviewed-on: http://review.gluster.org/16113
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Atin Mukherjee <amukherj>

Comment 3 Kaushal 2017-03-08 10:22:04 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.9.1, please open a new bug report.

glusterfs-3.9.1 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://lists.gluster.org/pipermail/gluster-users/2017-January/029725.html
[2] https://www.gluster.org/pipermail/gluster-users/


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