Bug 1400818

Summary: possible memory leak on client when writing to a file while another client issues a truncate
Product: [Community] GlusterFS Reporter: Ashish Pandey <aspandey>
Component: disperseAssignee: Ashish Pandey <aspandey>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: unspecified    
Version: mainlineCC: amukherj, bugs, nchilaka, rhinduja, rhs-bugs, storage-qa-internal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.10.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1399105
: 1400833 (view as bug list) Environment:
Last Closed: 2017-03-06 17:37:56 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: 1399105    
Bug Blocks: 1400833    

Comment 1 Worker Ant 2016-12-02 08:01:46 UTC
REVIEW: http://review.gluster.org/16006 (cluster/ec: Check xdata to avoid memory leak) posted (#1) for review on release-3.9 by Ashish Pandey (aspandey)

Comment 2 Worker Ant 2016-12-02 08:10:49 UTC
REVIEW: http://review.gluster.org/16007 (cluster/ec: Check xdata to avoid memory leak) posted (#1) for review on master by Ashish Pandey (aspandey)

Comment 3 Worker Ant 2016-12-02 16:24:36 UTC
COMMIT: http://review.gluster.org/16007 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit 55ddf8c6b665d0b2ed024b984e871a68b25cffbf
Author: Ashish Pandey <aspandey>
Date:   Fri Dec 2 13:15:20 2016 +0530

    cluster/ec: Check xdata to avoid memory leak
    
    Problem: ec_writev_start calls ec_make_internal_fop_xdata
    to set "yes" in xdata before ec_readv (an internal fop)
    is called for head and tail. Second call to this function
    is overwriting the previous allocated dict_t to "xdata",
    which results in memory leak.
    
    Solution: In ec_make_internal_fop_xdata, check if *xdata
    is NULL or not to avoid overwriting *xdata.
    
    Change-Id: I49b83923e11aff9b92d002e86424c0c2e1f5f74f
    BUG: 1400818
    Signed-off-by: Ashish Pandey <aspandey>
    Reviewed-on: http://review.gluster.org/16007
    Reviewed-by: Xavier Hernandez <xhernandez>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>
    Tested-by: Pranith Kumar Karampuri <pkarampu>
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>

Comment 4 Shyamsundar 2017-03-06 17:37:56 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.10.0, please open a new bug report.

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