Hi,<br><br>Valgrind results:<br><br>output: # valgrind /usr/sbin/smbd<br><br>-------------------<br>==18143== Memcheck, a memory error detector.<br>==18143== Copyright (C) 2002-2007, and GNU GPL&#39;d, by Julian Seward et al.<br>
==18143== Using LibVEX rev 1854, a library for dynamic binary translation.<br>==18143== Copyright (C) 2004-2007, and GNU GPL&#39;d, by OpenWorks LLP.<br>==18143== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation framework.<br>
==18143== Copyright (C) 2000-2007, and GNU GPL&#39;d, by Julian Seward et al.<br>==18143== For more details, rerun with: -v<br>==18143==<br>==18143==<br>==18143== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 19 from 2)<br>
==18143== malloc/free: in use at exit: 353,195 bytes in 395 blocks.<br>==18143== malloc/free: 1,005 allocs, 610 frees, 411,722 bytes allocated.<br>==18143== For counts of detected errors, rerun with: -v<br>==18143== searching for pointers to 395 not-freed blocks.<br>
==18143== checked 670,752 bytes.<br>==18143==<br>==18143== LEAK SUMMARY:<br>==18143==    definitely lost: 935 bytes in 7 blocks.<br>==18143==      possibly lost: 301 bytes in 3 blocks.<br>==18143==    still reachable: 351,959 bytes in 385 blocks.<br>
==18143==         suppressed: 0 bytes in 0 blocks.<br>==18143== Rerun with --leak-check=full to see details of leaked memory.<br>SERVER:~# ==18144==<br>==18144== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 19 from 2)<br>
==18144== malloc/free: in use at exit: 353,509 bytes in 400 blocks.<br>==18144== malloc/free: 1,031 allocs, 631 frees, 413,922 bytes allocated.<br>==18144== For counts of detected errors, rerun with: -v<br>==18144== searching for pointers to 400 not-freed blocks.<br>
==18144== checked 671,104 bytes.<br>==18144==<br>==18144== LEAK SUMMARY:<br>==18144==    definitely lost: 935 bytes in 7 blocks.<br>==18144==      possibly lost: 301 bytes in 3 blocks.<br>==18144==    still reachable: 352,273 bytes in 390 blocks.<br>
==18144==         suppressed: 0 bytes in 0 blocks.<br>==18144== Rerun with --leak-check=full to see details of leaked memory.<br>-------------------<br><br><br>
output: # valgrind --leak-check=full /usr/sbin/smbd<br><br>-------------------<br>==18247== Memcheck, a memory error detector.<br>==18247== Copyright (C) 2002-2007, and GNU GPL&#39;d, by Julian Seward et al.<br>==18247== Using LibVEX rev 1854, a library for dynamic binary translation.<br>
==18247== Copyright (C) 2004-2007, and GNU GPL&#39;d, by OpenWorks LLP.<br>==18247== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation framework.<br>==18247== Copyright (C) 2000-2007, and GNU GPL&#39;d, by Julian Seward et al.<br>
==18247== For more details, rerun with: -v<br>==18247==<br>==18247==<br>==18247== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 19 from 2)<br>==18247== malloc/free: in use at exit: 353,195 bytes in 395 blocks.<br>==18247== malloc/free: 1,005 allocs, 610 frees, 411,722 bytes allocated.<br>
==18247== For counts of detected errors, rerun with: -v<br>==18247== searching for pointers to 395 not-freed blocks.<br>==18247== checked 670,752 bytes.<br>==18247==<br>==18247== 15 bytes in 1 blocks are definitely lost in loss record 2 of 30<br>
==18247==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)<br>==18247==    by 0x7917D71: strdup (in /lib/<a href="http://libc-2.7.so">libc-2.7.so</a>)<br>==18247==    by 0x5A6D7B: string_set (in /usr/sbin/smbd)<br>==18247==    by 0x478820: (within /usr/sbin/smbd)<br>
==18247==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)<br>==18247==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)<br>==18247==    by 0x46FE57: main (in /usr/sbin/smbd)<br>==18247==<br>==18247==<br>==18247== 85 bytes in 1 blocks are possibly lost in loss record 6 of 30<br>
==18247==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)<br>==18247==    by 0x748F80A: talloc_strdup (in /usr/lib/libtalloc.so.1.2.0)<br>==18247==    by 0x5AEEDB: get_myname (in /usr/sbin/smbd)<br>==18247==    by 0x5AEF00: myhostname (in /usr/sbin/smbd)<br>
==18247==    by 0x4787A9: (within /usr/sbin/smbd)<br>==18247==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)<br>==18247==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)<br>==18247==    by 0x46FE57: main (in /usr/sbin/smbd)<br>
==18247==<br>==18247==<br>==18247== 216 bytes in 2 blocks are possibly lost in loss record 12 of 30<br>==18247==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)<br>==18247==    by 0x74910F3: _talloc_zero (in /usr/lib/libtalloc.so.1.2.0)<br>
==18247==    by 0x5BD8FA: event_context_init (in /usr/sbin/smbd)<br>==18247==    by 0x46F4AB: smbd_event_context (in /usr/sbin/smbd)<br>==18247==    by 0x46F4DF: smbd_messaging_context (in /usr/sbin/smbd)<br>==18247==    by 0x46FEB1: main (in /usr/sbin/smbd)<br>
==18247==<br>==18247==<br>==18247== 920 (648 direct, 272 indirect) bytes in 3 blocks are definitely lost in loss record 18 of 30<br>==18247==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)<br>==18247==    by 0x7491575: _talloc_array (in /usr/lib/libtalloc.so.1.2.0)<br>
==18247==    by 0x5A6776: str_list_make (in /usr/sbin/smbd)<br>==18247==    by 0x478DD1: (within /usr/sbin/smbd)<br>==18247==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)<br>==18247==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)<br>
==18247==    by 0x46FE57: main (in /usr/sbin/smbd)<br>==18247==<br>==18247== LEAK SUMMARY:<br>==18247==    definitely lost: 663 bytes in 4 blocks.<br>==18247==    indirectly lost: 272 bytes in 3 blocks.<br>==18247==      possibly lost: 301 bytes in 3 blocks.<br>
==18247==    still reachable: 351,959 bytes in 385 blocks.<br>==18247==         suppressed: 0 bytes in 0 blocks.<br>==18247== Reachable blocks (those to which a pointer was found) are not shown.<br>==18247== To see them, rerun with: --leak-check=full --show-reachable=yes<br>
jano:~# ==18249==<br>==18249== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 19 from 2)<br>==18249== malloc/free: in use at exit: 353,509 bytes in 400 blocks.<br>==18249== malloc/free: 1,031 allocs, 631 frees, 413,922 bytes allocated.<br>
==18249== For counts of detected errors, rerun with: -v<br>==18249== searching for pointers to 400 not-freed blocks.<br>==18249== checked 671,104 bytes.<br>==18249==<br>==18249== 15 bytes in 1 blocks are definitely lost in loss record 2 of 30<br>
==18249==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)<br>==18249==    by 0x7917D71: strdup (in /lib/<a href="http://libc-2.7.so">libc-2.7.so</a>)<br>==18249==    by 0x5A6D7B: string_set (in /usr/sbin/smbd)<br>==18249==    by 0x478820: (within /usr/sbin/smbd)<br>
==18249==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)<br>==18249==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)<br>==18249==    by 0x46FE57: main (in /usr/sbin/smbd)<br>==18249==<br>==18249==<br>==18249== 85 bytes in 1 blocks are possibly lost in loss record 6 of 30<br>
==18249==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)<br>==18249==    by 0x748F80A: talloc_strdup (in /usr/lib/libtalloc.so.1.2.0)<br>==18249==    by 0x5AEEDB: get_myname (in /usr/sbin/smbd)<br>==18249==    by 0x5AEF00: myhostname (in /usr/sbin/smbd)<br>
==18249==    by 0x4787A9: (within /usr/sbin/smbd)<br>==18249==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)<br>==18249==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)<br>==18249==    by 0x46FE57: main (in /usr/sbin/smbd)<br>
==18249==<br>==18249==<br>==18249== 216 bytes in 2 blocks are possibly lost in loss record 12 of 30<br>==18249==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)<br>==18249==    by 0x74910F3: _talloc_zero (in /usr/lib/libtalloc.so.1.2.0)<br>
==18249==    by 0x5BD8FA: event_context_init (in /usr/sbin/smbd)<br>==18249==    by 0x46F4AB: smbd_event_context (in /usr/sbin/smbd)<br>==18249==    by 0x46F4DF: smbd_messaging_context (in /usr/sbin/smbd)<br>==18249==    by 0x46FEB1: main (in /usr/sbin/smbd)<br>
==18249==<br>==18249==<br>==18249== 920 (648 direct, 272 indirect) bytes in 3 blocks are definitely lost in loss record 18 of 30<br>==18249==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)<br>==18249==    by 0x7491575: _talloc_array (in /usr/lib/libtalloc.so.1.2.0)<br>
==18249==    by 0x5A6776: str_list_make (in /usr/sbin/smbd)<br>==18249==    by 0x478DD1: (within /usr/sbin/smbd)<br>==18249==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)<br>==18249==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)<br>
==18249==    by 0x46FE57: main (in /usr/sbin/smbd)<br>==18249==<br>==18249== LEAK SUMMARY:<br>==18249==    definitely lost: 663 bytes in 4 blocks.<br>==18249==    indirectly lost: 272 bytes in 3 blocks.<br>==18249==      possibly lost: 301 bytes in 3 blocks.<br>
==18249==    still reachable: 352,273 bytes in 390 blocks.<br>==18249==         suppressed: 0 bytes in 0 blocks.<br>==18249== Reachable blocks (those to which a pointer was found) are not shown.<br>==18249== To see them, rerun with: --leak-check=full --show-reachable=yes<br>
-------------------<br><br>Thanks<br><br><div class="gmail_quote">2009/7/27 Steve Langasek <span dir="ltr">&lt;<a href="mailto:vorlon@debian.org">vorlon@debian.org</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Mon, Jul 27, 2009 at 12:03:08PM +0200, klxout wrote:<br>
&gt; Package: samba<br>
&gt; Version:3.2.5-4lenny6<br>
&gt; Severity: important<br>
<br>
&gt; We have a production server with a PDC and BDC using as a domain with<br>
&gt; Ldap. Since weeks ago we have detected a high use of memory in PDC<br>
&gt; server, smbd processes start to increase memory usage and then crash<br>
&gt; ldap. It seems that can work correctly about one week then crash ldap.<br>
&gt; server has 1 GB of RAM<br>
<br>
Could you please run smbd under valgrind, to see where the memory leaks are<br>
happening?<br>
<font color="#888888"><br>
--<br>
Steve Langasek                   Give me a lever long enough and a Free OS<br>
Debian Developer                   to set it on, and I can move the world.<br>
Ubuntu Developer                                    <a href="http://www.debian.org/" target="_blank">http://www.debian.org/</a><br>
<a href="mailto:slangasek@ubuntu.com">slangasek@ubuntu.com</a>                                     <a href="mailto:vorlon@debian.org">vorlon@debian.org</a><br>
</font></blockquote></div><br>