Jan-Willem Regeer wrote:
> Look and see if you have the time to check with "valgrind" if you can
> find the error. It is in the ports tree, and looks for memory leakage by
> programs.
>
> Hope you find what the problem is.
>
>
> Note: I am not using authdaemond myself.
> Jan-Willem Regeer
> ----

I tried running it through valgrind's memcheck. I don't see any issues whatsoever to be concerned with. I ran with it for about 12 hours of normal use. It looks to me that the program itself is collecting a lot of information, putting it in memory legitimately, and it simply uses gobs of it. Not a memory leak per se, but a programming mistake.

Just so you know the output I got here was essentially the same when I only ran it for a few minutes... the small leaks detected here seem to be the same as when I ran the quick tests.

Here's the output I got. I ran it with the --trace-children=yes option, so the process ID's (about three of them) represent the different children.


==45544== Is the main (parent)
==45549== is the worker thread (#2)
==45548== is the worker thread (#1)

Here's the output.
Billy

==45544== Memcheck, a memory error detector for x86-linux.
==45544== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward.
==45544== Using valgrind-2.1.2.CVS, a program supervision framework for x86-linux.
==45544== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward.
==45544==
==45544== My PID = 45544, parent PID = 45543.  Prog and args are:
==45544==    /usr/local/libexec/courier-authlib/authdaemond
==45544== For more details, rerun with: -v
==45544==
==45549==
==45548==
==45549== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==45548== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==45548== malloc/free: in use at exit: 21793446 bytes in 7800 blocks.
==45548== malloc/free: 39152 allocs, 31352 frees, 150866381 bytes allocated.
==45548== For counts of detected errors, rerun with: -v
==45548== searching for pointers to 7800 not-freed blocks.
==45549== malloc/free: in use at exit: 22053598 bytes in 7893 blocks.
==45549== malloc/free: 39651 allocs, 31758 frees, 152789639 bytes allocated.
==45549== For counts of detected errors, rerun with: -v
==45549== searching for pointers to 7893 not-freed blocks.
==45549== checked 10292868 bytes.
==45548== checked 10195776 bytes.
==45549==
==45549== 11 bytes in 1 blocks are definitely lost in loss record 1 of 12
==45548==
==45548== 11 bytes in 1 blocks are definitely lost in loss record 1 of 12
==45549== at 0x3C03772F: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck.so) ==45548== at 0x3C03772F: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck.so)
==45549==    by 0x3C1038A2: strdup (in /lib/libc.so.5)
==45548==    by 0x3C1038A2: strdup (in /lib/libc.so.5)
==45549== by 0x8049963: (within /usr/local/libexec/courier-authlib/authdaemond) ==45548== by 0x8049963: (within /usr/local/libexec/courier-authlib/authdaemond) ==45549== by 0x804B014: start (in /usr/local/libexec/courier-authlib/authdaemond) ==45548== by 0x804B014: start (in /usr/local/libexec/courier-authlib/authdaemond)
==45548==
==45549==
==45548==
==45549==
==45548== 34 bytes in 2 blocks are definitely lost in loss record 4 of 12
==45549== 34 bytes in 2 blocks are definitely lost in loss record 4 of 12
==45548== at 0x3C03772F: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck.so) ==45549== at 0x3C03772F: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck.so)
==45548==    by 0x3C03CA4C: lt_emalloc (in /usr/local/lib/libltdl.so.4)
==45549==    by 0x3C03CA4C: lt_emalloc (in /usr/local/lib/libltdl.so.4)
==45548== by 0x3C03D6F2: canonicalize_path (in /usr/local/lib/libltdl.so.4) ==45549== by 0x3C03D6F2: canonicalize_path (in /usr/local/lib/libltdl.so.4)
==45548==    by 0x3C03E494: try_dlopen (in /usr/local/lib/libltdl.so.4)
==45549==    by 0x3C03E494: try_dlopen (in /usr/local/lib/libltdl.so.4)
==45548==
==45548==
==45549==
==45548== 455840 bytes in 2590 blocks are possibly lost in loss record 11 of 12
==45549==
==45549== 461296 bytes in 2621 blocks are possibly lost in loss record 11 of 12 ==45548== at 0x3C03772F: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck.so) ==45549== at 0x3C03772F: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck.so) ==45548== by 0x3C2888CE: my_malloc (in /usr/local/lib/mysql/libmysqlclient.so.14) ==45549== by 0x3C2888CE: my_malloc (in /usr/local/lib/mysql/libmysqlclient.so.14) ==45548== by 0x3C2A3536: mysql_store_result (in /usr/local/lib/mysql/libmysqlclient.so.14) ==45549== by 0x3C2A3536: mysql_store_result (in /usr/local/lib/mysql/libmysqlclient.so.14) ==45548== by 0x3C26CE5A: vget_limits (in /usr/local/lib/courier-authlib/libauthvchkpw.so) ==45549== by 0x3C26CE5A: vget_limits (in /usr/local/lib/courier-authlib/libauthvchkpw.so)
==45548==
==45548== LEAK SUMMARY:
==45548==    definitely lost: 45 bytes in 3 blocks.
==45549==
==45548==    possibly lost:   455840 bytes in 2590 blocks.
==45549== LEAK SUMMARY:
==45548==    still reachable: 21337561 bytes in 5207 blocks.
==45549==    definitely lost: 45 bytes in 3 blocks.
==45548==         suppressed: 0 bytes in 0 blocks.
==45549==    possibly lost:   461296 bytes in 2621 blocks.
==45548== Reachable blocks (those to which a pointer was found) are not shown.
==45549==    still reachable: 21592257 bytes in 5269 blocks.
==45548== To see them, rerun with: --show-reachable=yes
==45549==         suppressed: 0 bytes in 0 blocks.
==45549== Reachable blocks (those to which a pointer was found) are not shown.
==45549== To see them, rerun with: --show-reachable=yes
==45544==
==45544== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==45544== malloc/free: in use at exit: 244 bytes in 9 blocks.
==45544== malloc/free: 25 allocs, 16 frees, 17044 bytes allocated.
==45544== For counts of detected errors, rerun with: -v
==45544== searching for pointers to 9 not-freed blocks.
==45544== checked 2057772 bytes.
==45544==
==45544== 11 bytes in 1 blocks are definitely lost in loss record 1 of 5
==45544== at 0x3C03772F: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck.so)
==45544==    by 0x3C1038A2: strdup (in /lib/libc.so.5)
==45544== by 0x8049963: (within /usr/local/libexec/courier-authlib/authdaemond) ==45544== by 0x804B014: start (in /usr/local/libexec/courier-authlib/authdaemond)
==45544==
==45544==
==45544== 34 bytes in 2 blocks are definitely lost in loss record 3 of 5
==45544== at 0x3C03772F: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck.so)
==45544==    by 0x3C03CA4C: lt_emalloc (in /usr/local/lib/libltdl.so.4)
==45544== by 0x3C03D6F2: canonicalize_path (in /usr/local/lib/libltdl.so.4)
==45544==    by 0x3C03E494: try_dlopen (in /usr/local/lib/libltdl.so.4)
==45544==
==45544== LEAK SUMMARY:
==45544==    definitely lost: 45 bytes in 3 blocks.
==45544==    possibly lost:   0 bytes in 0 blocks.
==45544==    still reachable: 199 bytes in 6 blocks.
==45544==         suppressed: 0 bytes in 0 blocks.
==45544== Reachable blocks (those to which a pointer was found) are not shown.
==45544== To see them, rerun with: --show-reachable=yes

************
When I only ran for a few minutes, here's what I got (just the Leak Summary for the three threads):

==42584== LEAK SUMMARY:
==42584==    definitely lost: 45 bytes in 3 blocks.
==42584==    possibly lost:   3696 bytes in 21 blocks.
==42584==    still reachable: 230657 bytes in 69 blocks.
==42584==         suppressed: 0 bytes in 0 blocks.

==42583== LEAK SUMMARY:
==42583==    definitely lost: 45 bytes in 3 blocks.
==42583==    possibly lost:   3872 bytes in 22 blocks.
==42583==    still reachable: 238873 bytes in 71 blocks.
==42583==         suppressed: 0 bytes in 0 blocks.

==42571== LEAK SUMMARY:
==42571==    definitely lost: 45 bytes in 3 blocks.
==42571==    possibly lost:   0 bytes in 0 blocks.
==42571==    still reachable: 199 bytes in 6 blocks.
==42571==         suppressed: 0 bytes in 0 blocks.


Reply via email to