<br><br><br>
Results:<br>
<br>
<br>
<br>
# valgrind --trace-children=yes --leak-check=full /usr/sbin/smbd<br>
==2370== Memcheck, a memory error detector.<br>
==2370== Copyright (C) 2002-2007, and GNU GPL&#39;d, by Julian Seward et al.<br>
==2370== Using LibVEX rev 1854, a library for dynamic binary translation.<br>
==2370== Copyright (C) 2004-2007, and GNU GPL&#39;d, by OpenWorks LLP.<br>
==2370== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation framework.<br>
==2370== Copyright (C) 2000-2007, and GNU GPL&#39;d, by Julian Seward et al.<br>
==2370== For more details, rerun with: -v<br>
==2370==<br>
==2370==<br>
==2370== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 19 from 2)<br>
==2370== malloc/free: in use at exit: 353,195 bytes in 395 blocks.<br>
==2370== malloc/free: 1,005 allocs, 610 frees, 411,722 bytes allocated.<br>
==2370== For counts of detected errors, rerun with: -v<br>
==2370== searching for pointers to 395 not-freed blocks.<br>
==2370== checked 683,040 bytes.<br>
==2370==<br>
==2370== 15 bytes in 1 blocks are definitely lost in loss record 2 of 30<br>
==2370==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)<br>
==2370==    by 0x7917D71: strdup (in /lib/<a href="http://libc-2.7.so">libc-2.7.so</a>)<br>
==2370==    by 0x5A6D7B: string_set (in /usr/sbin/smbd)<br>
==2370==    by 0x478820: (within /usr/sbin/smbd)<br>
==2370==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)<br>
==2370==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)<br>
==2370==    by 0x46FE57: main (in /usr/sbin/smbd)<br>
==2370==<br>
==2370==<br>
==2370== 85 bytes in 1 blocks are possibly lost in loss record 6 of 30<br>
==2370==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)<br>
==2370==    by 0x748F80A: talloc_strdup (in /usr/lib/libtalloc.so.1.2.0)<br>
==2370==    by 0x5AEEDB: get_myname (in /usr/sbin/smbd)<br>
==2370==    by 0x5AEF00: myhostname (in /usr/sbin/smbd)<br>
==2370==    by 0x4787A9: (within /usr/sbin/smbd)<br>
==2370==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)<br>
==2370==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)<br>
==2370==    by 0x46FE57: main (in /usr/sbin/smbd)<br>
==2370==<br>
==2370==<br>
==2370== 216 bytes in 2 blocks are possibly lost in loss record 12 of 30<br>
==2370==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)<br>
==2370==    by 0x74910F3: _talloc_zero (in /usr/lib/libtalloc.so.1.2.0)<br>
==2370==    by 0x5BD8FA: event_context_init (in /usr/sbin/smbd)<br>
==2370==    by 0x46F4AB: smbd_event_context (in /usr/sbin/smbd)<br>
==2370==    by 0x46F4DF: smbd_messaging_context (in /usr/sbin/smbd)<br>
==2370==    by 0x46FEB1: main (in /usr/sbin/smbd)<br>
==2370==<br>
==2370==<br>
==2370== 920 (648 direct, 272 indirect) bytes in 3 blocks are definitely lost in loss record 18 of 30<br>
==2370==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)<br>
==2370==    by 0x7491575: _talloc_array (in /usr/lib/libtalloc.so.1.2.0)<br>
==2370==    by 0x5A6776: str_list_make (in /usr/sbin/smbd)<br>
==2370==    by 0x478DD1: (within /usr/sbin/smbd)<br>
==2370==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)<br>
==2370==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)<br>
==2370==    by 0x46FE57: main (in /usr/sbin/smbd)<br>
==2370==<br>
==2370== LEAK SUMMARY:<br>
==2370==    definitely lost: 663 bytes in 4 blocks.<br>
==2370==    indirectly lost: 272 bytes in 3 blocks.<br>
==2370==      possibly lost: 301 bytes in 3 blocks.<br>
==2370==    still reachable: 351,959 bytes in 385 blocks.<br>
==2370==         suppressed: 0 bytes in 0 blocks.<br>
==2370== Reachable blocks (those to which a pointer was found) are not shown.<br>
==2370== To see them, rerun with: --leak-check=full --show-reachable=yes<br>
SERVER:~# ==2371==<br>
==2371== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 19 from 2)<br>
==2371== malloc/free: in use at exit: 353,509 bytes in 400 blocks.<br>
==2371== malloc/free: 1,031 allocs, 631 frees, 413,922 bytes allocated.<br>
==2371== For counts of detected errors, rerun with: -v<br>
==2371== searching for pointers to 400 not-freed blocks.<br>
==2371== checked 683,392 bytes.<br>
==2371==<br>
==2371== 15 bytes in 1 blocks are definitely lost in loss record 2 of 30<br>
==2371==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)<br>
==2371==    by 0x7917D71: strdup (in /lib/<a href="http://libc-2.7.so">libc-2.7.so</a>)<br>
==2371==    by 0x5A6D7B: string_set (in /usr/sbin/smbd)<br>
==2371==    by 0x478820: (within /usr/sbin/smbd)<br>
==2371==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)<br>
==2371==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)<br>
==2371==    by 0x46FE57: main (in /usr/sbin/smbd)<br>
==2371==<br>
==2371==<br>
==2371== 85 bytes in 1 blocks are possibly lost in loss record 6 of 30<br>
==2371==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)<br>
==2371==    by 0x748F80A: talloc_strdup (in /usr/lib/libtalloc.so.1.2.0)<br>
==2371==    by 0x5AEEDB: get_myname (in /usr/sbin/smbd)<br>
==2371==    by 0x5AEF00: myhostname (in /usr/sbin/smbd)<br>
==2371==    by 0x4787A9: (within /usr/sbin/smbd)<br>
==2371==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)<br>
==2371==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)<br>
==2371==    by 0x46FE57: main (in /usr/sbin/smbd)<br>
==2371==<br>
==2371==<br>
==2371== 216 bytes in 2 blocks are possibly lost in loss record 12 of 30<br>
==2371==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)<br>
==2371==    by 0x74910F3: _talloc_zero (in /usr/lib/libtalloc.so.1.2.0)<br>
==2371==    by 0x5BD8FA: event_context_init (in /usr/sbin/smbd)<br>
==2371==    by 0x46F4AB: smbd_event_context (in /usr/sbin/smbd)<br>
==2371==    by 0x46F4DF: smbd_messaging_context (in /usr/sbin/smbd)<br>
==2371==    by 0x46FEB1: main (in /usr/sbin/smbd)<br>
==2371==<br>
==2371==<br>
==2371== 920 (648 direct, 272 indirect) bytes in 3 blocks are definitely lost in loss record 18 of 30<br>
==2371==    at 0x4C2360E: malloc (vg_replace_malloc.c:207)<br>
==2371==    by 0x7491575: _talloc_array (in /usr/lib/libtalloc.so.1.2.0)<br>
==2371==    by 0x5A6776: str_list_make (in /usr/sbin/smbd)<br>
==2371==    by 0x478DD1: (within /usr/sbin/smbd)<br>
==2371==    by 0x47BA1D: lp_load_ex (in /usr/sbin/smbd)<br>
==2371==    by 0x47C328: lp_load_initial_only (in /usr/sbin/smbd)<br>
==2371==    by 0x46FE57: main (in /usr/sbin/smbd)<br>
==2371==<br>
==2371== LEAK SUMMARY:<br>
==2371==    definitely lost: 663 bytes in 4 blocks.<br>
==2371==    indirectly lost: 272 bytes in 3 blocks.<br>
==2371==      possibly lost: 301 bytes in 3 blocks.<br>
==2371==    still reachable: 352,273 bytes in 390 blocks.<br>
==2371==         suppressed: 0 bytes in 0 blocks.<br>
==2371== Reachable blocks (those to which a pointer was found) are not shown.<br>
==2371== To see them, rerun with: --leak-check=full --show-reachable=yes<br>
<br>
<br>
thanks<br><br><br><div class="gmail_quote">2009/9/12 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;">
<div class="im">On Thu, Sep 10, 2009 at 04:46:18PM +0200, klxout wrote:<br>
&gt; Valgrind results:<br>
<br>
&gt; output: # valgrind /usr/sbin/smbd<br>
<br>
</div>Sorry, I think we&#39;re going to need the output of valgrind<br>
--trace-children=yes --leak-check=full /usr/sbin/smbd; the output you&#39;ve<br>
sent seems to only shows memory leaked by the initial process before<br>
daemonization, and we need to find out what memory is being leaked by the<br>
long-running processes.<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">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>
</div></div><br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.9 (GNU/Linux)<br>
<br>
iQIVAwUBSqs9hFaNMPMhshM9AQjXaw//XSn9LLkvg6tRC6BpZlPAxWxESOgcJp/Z<br>
Y7lREmT+fCRDUGPb9L8vwf8MWsm2kjlVsE/m6rm+ZOjYXw68h5jb9Kgt2Dd/CHMS<br>
eGghc/hdd7oUWcgrjwaS0an++67wpVIrFhRz+i6yAQ4fs1aJyhEVk6za1ucAlmSh<br>
TLWi3Fn7f+WnqAm9KftBKEFV/HTk5mw+tY4hmMKVT2wTsg9muUzgh04c3Q7nHGLE<br>
wCW2yO1MB6c902j8oOQrt9iJcym4FxpZ19m/zdNZze+F/0ZO62xG9D+ajYFhchw9<br>
B+T97pkCi+qP5yDWY50lhT0u8PFkE8NiE/fAQw6lVVgDGBCY/O5x85y1DdCaeEfw<br>
qSQJVHX8dO6o1tSA2QGgzJRvDigTceTvPA8WnxuSZaGlreAZTCM64/86D00jHqf4<br>
FPVTlhLgb1hFB47S9z8b+TuFXkj4BrK28KEdSVVFimxGomN9fPSgO87dHvU43lp7<br>
Nij8taem69NZCNh09g1j39jRy3ueFY6V23pTafI0AxLNZy3/zm6woUNxz2Jn83Mt<br>
qayJmnSJ5WVlLD1RH6AaWamkE4ckHP1GGoBBUAXW+J7AMn+YzxWzKZHQxcJvb5qv<br>
iHi6BwiE7ddvq3vFSMs8aUt0hP4s5drcJ166FS1VOJ+lux9+XlVK8zhcKKb7gMS8<br>
WaVu6t7g2NM=<br>
=bbHg<br>
-----END PGP SIGNATURE-----<br>
<br></blockquote></div><br>