Bug 1369748

Summary: Memory leak with a replica 3 arbiter 1 configuration
Product: [Community] GlusterFS Reporter: Ravishankar N <ravishankar>
Component: arbiterAssignee: bugs <bugs>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.8CC: bugs
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.8.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1369331 Environment:
Last Closed: 2016-09-16 18:28:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1369331, 1369752    
Bug Blocks:    

Description Ravishankar N 2016-08-24 10:05:04 UTC
+++ This bug was initially created as a clone of Bug #1369331 +++

Description of problem:

http://www.gluster.org/pipermail/gluster-users/2016-August/028126.html

From the stateump provided by Benjamin:

[features/arbiter.vol1-arbiter - usage-type gf_arbiter_mt_iatt memusage]
size=1103760672
num_allocs=9855006
max_size=1103760672
max_num_allocs=9855006
total_allocs=9855006

--- Additional comment from Worker Ant on 2016-08-23 03:34:48 EDT ---

REVIEW: http://review.gluster.org/15289 (arbiter: Fix memleak in arbiter_forget) posted (#1) for review on master by Ravishankar N (ravishankar)

--- Additional comment from Worker Ant on 2016-08-23 13:31:53 EDT ---

REVIEW: http://review.gluster.org/15289 (arbiter: Fix memleak in arbiter_inode ctx) posted (#2) for review on master by Ravishankar N (ravishankar)

--- Additional comment from Worker Ant on 2016-08-23 22:10:24 EDT ---

COMMIT: http://review.gluster.org/15289 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit 4aa52061a51b97c4f865b402f977b3b43f5471a7
Author: Ravishankar N <ravishankar>
Date:   Tue Aug 23 12:51:57 2016 +0530

    arbiter: Fix memleak in arbiter_inode ctx
    
    Problem:
    The iattbuf ptr stored in arbiter's inode context was not freed during inode
    forget.
    
    Fix:
    Change it to a statically allocated value so that we don't have to deal
    with allocating/freeing it.
    
    Change-Id: Id1b73b8aee1fb5c4174d0734bd20e168432b1abd
    BUG: 1369331
    Reported-by: Benjamin Edgar <benedgar8>
    Signed-off-by: Ravishankar N <ravishankar>
    Reviewed-on: http://review.gluster.org/15289
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>
    Tested-by: Pranith Kumar Karampuri <pkarampu>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>

Comment 1 Worker Ant 2016-08-24 10:17:14 UTC
REVIEW: http://review.gluster.org/15306 (arbiter: Fix memleak in arbiter_inode ctx) posted (#1) for review on release-3.8 by Ravishankar N (ravishankar)

Comment 2 Worker Ant 2016-08-24 21:51:08 UTC
COMMIT: http://review.gluster.org/15306 committed in release-3.8 by Pranith Kumar Karampuri (pkarampu) 
------
commit 6dc4580696d837aa9a6a2569d0f0ce0e37883d9c
Author: Ravishankar N <ravishankar>
Date:   Tue Aug 23 12:51:57 2016 +0530

    arbiter: Fix memleak in arbiter_inode ctx
    
    Backport of http://review.gluster.org/#/c/15289/
    
    Problem:
    The iattbuf ptr stored in arbiter's inode context was not freed during inode
    forget.
    
    Fix:
    Change it to a statically allocated value so that we don't have to deal
    with allocating/freeing it.
    
    Change-Id: Id1b73b8aee1fb5c4174d0734bd20e168432b1abd
    BUG: 1369748
    Reported-by: Benjamin Edgar <benedgar8>
    Signed-off-by: Ravishankar N <ravishankar>
    
    (cherry picked from commit 4aa52061a51b97c4f865b402f977b3b43f5471a7)
    
    Change-Id: I1c2d5c8d0f4222ec6ef16b1740e6daf956212d6f
    Reviewed-on: http://review.gluster.org/15306
    Tested-by: Ravishankar N <ravishankar>
    Smoke: Gluster Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 3 Niels de Vos 2016-09-12 05:36:56 UTC
All 3.8.x bugs are now reported against version 3.8 (without .x). For more information, see http://www.gluster.org/pipermail/gluster-devel/2016-September/050859.html

Comment 4 Niels de Vos 2016-09-16 18:28:22 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.4, please open a new bug report.

glusterfs-3.8.4 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] https://www.gluster.org/pipermail/announce/2016-September/000060.html
[2] https://www.gluster.org/pipermail/gluster-users/