[Bugs] [Bug 1412995] New: Memory leak on mount/fuse when setxattr fails

bugzilla at redhat.com bugzilla at redhat.com
Fri Jan 13 11:05:27 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1412995

            Bug ID: 1412995
           Summary: Memory leak on mount/fuse when setxattr fails
           Product: GlusterFS
           Version: 3.7.18
         Component: fuse
          Keywords: Triaged
          Assignee: bugs at gluster.org
          Reporter: xhernandez at datalab.es
                CC: bugs at gluster.org
        Depends On: 1412174
            Blocks: 1412992, 1412994



+++ This bug was initially created as a clone of Bug #1412174 +++

Description of problem:

When the setxattr fails for some extended attributes, fuse leaks memory.

This can happen if you try to set 'system.posix_acl_access' but gluster doesn't
have acl's enabled.

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


How reproducible:

Always

Steps to Reproduce:
1. gluster volume create test server:/brick
2. mount -t glusterfs server:/test /test
3. touch /test/file
4. for i in {1..100000}; do setfattr -n system.posix_acl_access -v "1"
/test/file; done

Actual results:

Doing a state dump, a leak of fuse_state_t structures is seen.

Expected results:

No leak should happen.

Additional info:

It seems that the state is not released after having been allocated if a pre-op
check fails.

--- Additional comment from Worker Ant on 2017-01-12 09:52:27 CET ---

REVIEW: http://review.gluster.org/16380 (fuse: fix memory leak in setxattr)
posted (#1) for review on master by Xavier Hernandez (xhernandez at datalab.es)

--- Additional comment from Worker Ant on 2017-01-12 09:59:40 CET ---

REVIEW: http://review.gluster.org/16380 (fuse: fix memory leak in setxattr)
posted (#2) for review on master by Xavier Hernandez (xhernandez at datalab.es)

--- Additional comment from Worker Ant on 2017-01-12 20:03:14 CET ---

COMMIT: http://review.gluster.org/16380 committed in master by Jeff Darcy
(jdarcy at redhat.com) 
------
commit 79b3fb6e8d3c9d681917be6e6c9f6ba04eb73f82
Author: Xavier Hernandez <xhernandez at datalab.es>
Date:   Thu Jan 12 08:38:50 2017 +0100

    fuse: fix memory leak in setxattr

    If there's some failed check in setxattr of mount/fuse before
    actually starting the operation, a fuse_state_t structure is
    leaked.

    This fix correctly releases allocated resources in case of
    error.

    Change-Id: I8b1cda67a613c13b6bc38947352e2ccfccf96a1d
    BUG: 1412174
    Signed-off-by: Xavier Hernandez <xhernandez at datalab.es>
    Reviewed-on: http://review.gluster.org/16380
    Smoke: Gluster Build System <jenkins at build.gluster.org>
    NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
    Reviewed-by: Niels de Vos <ndevos at redhat.com>
    CentOS-regression: Gluster Build System <jenkins at build.gluster.org>
    Reviewed-by: Jeff Darcy <jdarcy at redhat.com>


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1412174
[Bug 1412174] Memory leak on mount/fuse when setxattr fails
https://bugzilla.redhat.com/show_bug.cgi?id=1412992
[Bug 1412992] Memory leak on mount/fuse when setxattr fails
https://bugzilla.redhat.com/show_bug.cgi?id=1412994
[Bug 1412994] Memory leak on mount/fuse when setxattr fails
-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list