[Pkg-samba-maint] Bug#538819: Memory leak ins smbd processes

klxout klxout at gmail.com
Thu Sep 10 14:46:18 UTC 2009


Hi,

Valgrind results:

output: # valgrind /usr/sbin/smbd

-------------------
==18143== Memcheck, a memory error detector.
==18143== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==18143== Using LibVEX rev 1854, a library for dynamic binary translation.
==18143== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==18143== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation
framework.
==18143== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==18143== For more details, rerun with: -v
==18143==
==18143==
==18143== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 19 from 2)
==18143== malloc/free: in use at exit: 353,195 bytes in 395 blocks.
==18143== malloc/free: 1,005 allocs, 610 frees, 411,722 bytes allocated.
==18143== For counts of detected errors, rerun with: -v
==18143== searching for pointers to 395 not-freed blocks.
==18143== checked 670,752 bytes.
==18143==
==18143== LEAK SUMMARY:
==18143==    definitely lost: 935 bytes in 7 blocks.
==18143==      possibly lost: 301 bytes in 3 blocks.
==18143==    still reachable: 351,959 bytes in 385 blocks.
==18143==         suppressed: 0 bytes in 0 blocks.
==18143== Rerun with --leak-check=full to see details of leaked memory.
SERVER:~# ==18144==
==18144== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 19 from 2)
==18144== malloc/free: in use at exit: 353,509 bytes in 400 blocks.
==18144== malloc/free: 1,031 allocs, 631 frees, 413,922 bytes allocated.
==18144== For counts of detected errors, rerun with: -v
==18144== searching for pointers to 400 not-freed blocks.
==18144== checked 671,104 bytes.
==18144==
==18144== LEAK SUMMARY:
==18144==    definitely lost: 935 bytes in 7 blocks.
==18144==      possibly lost: 301 bytes in 3 blocks.
==18144==    still reachable: 352,273 bytes in 390 blocks.
==18144==         suppressed: 0 bytes in 0 blocks.
==18144== Rerun with --leak-check=full to see details of leaked memory.
-------------------


output: # valgrind --leak-check=full /usr/sbin/smbd

