Bug 762991 - (GLUSTER-1259) Memory leaks to 5.7g usage in gnfs
Memory leaks to 5.7g usage in gnfs
Product: GlusterFS
Classification: Community
Component: nfs (Show other bugs)
All Linux
low Severity high
: ---
: ---
Assigned To: Shehjar Tikoo
Depends On:
  Show dependency treegraph
Reported: 2010-08-02 03:58 EDT by Shehjar Tikoo
Modified: 2015-12-01 11:45 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: RTP
Mount Type: nfs
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Shehjar Tikoo 2010-08-02 03:58:27 EDT
Not sure where this is coming from yet but a core dump showed glusterfsd with nfs using 5.7g memory during long running tests which were running for one week. The tests included compilebench and postmark on 2 clients.

We need a thorough investigation into this.
Comment 1 Shehjar Tikoo 2010-09-23 04:54:40 EDT
Simplest way to reproduce:

o Setup a simple posix exported through nfs.

o Mount on nfs client.

o Start top at the server.

o Run the following command and see memory increase continuously.

while [ true ]; do echo Copying..;cp -R /etc/ /mnt/;echo Removing..;rm -rf /mnt/*;done
Comment 2 Shehjar Tikoo 2010-09-23 05:53:54 EDT
The leak is somewhere in the file/dir inode_t creation path. Investigating..
Comment 3 Shehjar Tikoo 2010-09-27 05:13:45 EDT
Possible inode leak paths:

o NFS LOOKUP followed by another NFS LOOKUP
Comment 4 Shehjar Tikoo 2010-09-27 22:26:15 EDT
First memory leak path:

In root dir, create a file, then remove it. Just doing this results in inode of the newly created file to leak.

Commands to use:

1. touch <MNT-POINT>/testfile
2. rm -f <MNT-POINT>/testfile

Second memory leak path:

1. mkdir <MNT-POINT>/testdir
2. touch <MNT-POINT>/testdir/testfile
3. ls <MNT-POINT>/testdir

Wait 30 secs.

4. stat <MNT-POINT>/testdir

The fd for testdir has leaked by this time. I think it is because when a dir inode is used as a parent inode, it is not being unrefd correctly.
Comment 5 Vijay Bellur 2010-09-28 09:04:49 EDT
PATCH: http://patches.gluster.com/patch/5031 in master (nfs: Free inodes layer fop locals to fix memory leak)

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