Bug 764757 (GLUSTER-3025)

Summary: open lock and close leads to memleak
Product: [Community] GlusterFS Reporter: Raghavendra Bhat <rabhat>
Component: locksAssignee: Raghavendra Bhat <rabhat>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: mainlineCC: amarts, gluster-bugs, vijay
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
program to reproduce the bug none

Description Raghavendra Bhat 2011-06-14 17:21:08 UTC
open lock and close on a number of files leads to memleak. Executing attached c program causes the memleak. Taking statedump of the glusterfs server process and checking for the mem type 17 tells the huge number of allocations being done for that memory type.



memusage.protocol/server.mirror-server.type.17.size=1988784
memusage.protocol/server.mirror-server.type.17.num_allocs=11838
memusage.protocol/server.mirror-server.type.17.max_size=1988784
memusage.protocol/server.mirror-server.type.17.max_num_allocs=11838

Comment 1 Anand Avati 2011-06-15 02:38:01 UTC
PATCH: http://patches.gluster.com/patch/7479 in master (features/locks:update the refcount while releasing a lock)

Comment 2 Anand Avati 2011-06-15 02:38:09 UTC
PATCH: http://patches.gluster.com/patch/7480 in release-3.1 (features/locks:update the refcount while releasing a lock)

Comment 3 Anand Avati 2011-06-15 02:38:16 UTC
PATCH: http://patches.gluster.com/patch/7481 in release-3.2 (features/locks: update refcount while releasing a lock)

Comment 4 Raghavendra Bhat 2011-06-27 02:05:35 UTC
With the patch the number of allocations in the statedump is not much after executing the attached program.