Bug 762301 (GLUSTER-569)

Summary: Memory leak in quota translator
Product: [Community] GlusterFS Reporter: Pavan Vilas Sondur <pavan>
Component: quotaAssignee: Pavan Vilas Sondur <pavan>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: urgent    
Version: 2.0.9CC: chida, gluster-bugs, rabhat, sac, tejas, vbellur
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTP Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Pavan Vilas Sondur 2010-01-25 06:50:42 UTC
Memory leak observed in the quota translator. Valgrind showed this allocation to be leaking:

5,251,054 (13,110,528 direct, 32,140,526 indirect) bytes in 273,136 blocks are definitely lost in loss 
record 84 of 84
==8118==    at 0x4C1FB32: calloc (vg_replace_malloc.c:279)
==8118==    by 0x4E2EC00: get_new_dict_full (dict.c:68)
==8118==    by 0x4E2ECFE: get_new_dict (dict.c:93)
==8118==    by 0x620F649: gf_quota_cache_sync (quota.c:897)
==8118==    by 0x620F7EB: quota_release (quota.c:918)
==8118==    by 0x4E54064: fd_destroy (fd.c:453)
==8118==    by 0x4E541AE: fd_unref (fd.c:488)
==8118==    by 0x4E5397E: gf_fd_put (fd.c:307)
==8118==    by 0x6A4E4C3: server_release (server-protocol.c:4032)
==8118==    by 0x6A596DA: protocol_server_interpret (server-protocol.c:7511)
==8118==    by 0x6A5A06E: protocol_server_pollin (server-protocol.c:7764)
==8118==    by 0x6A5A27D: notify (server-protocol.c:7820)

Comment 1 Anand Avati 2010-01-25 09:32:38 UTC
PATCH: http://patches.gluster.com/patch/2694 in release-2.0 (features/quota: Fix memory leak while syncing disk usage.)

Comment 2 Pavan Vilas Sondur 2010-01-27 08:48:07 UTC
Also commit for 3.0.3

Comment 3 Harshavardhana 2010-02-02 08:16:54 UTC
*** Bug 541 has been marked as a duplicate of this bug. ***

Comment 4 Anand Avati 2010-02-22 07:56:54 UTC
PATCH: http://patches.gluster.com/patch/2795 in master (features/quota: Fix memory leak while syncing disk usage.)

Comment 5 Anand Avati 2010-02-22 07:56:58 UTC
PATCH: http://patches.gluster.com/patch/2796 in master (features/quota: Changes in arguments in STACK_UNWINDs for most FOPs.)

Comment 6 Anand Avati 2010-02-22 08:40:15 UTC
PATCH: http://patches.gluster.com/patch/2799 in release-3.0 (features/quota: Fix memory leak while syncing disk usage.)

Comment 7 Anand Avati 2010-02-22 08:40:19 UTC
PATCH: http://patches.gluster.com/patch/2800 in release-3.0 (features/quota: Changes in arguments in STACK_UNWINDs for most FOPs.)

Comment 8 Anand Avati 2010-03-09 05:25:00 UTC
PATCH: http://patches.gluster.com/patch/2878 in master (extras: Add script to be used before using quota translator.)

Comment 9 Anand Avati 2010-03-09 05:25:04 UTC
PATCH: http://patches.gluster.com/patch/2877 in release-3.0 (extras: Add script to be used before using quota translator.)