Red Hat Bugzilla – Bug 801582
ACL memory leak
Last modified: 2015-08-10 03:46:49 EDT
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 ]
setfacl -x u:test /mnt/test
setfacl -m u:test:r /mnt/test
4. Run 'top -p <pidofglusterfs>' and observe RES.
Actual results: Resident set size increases to consume all memory.
Expected results: RSS remains stable.
Brian, does your patch to upstream fix the issue? should this be moved to "ON_QA"?
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.
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...
I found and resolved a similar leak reproducible as follows:
while [ true ]
getfattr -n user.test /mnt/test
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...
CHANGE: http://review.gluster.com/3138 (md-cache: fix dict memory leak in mdc_inode_xatt_update) merged in master by Anand Avati (email@example.com)
Verified with glusterfs-22.214.171.124rhs-1.el6rhs.x86_64