-------------------
==18247== Memcheck, a memory error detector.
==18247== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==18247== Using LibVEX rev 1854, a library for dynamic binary translation.
==18247== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==18247== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation
framework.
==18247== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==18247== For more details, rerun with: -v
==18247==
==18247==
==18247== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 19 from 2)
==18247== malloc/free: in use at exit: 353,195 bytes in 395 blocks.
==18247== malloc/free: 1,005 allocs, 610 frees, 411,722 bytes allocated.
==18247== For counts of detected errors, rerun with: -v
==18247== searching for pointers to 395 not-freed blocks.
==18247== checked 670,752 bytes.
==18247==
==18247== 15 bytes in 1 blocks are definitely lost in loss record 2 of 30
==18247==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)
==18247==    by 0x7917D71: strdup (in /lib/libc-2.7.so)
==18247==    by 0x5A6D7B: string_set (in /usr/sbin/smbd)
==18247==    by 0x478820: (within /usr/sbin/smbd)
==18247==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)
==18247==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)
==18247==    by 0x46FE57: main (in /usr/sbin/smbd)
==18247==
==18247==
==18247== 85 bytes in 1 blocks are possibly lost in loss record 6 of 30
==18247==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)
==18247==    by 0x748F80A: talloc_strdup (in /usr/lib/libtalloc.so.1.2.0)
==18247==    by 0x5AEEDB: get_myname (in /usr/sbin/smbd)
==18247==    by 0x5AEF00: myhostname (in /usr/sbin/smbd)
==18247==    by 0x4787A9: (within /usr/sbin/smbd)
==18247==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)
==18247==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)
==18247==    by 0x46FE57: main (in /usr/sbin/smbd)
==18247==
==18247==
==18247== 216 bytes in 2 blocks are possibly lost in loss record 12 of 30
==18247==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)
==18247==    by 0x74910F3: _talloc_zero (in /usr/lib/libtalloc.so.1.2.0)
==18247==    by 0x5BD8FA: event_context_init (in /usr/sbin/smbd)
==18247==    by 0x46F4AB: smbd_event_context (in /usr/sbin/smbd)
==18247==    by 0x46F4DF: smbd_messaging_context (in /usr/sbin/smbd)
==18247==    by 0x46FEB1: main (in /usr/sbin/smbd)
==18247==
==18247==
==18247== 920 (648 direct, 272 indirect) bytes in 3 blocks are definitely
lost in loss record 18 of 30
==18247==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)
==18247==    by 0x7491575: _talloc_array (in /usr/lib/libtalloc.so.1.2.0)
==18247==    by 0x5A6776: str_list_make (in /usr/sbin/smbd)
==18247==    by 0x478DD1: (within /usr/sbin/smbd)
==18247==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)
==18247==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)
==18247==    by 0x46FE57: main (in /usr/sbin/smbd)
==18247==
==18247== LEAK SUMMARY:
==18247==    definitely lost: 663 bytes in 4 blocks.
==18247==    indirectly lost: 272 bytes in 3 blocks.
==18247==      possibly lost: 301 bytes in 3 blocks.
==18247==    still reachable: 351,959 bytes in 385 blocks.
==18247==         suppressed: 0 bytes in 0 blocks.
==18247== Reachable blocks (those to which a pointer was found) are not
shown.
==18247== To see them, rerun with: --leak-check=full --show-reachable=yes
jano:~# ==18249==
==18249== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 19 from 2)
==18249== malloc/free: in use at exit: 353,509 bytes in 400 blocks.
==18249== malloc/free: 1,031 allocs, 631 frees, 413,922 bytes allocated.
==18249== For counts of detected errors, rerun with: -v
==18249== searching for pointers to 400 not-freed blocks.
==18249== checked 671,104 bytes.
==18249==
==18249== 15 bytes in 1 blocks are definitely lost in loss record 2 of 30
==18249==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)
==18249==    by 0x7917D71: strdup (in /lib/libc-2.7.so)
==18249==    by 0x5A6D7B: string_set (in /usr/sbin/smbd)
==18249==    by 0x478820: (within /usr/sbin/smbd)
==18249==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)
==18249==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)
==18249==    by 0x46FE57: main (in /usr/sbin/smbd)
==18249==
==18249==
==18249== 85 bytes in 1 blocks are possibly lost in loss record 6 of 30
==18249==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)
==18249==    by 0x748F80A: talloc_strdup (in /usr/lib/libtalloc.so.1.2.0)
==18249==    by 0x5AEEDB: get_myname (in /usr/sbin/smbd)
==18249==    by 0x5AEF00: myhostname (in /usr/sbin/smbd)
==18249==    by 0x4787A9: (within /usr/sbin/smbd)
==18249==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)
==18249==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)
==18249==    by 0x46FE57: main (in /usr/sbin/smbd)
==18249==
==18249==
==18249== 216 bytes in 2 blocks are possibly lost in loss record 12 of 30
==18249==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)
==18249==    by 0x74910F3: _talloc_zero (in /usr/lib/libtalloc.so.1.2.0)
==18249==    by 0x5BD8FA: event_context_init (in /usr/sbin/smbd)
==18249==    by 0x46F4AB: smbd_event_context (in /usr/sbin/smbd)
==18249==    by 0x46F4DF: smbd_messaging_context (in /usr/sbin/smbd)
==18249==    by 0x46FEB1: main (in /usr/sbin/smbd)
==18249==
==18249==
==18249== 920 (648 direct, 272 indirect) bytes in 3 blocks are definitely
lost in loss record 18 of 30
==18249==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)
==18249==    by 0x7491575: _talloc_array (in /usr/lib/libtalloc.so.1.2.0)
==18249==    by 0x5A6776: str_list_make (in /usr/sbin/smbd)
==18249==    by 0x478DD1: (within /usr/sbin/smbd)
==18249==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)
==18249==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)
==18249==    by 0x46FE57: main (in /usr/sbin/smbd)
==18249==
==18249== LEAK SUMMARY:
==18249==    definitely lost: 663 bytes in 4 blocks.
==18249==    indirectly lost: 272 bytes in 3 blocks.
==18249==      possibly lost: 301 bytes in 3 blocks.
==18249==    still reachable: 352,273 bytes in 390 blocks.
==18249==         suppressed: 0 bytes in 0 blocks.
==18249== Reachable blocks (those to which a pointer was found) are not
shown.
==18249== To see them, rerun with: --leak-check=full --show-reachable=yes
-------------------

Thanks

2009/7/27 Steve Langasek <vorlon at debian.org>

> On Mon, Jul 27, 2009 at 12:03:08PM +0200, klxout wrote:
> > Package: samba
> > Version:3.2.5-4lenny6
> > Severity: important
>
> > We have a production server with a PDC and BDC using as a domain with
> > Ldap. Since weeks ago we have detected a high use of memory in PDC
> > server, smbd processes start to increase memory usage and then crash
> > ldap. It seems that can work correctly about one week then crash ldap.
> > server has 1 GB of RAM
>
> Could you please run smbd under valgrind, to see where the memory leaks are
> happening?
>
> --
> Steve Langasek                   Give me a lever long enough and a Free OS
> Debian Developer                   to set it on, and I can move the world.
> Ubuntu Developer                                    http://www.debian.org/
> slangasek at ubuntu.com                                     vorlon at debian.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-samba-maint/attachments/20090910/caf4bac2/attachment.htm>


More information about the Pkg-samba-maint mailing list