We are seeing a pretty heavy client-side memory leak in the 2.8 branch. It
looks like there may be some hint structures that aren't being freed.

The test case is relatively simple. Start the client daemon in valgrind, and
touch 100 files on pvfs2. I included a snippet of valgrind output that shows
some memory being leaked. We also see the loss with file listings and other
operations. As the file system continues to be accessed, more and more
memory is leaked.

I attached a really small patch that frees the hints in
PINT_sys_release_smcb in the client state machine. It takes care of the
continual growing issue, but valgrind still reports some small leaks on the
order of a few bytes. I tried increasing the size of my test, and the leak
size remained the same after this patch.

Bart.





==18554== 792 bytes in 99 blocks are indirectly lost in loss record 20 of 24
==18554==    at 0x40053C0: malloc (vg_replace_malloc.c:149)
==18554==    by 0x40A25A2: PVFS_hint_add (pint-hint.c:239)
==18554==    by 0x405EA68: PVFS_isys_ref_lookup (sys-lookup.sm:491)
==18554==    by 0x804AE49: post_lookup_request (pvfs2-client-core.c:562)
==18554==    by 0x804F974: handle_unexp_vfs_request
(pvfs2-client-core.c:2884)
==18554==    by 0x804EF4A: process_vfs_requests (pvfs2-client-core.c:3161)
==18554==    by 0x8051C58: main (pvfs2-client-core.c:3580)

==18554== 3,168 bytes in 99 blocks are indirectly lost in loss record 22 of
24
==18554==    at 0x40053C0: malloc (vg_replace_malloc.c:149)
==18554==    by 0x40A2576: PVFS_hint_add (pint-hint.c:232)
==18554==    by 0x405EA68: PVFS_isys_ref_lookup (sys-lookup.sm:491)
==18554==    by 0x804AE49: post_lookup_request (pvfs2-client-core.c:562)
==18554==    by 0x804F974: handle_unexp_vfs_request
(pvfs2-client-core.c:2884)
==18554==    by 0x804EF4A: process_vfs_requests (pvfs2-client-core.c:3161)
==18554==    by 0x8051C58: main (pvfs2-client-core.c:3580)

==18554== 9,864 (5,248 direct, 4,616 indirect) bytes in 164 blocks are
definitely lost in loss record 24 of 24
==18554==    at 0x40053C0: malloc (vg_replace_malloc.c:149)
==18554==    by 0x40A2314: PVFS_hint_add_internal (pint-hint.c:132)
==18554==    by 0x4054D0D: PINT_client_state_machine_post
(client-state-machine.c:383)
==18554==    by 0x405EB74: PVFS_isys_ref_lookup (sys-lookup.sm:508)
==18554==    by 0x804AE49: post_lookup_request (pvfs2-client-core.c:562)
==18554==    by 0x804F974: handle_unexp_vfs_request
(pvfs2-client-core.c:2884)
==18554==    by 0x804EF4A: process_vfs_requests (pvfs2-client-core.c:3161)
==18554==    by 0x8051C58: main (pvfs2-client-core.c:3580)

Attachment: hint-free.patch
Description: Binary data

_______________________________________________
Pvfs2-developers mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers

Reply via email to