Steinar H. Gunderson wrote:
I've looked through the loss records while waiting for the Omega reports:
I've got that compiled. Against which version should I run it?
==19854== 6,150 bytes in 256 blocks are definitely lost in loss record 15 of 20
==19854== at 0x401D38B: malloc (vg_replace_malloc.c:149)
==19854== by 0x804DFB1: client_compose (client.c:309)
==19854== by 0x804BB72: auth_authenticate (auth.c:85)
==19854== by 0x804A527: get_rootfh (mountd.c:384)
==19854== by 0x804A8CB: mount_mnt_3_svc (mountd.c:349)
==19854== by 0x8052BBD: rpc_dispatch (rpcdispatch.c:55)
==19854== by 0x804BA4F: mount_dispatch (mount_dispatch.c:83)
==19854== by 0x41226C1: svc_getreq_common (svc.c:465)
==19854== by 0x4122716: svc_getreqset (svc.c:376)
==19854== by 0x804D899: my_svc_run (svc_run.c:90)
==19854== by 0x804B6F8: main (mountd.c:722)
This one is rather smallish. I believe it's the bug that's already patched in
1.0.12-3.
==19854== 168,672 bytes in 2,745 blocks are definitely lost in loss record 19
of 20
==19854== at 0x401D38B: malloc (vg_replace_malloc.c:149)
==19854== by 0x80531D7: xmalloc (xcommon.c:152)
==19854== by 0x804ECD6: hostent_dup (hostname.c:124)
==19854== by 0x804EEC7: get_reliable_hostbyaddr (hostname.c:253)
==19854== by 0x804DF23: client_compose (client.c:253)
==19854== by 0x804BB72: auth_authenticate (auth.c:85)
==19854== by 0x804AEB9: mount_umnt_1_svc (mountd.c:225)
==19854== by 0x8052BBD: rpc_dispatch (rpcdispatch.c:55)
==19854== by 0x804BA4F: mount_dispatch (mount_dispatch.c:83)
==19854== by 0x41226C1: svc_getreq_common (svc.c:465)
==19854== by 0x4122716: svc_getreqset (svc.c:376)
==19854== by 0x804D899: my_svc_run (svc_run.c:90)
This one looks like a genuine leak. client_compose() seems to do a host
lookup without actually freeing it. Could you try adding a "free(he);" to the
bottom of client_compose() (support/export/client.c:253)?
The file in attach is the valgrind output with both files patches. The
memory leak seems to grow faster when there are unauthenticated clients
trying to mount directories (hosts not in the netgroup).
Rik
--
Rik Theys
KU Leuven - Dept. ESAT
Kasteelpark Arenberg 10
B-3001 LEUVEN - HEVERLEE
Tel.: +32(0)16/32.11.07
----------------------------------------------------------------
<<Any errors in spelling, tact or fact are transmission errors>>
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
==32464== Memcheck, a memory error detector.
==32464== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==32464== Using LibVEX rev 1658, a library for dynamic binary translation.
==32464== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==32464== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation
framework.
==32464== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==32464== For more details, rerun with: -v
==32464==
==32464== My PID = 32464, parent PID = 13178. Prog and args are:
==32464== rpc.mountd
==32464== -F
==32464== -d
==32464== all
==32464==
==32464== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==32464== at 0x4101306: sendto (socket.S:65)
==32464== by 0x411C1CE: __netlink_request (ifaddrs.c:131)
==32464== by 0x411C92C: getifaddrs (ifaddrs.c:378)
==32464== by 0x4121650: __get_myaddress (pmap_clnt.c:60)
==32464== by 0x412172A: pmap_unset (pmap_clnt.c:151)
==32464== by 0x8052856: rpc_init (rpcmisc.c:75)
==32464== by 0x804B80E: main (mountd.c:674)
==32464== Address 0xBECEB69D is on thread 1's stack
==32464==
==32464== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==32464== at 0x4101306: sendto (socket.S:65)
==32464== by 0x411C1CE: __netlink_request (ifaddrs.c:131)
==32464== by 0x411C948: getifaddrs (ifaddrs.c:390)
==32464== by 0x4121650: __get_myaddress (pmap_clnt.c:60)
==32464== by 0x412172A: pmap_unset (pmap_clnt.c:151)
==32464== by 0x8052856: rpc_init (rpcmisc.c:75)
==32464== by 0x804B80E: main (mountd.c:674)
==32464== Address 0xBECEB69D is on thread 1's stack
==32464==
==32464== Syscall param open(mode) contains uninitialised byte(s)
==32464== at 0x40F290D: open64 (open64.c:41)
==32464== by 0x805215D: xflock (xio.c:60)
==32464== by 0x804F56A: xtab_write (xtab.c:90)
==32464== by 0x804B2DF: main (mountd.c:689)
==32464==
==32464== Syscall param open(mode) contains uninitialised byte(s)
==32464== at 0x40F290D: open64 (open64.c:41)
==32464== by 0x805215D: xflock (xio.c:60)
==32464== by 0x804C413: mountlist_add (rmtab.c:59)
==32464== by 0x804CD77: cache_export (cache.c:403)
==32464== by 0x804A779: get_rootfh (mountd.c:420)
==32464== by 0x804A8CB: mount_mnt_3_svc (mountd.c:349)
==32464== by 0x8052BBD: rpc_dispatch (rpcdispatch.c:55)
==32464== by 0x804BA4F: mount_dispatch (mount_dispatch.c:83)
==32464== by 0x41236C1: svc_getreq_common (svc.c:465)
==32464== by 0x4123716: svc_getreqset (svc.c:376)
==32464== by 0x804D899: my_svc_run (svc_run.c:90)
==32464== by 0x804B6F8: main (mountd.c:722)
==32464==
==32464== Syscall param open(mode) contains uninitialised byte(s)
==32464== at 0x40F290D: open64 (open64.c:41)
==32464== by 0x805215D: xflock (xio.c:60)
==32464== by 0x804C413: mountlist_add (rmtab.c:59)
==32464== by 0x804CD50: cache_export (cache.c:405)
==32464== by 0x804A779: get_rootfh (mountd.c:420)
==32464== by 0x804A8CB: mount_mnt_3_svc (mountd.c:349)
==32464== by 0x8052BBD: rpc_dispatch (rpcdispatch.c:55)
==32464== by 0x804BA4F: mount_dispatch (mount_dispatch.c:83)
==32464== by 0x41236C1: svc_getreq_common (svc.c:465)
==32464== by 0x4123716: svc_getreqset (svc.c:376)
==32464== by 0x804D899: my_svc_run (svc_run.c:90)
==32464== by 0x804B6F8: main (mountd.c:722)
==32464==
==32464== Syscall param open(mode) contains uninitialised byte(s)
==32464== at 0x40F290D: open64 (open64.c:41)
==32464== by 0x805215D: xflock (xio.c:60)
==32464== by 0x804C7C0: mountlist_del (rmtab.c:99)
==32464== by 0x804AF4F: mount_umnt_1_svc (mountd.c:230)
==32464== by 0x8052BBD: rpc_dispatch (rpcdispatch.c:55)
==32464== by 0x804BA4F: mount_dispatch (mount_dispatch.c:83)
==32464== by 0x41236C1: svc_getreq_common (svc.c:465)
==32464== by 0x4123716: svc_getreqset (svc.c:376)
==32464== by 0x804D899: my_svc_run (svc_run.c:90)
==32464== by 0x804B6F8: main (mountd.c:722)
==32464==
==32464== Syscall param open(mode) contains uninitialised byte(s)
==32464== at 0x40F290D: open64 (open64.c:41)
==32464== by 0x805215D: xflock (xio.c:60)
==32464== by 0x804C7C0: mountlist_del (rmtab.c:99)
==32464== by 0x804AEFE: mount_umnt_1_svc (mountd.c:231)
==32464== by 0x8052BBD: rpc_dispatch (rpcdispatch.c:55)
==32464== by 0x804BA4F: mount_dispatch (mount_dispatch.c:83)
==32464== by 0x41236C1: svc_getreq_common (svc.c:465)
==32464== by 0x4123716: svc_getreqset (svc.c:376)
==32464== by 0x804D899: my_svc_run (svc_run.c:90)
==32464== by 0x804B6F8: main (mountd.c:722)
==32464==
==32464== Syscall param open(mode) contains uninitialised byte(s)
==32464== at 0x40F290D: open64 (open64.c:41)
==32464== by 0x805215D: xflock (xio.c:60)
==32464== by 0x804C413: mountlist_add (rmtab.c:59)
==32464== by 0x804D3DE: nfsd_fh (cache.c:228)
==32464== by 0x804CDFA: cache_process_req (cache.c:345)
==32464== by 0x804D88D: my_svc_run (svc_run.c:88)
==32464== by 0x804B6F8: main (mountd.c:722)
==32464==
==32464== ERROR SUMMARY: 12223 errors from 8 contexts (suppressed: 21 from 2)
==32464== malloc/free: in use at exit: 3,317,886 bytes in 6,246 blocks.
==32464== malloc/free: 232,546 allocs, 226,300 frees, 156,109,872 bytes
allocated.
==32464== For counts of detected errors, rerun with: -v
==32464== searching for pointers to 6,246 not-freed blocks.
==32464== checked 228,448 bytes.
==32464==
==32464==
==32464== 512 bytes in 1 blocks are possibly lost in loss record 11 of 19
==32464== at 0x401D38B: malloc (vg_replace_malloc.c:149)
==32464== by 0x401D415: realloc (vg_replace_malloc.c:306)
==32464== by 0x4268B62: ???
==32464== by 0x411A200: innetgr (getnetgrent_r.c:352)
==32464== by 0x804DD54: client_check (client.c:392)
==32464== by 0x804DF74: client_compose (client.c:260)
==32464== by 0x804BB72: auth_authenticate (auth.c:85)
==32464== by 0x804A527: get_rootfh (mountd.c:384)
==32464== by 0x804A8CB: mount_mnt_3_svc (mountd.c:349)
==32464== by 0x8052BBD: rpc_dispatch (rpcdispatch.c:55)
==32464== by 0x804BA4F: mount_dispatch (mount_dispatch.c:83)
==32464== by 0x41236C1: svc_getreq_common (svc.c:465)
==32464==
==32464==
==32464== 3,164,160 bytes in 6,180 blocks are definitely lost in loss record 19
of 19
==32464== at 0x401D38B: malloc (vg_replace_malloc.c:149)
==32464== by 0x401D415: realloc (vg_replace_malloc.c:306)
==32464== by 0x4268B62: ???
==32464== by 0x411A200: innetgr (getnetgrent_r.c:352)
==32464== by 0x804DD54: client_check (client.c:392)
==32464== by 0x804DF74: client_compose (client.c:260)
==32464== by 0x804BB72: auth_authenticate (auth.c:85)
==32464== by 0x804A527: get_rootfh (mountd.c:384)
==32464== by 0x804A8CB: mount_mnt_3_svc (mountd.c:349)
==32464== by 0x8052BBD: rpc_dispatch (rpcdispatch.c:55)
==32464== by 0x804BA4F: mount_dispatch (mount_dispatch.c:83)
==32464== by 0x41236C1: svc_getreq_common (svc.c:465)
==32464==
==32464== LEAK SUMMARY:
==32464== definitely lost: 3,164,160 bytes in 6,180 blocks.
==32464== possibly lost: 512 bytes in 1 blocks.
==32464== still reachable: 153,214 bytes in 65 blocks.
==32464== suppressed: 0 bytes in 0 blocks.
==32464== Reachable blocks (those to which a pointer was found) are not shown.
==32464== To see them, rerun with: --show-reachable=yes