Bug 801582 - ACL memory leak
ACL memory leak
Status: CLOSED CURRENTRELEASE
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: glusterfs (Show other bugs)
2.0
Unspecified Unspecified
high Severity high
: Beta
: ---
Assigned To: Brian Foster
Anush Shetty
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-08 17:10 EST by Brian Foster
Modified: 2015-08-10 03:46 EDT (History)
4 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0qa2-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-10 03:46:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Brian Foster 2012-03-08 17:10:06 EST
Description of problem:

A memory leak occurs when ACLs are continuously removed and re-added.

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

How reproducible: 100%

Steps to Reproduce:
1. Mount a gluster volume with ACLs enabled.
2. Create a file.
3. Run the following command on the file:

while [ true ]
do 
        setfacl -x u:test /mnt/test
        setfacl -m u:test:r /mnt/test
done

4. Run 'top -p <pidofglusterfs>' and observe RES.
  
Actual results: Resident set size increases to consume all memory.

Expected results: RSS remains stable.
Comment 1 Amar Tumballi 2012-03-21 06:45:34 EDT
Brian, does your patch to upstream fix the issue? should this be moved to "ON_QA"?
Comment 2 Brian Foster 2012-03-21 08:00:56 EDT
Amar,

Unfortunately no, this is a separate issue. I ran this test before (to make sure I wasn't introducing the problem) and after the refcount change and still saw increasing RSS.
Comment 3 Brian Foster 2012-03-21 08:13:29 EDT
To be precise, I should also point out I don't have any evidence to suggest that the memory leak here is necessarily in the ACL code...
Comment 4 Brian Foster 2012-04-12 16:11:04 EDT
I found and resolved a similar leak reproducible as follows:

while [ true ]
do 
        getfattr -n user.test /mnt/test
done

I then determined the root cause is the same for this bug. The root cause is an extra dict_ref() inside of mdc_inode_xatt_update() in md-cache. Posting a fix shortly...
Comment 5 Brian Foster 2012-04-12 16:30:02 EDT
http://review.gluster.com/3138
Comment 6 Anand Avati 2012-04-12 17:21:46 EDT
CHANGE: http://review.gluster.com/3138 (md-cache: fix dict memory leak in mdc_inode_xatt_update) merged in master by Anand Avati (avati@redhat.com)
Comment 8 Anush Shetty 2013-08-07 07:03:37 EDT
Verified with glusterfs-3.4.0.17rhs-1.el6rhs.x86_64

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