Bug 1128801

Summary: Memory leak when a large directory structure is created and deleted
Product: [Community] GlusterFS Reporter: Pranith Kumar K <pkarampu>
Component: replicateAssignee: Pranith Kumar K <pkarampu>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.6.0beta1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-11 08:37:17 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:

Description Pranith Kumar K 2014-08-11 14:52:29 UTC
Description of problem:
Create a big directory hierarchy and delete it. We find lots of 'dict' data structures leaking in the statedump

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Anand Avati 2014-08-11 14:56:10 UTC
REVIEW: http://review.gluster.org/8457 (cluster/afr: Fix mem-leak) posted (#1) for review on master by Pranith Kumar Karampuri (pkarampu)

Comment 2 Anand Avati 2014-08-12 05:22:33 UTC
COMMIT: http://review.gluster.org/8457 committed in master by Anand Avati (avati) 
------
commit a66a483be2febd36e6cb338c9fe73d332257d89e
Author: Pranith Kumar K <pkarampu>
Date:   Mon Aug 11 20:22:53 2014 +0530

    cluster/afr: Fix mem-leak
    
    Problem:
    local->xattr_req is already reffed with xattr_req that comes
    in lookup fop. But when afr_lookup_xattr_req_prepare is called
    local->xattr_req is over-written with dict_new() which leads
    to ref leak on the dict which came in lookup fop
    
    Fix:
    Create local->xattr_req only when it is NULL
    
    Change-Id: Ib1548f2df97688859f2cace44b93b3b733297c36
    BUG: 1128801
    Signed-off-by: Pranith Kumar K <pkarampu>
    Reviewed-on: http://review.gluster.org/8457
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Anand Avati <avati>

Comment 3 Anand Avati 2014-08-12 06:45:59 UTC
REVIEW: http://review.gluster.org/8460 (cluster/afr: Fix mem-leak) posted (#1) for review on release-3.6 by Pranith Kumar Karampuri (pkarampu)

Comment 4 Anand Avati 2014-08-13 08:43:15 UTC
REVIEW: http://review.gluster.org/8475 (cluster/afr: Fix mem-leak) posted (#1) for review on dht-stale-layout-fixes by Raghavendra G (rgowdapp)

Comment 5 Anand Avati 2014-08-20 06:38:57 UTC
COMMIT: http://review.gluster.org/8460 committed in release-3.6 by Vijay Bellur (vbellur) 
------
commit e8105af16c58f8c01be9b7d58b414da4391c86d6
Author: Pranith Kumar K <pkarampu>
Date:   Mon Aug 11 20:22:53 2014 +0530

    cluster/afr: Fix mem-leak
    
            Backport of http://review.gluster.org/8457
    
    Problem:
    local->xattr_req is already reffed with xattr_req that comes
    in lookup fop. But when afr_lookup_xattr_req_prepare is called
    local->xattr_req is over-written with dict_new() which leads
    to ref leak on the dict which came in lookup fop
    
    Fix:
    Create local->xattr_req only when it is NULL
    
    BUG: 1128801
    Change-Id: I4a1065add7700317e0cd3d0dda0a91e12d77e340
    Reviewed-on: http://review.gluster.org/8460
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Krutika Dhananjay <kdhananj>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 6 Niels de Vos 2014-09-22 12:45:01 UTC
A beta release for GlusterFS 3.6.0 has been released. Please verify if the release solves this bug report for you. In case the glusterfs-3.6.0beta1 release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED.

Packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an "updates-testing" repository) infrastructure for your distribution.

[1] http://supercolony.gluster.org/pipermail/gluster-users/2014-September/018836.html
[2] http://supercolony.gluster.org/pipermail/gluster-users/

Comment 7 Niels de Vos 2014-11-11 08:37:17 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.6.1, please reopen this bug report.

glusterfs-3.6.1 has been announced [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://supercolony.gluster.org/pipermail/gluster-users/2014-November/019410.html
[2] http://supercolony.gluster.org/mailman/listinfo/gluster-users