Bug 830701

Summary: glusterfs memory leak
Product: [Community] GlusterFS Reporter: Ryszard Łach <ryszard.lach>
Component: unclassifiedAssignee: Raghavendra Bhat <rabhat>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 3.3.1CC: amarts, fharshav, gluster-bugs, vikumar
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 924423 (view as bug list) Environment:
Last Closed: 2013-07-24 17:17:35 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:    
Bug Blocks: 924423    
Attachments:
Description Flags
Volume file
none
Glusterdump of glusterfs
none
GlusterFS Mem Leak Generator none

Description Ryszard Łach 2012-06-11 09:02:56 UTC
Created attachment 590863 [details]
Volume file

Description of problem:

Memory consumption of glusterfs still grows, about 500MB per day

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

glusterfs-client  from backports.debian.org, 3.2.4-1~bpo60+1


Executing

echo 2 > /proc/sys/vm/drop_caches

does not reduce glusterfs process size.

I'm attaching glusterdump and volume-file.

Comment 1 Ryszard Łach 2012-06-11 09:04:43 UTC
Created attachment 590864 [details]
Glusterdump of glusterfs

Comment 2 Raghavendra Bhat 2012-12-04 10:08:30 UTC
Ryszard,

Sorry for the delay, but we have put in some effort in memory leak fixes with later glusterfs releases. Can you please try upgrading to 3.3.1 and confirming the behavior?

Comment 3 Amar Tumballi 2012-12-20 07:34:16 UTC
also you can you try if its fixed with latest qa releases? (3.4.0qa6)?

Comment 4 Ryszard Łach 2012-12-20 07:48:35 UTC
We don't have memory leaks anymore after upgrade to Debian version 3.3.0-1 (newest commit in your changelog: 1b798491193add9cb296ce6817a6cbc2fdb9db34).

Cheers,

R.

Comment 5 Amar Tumballi 2012-12-20 08:47:59 UTC
Thanks for confirming Ryszard.

Comment 6 Harshavardhana 2013-02-15 21:33:01 UTC
Created attachment 697982 [details]
GlusterFS Mem Leak Generator

C program excerpt : ( repeated lock/unlock fcntl requests on a file descripton)
--------------------------------------------------------------------------------------------------------------------------
    printf( "Testing repeated lock/unlock fcntl requests on a file descriptor\n" );
    printf( "\n*** This program is running as an infinite loop, which should not cause filesystem failure ***\n" );
    for( ; ; ) {
        lck.l_type = F_WRLCK;
        if( fcntl( fd, F_SETLKW, &lck ) == -1) {
            printf( "error: failed to get exclusive lock on `%s';  errno %d\n", fl, errno );
            perror( "fcntl" );
            exit( 1 );
        }

        lck.l_type = F_UNLCK;
        if( fcntl( fd, F_SETLK, &lck ) == -1) {
            printf( "error: failed to release exclusive lock on `%s';  errno %d\n", fl, errno );
            perror( "fcntl" );
            exit( 1 );
        }
    }
--------------------------------------------------------------------------------------------------------------------------

Comment 7 Harshavardhana 2013-02-15 21:33:42 UTC
Re-Opening this - still reproducible 

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
glusterfs-3.3.1
glusterfs-3.4.0alpha

Comment 8 Raghavendra Bhat 2013-02-19 09:57:08 UTC
http://review.gluster.org/4525 has been submitted ans accepted, which fixes the above leak issue.