Bug 762729 (GLUSTER-997) - memory leak in afr
Summary: memory leak in afr
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-997
Product: GlusterFS
Classification: Community
Component: replicate
Version: 3.0.4
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Pranith Kumar K
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-11 09:40 UTC by Raghavendra Bhat
Modified: 2010-08-06 10:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Raghavendra Bhat 2010-06-11 09:40:35 UTC
THere is a memory leak in afr_sh_data_open. This is observed in glusterfs-3.0.5rc6(3.0.5rc5 too). 

valgrind report:


 272 (64 direct, 208 indirect) bytes in 1 blocks are definitely lost in loss record 92 of 145
==4084==    at 0x4C2414B: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4084==    by 0x4E6425B: fd_create (fd.c:490)
==4084==    by 0x6676CBF: afr_sh_data_open (afr-self-heal-data.c:1170)
==4084==    by 0x6676F7E: afr_self_heal_data (afr-self-heal-data.c:1205)
==4084==    by 0x667BF5B: afr_sh_metadata_done (afr-self-heal-metadata.c:88)
==4084==    by 0x667C09C: afr_sh_metadata_unlck_cbk (afr-self-heal-metadata.c:123)
==4084==    by 0x6434AEC: client_inodelk_cbk (client-protocol.c:5441)
==4084==    by 0x64379DB: protocol_client_interpret (client-protocol.c:6571)
==4084==    by 0x64386A1: protocol_client_pollin (client-protocol.c:6869)
==4084==    by 0x6438D15: notify (client-protocol.c:6988)
==4084==    by 0x4E422F9: xlator_notify (xlator.c:929)
==4084==    by 0x7F35256: socket_event_poll_in (socket.c:771)

Comment 1 Tejas Bhise 2010-07-26 08:23:03 UTC
Pavan - please indicate target release.

Comment 2 Pranith Kumar K 2010-08-06 07:48:28 UTC
the client translator does not unref the fd if client_open errors out. the patch for the bug 762726 will fix this one as well, as client_local_wipe() deallocates the memory and unrefs the fd.


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