http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4806

           Summary: memory leak persists in spamc/spamd v 3.04
           Product: Spamassassin
           Version: 3.0.4
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: spamc/spamd
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


spamd/spamc consumes over 500M of RAM after processing a few emails until spamd
is restarted.

2.6.9-1.667smp #1 SMP
SpamAssassin Server version 3.0.4
running on Perl 5.8.5

before restart:
free
             total       used       free     shared    buffers     cached
Mem:       1025908    1011336      14572          0     240992     109564
-/+ buffers/cache:     660780     365128
Swap:      2096440      27104    2069336


after restart:
free
             total       used       free     shared    buffers     cached
Mem:       1025908     705368     320540          0     241068     109748
-/+ buffers/cache:     354552     671356
Swap:      2096440      27104    2069336

In this case it sonsumed 300M after processing 1 email.

running 2 child process with the following options:

/usr/bin/spamd -d -c -m2 -H --max-conn-per-child=5 -r
/var/run/spamassassin/spamd.pid

[EMAIL PROTECTED] bin]# valgrind --tool=memcheck --leak-check=yes -v spamc
==3005== Memcheck, a memory error detector for x86-linux.
==3005== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==3005== Using valgrind-2.2.0, a program supervision framework for x86-linux.
==3005== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==3005== Valgrind library directory: /usr/lib/valgrind
==3005== Command line
==3005==    spamc
==3005== Startup, with flags:
==3005==    --tool=memcheck
==3005==    --leak-check=yes
==3005==    -v
==3005== Contents of /proc/version:
==3005==   Linux version 2.6.9-1.667smp ([EMAIL PROTECTED]) (gcc
version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)) #1 SMP Tue Nov 2 14:59:52 EST 2004
==3005== Reading syms from /usr/bin/spamc (0x8048000)
==3005==    object doesn't have a symbol table
==3005==    object doesn't have any debug info
==3005== Reading syms from /lib/ld-2.3.6.so (0x1B8E4000)
==3005==    object doesn't have any debug info
==3005== Reading syms from /usr/lib/valgrind/stage2 (0xB0000000)
==3005== Reading syms from /lib/ld-2.3.6.so (0xB1000000)
==3005==    object doesn't have any debug info
==3005== Reading syms from /usr/lib/valgrind/vgskin_memcheck.so (0xF6C94000)
==3005== Reading syms from /lib/tls/libc-2.3.6.so (0xF6EBD000)
==3005==    object doesn't have any debug info
==3005== Reading syms from /lib/libdl-2.3.6.so (0xF6FE9000)
==3005==    object doesn't have any debug info
==3005== Reading suppressions file: /usr/lib/valgrind/default.supp
==3005== REDIRECT soname:libc.so.6(__GI___errno_location) to
soname:libpthread.so.0(__errno_location)
==3005== REDIRECT soname:libc.so.6(__errno_location) to
soname:libpthread.so.0(__errno_location)
==3005== REDIRECT soname:libc.so.6(__GI___h_errno_location) to
soname:libpthread.so.0(__h_errno_location)
==3005== REDIRECT soname:libc.so.6(__h_errno_location) to
soname:libpthread.so.0(__h_errno_location)
==3005== REDIRECT soname:libc.so.6(__GI___res_state) to
soname:libpthread.so.0(__res_state)
==3005== REDIRECT soname:libc.so.6(__res_state) to
soname:libpthread.so.0(__res_state)
==3005== REDIRECT soname:libc.so.6(stpcpy) to *vgpreload_memcheck.so*(stpcpy)
==3005== REDIRECT soname:libc.so.6(strnlen) to *vgpreload_memcheck.so*(strnlen)
==3005== REDIRECT soname:ld-linux.so.2(stpcpy) to 
*vgpreload_memcheck.so*(stpcpy)
==3005== REDIRECT soname:ld-linux.so.2(strchr) to 
*vgpreload_memcheck.so*(strchr)
==3005==
==3005== Reading syms from /usr/lib/valgrind/vg_inject.so (0x1B8FD000)
==3005== Reading syms from /usr/lib/valgrind/vgpreload_memcheck.so (0x1B902000)
==3005== TRANSLATE: 0x1B8F5F80 redirected to 0x1B90520C
==3005== Reading syms from /lib/libssl.so.0.9.7a (0x21E000)
==3005==    object doesn't have a symbol table
==3005==    object doesn't have any debug info
==3005== Reading syms from /lib/libcrypto.so.0.9.7a (0x101000)
==3005==    object doesn't have a symbol table
==3005==    object doesn't have any debug info
==3005== Reading syms from /lib/libdl-2.3.6.so (0x94C000)
==3005==    object doesn't have any debug info
==3005== Reading syms from /lib/tls/libc-2.3.6.so (0x7FA000)
==3005==    object doesn't have any debug info
==3005== Reading syms from /usr/lib/libgssapi_krb5.so.2.2 (0xDAE000)
==3005==    object doesn't have a symbol table
==3005==    object doesn't have any debug info
==3005== Reading syms from /usr/lib/libkrb5.so.3.2 (0xD26000)
==3005==    object doesn't have a symbol table
==3005==    object doesn't have any debug info
==3005== Reading syms from /lib/libcom_err.so.2.1 (0xCF5000)
==3005==    object doesn't have a symbol table
==3005==    object doesn't have any debug info
==3005== Reading syms from /usr/lib/libk5crypto.so.3.0 (0xD03000)
==3005==    object doesn't have a symbol table
==3005==    object doesn't have any debug info
==3005== Reading syms from /lib/libresolv-2.3.6.so (0xC33000)
==3005==    object doesn't have any debug info
==3005== Reading syms from /usr/lib/libz.so.1.2.1.2 (0xA2F000)
==3005==    object doesn't have a symbol table
==3005==    object doesn't have any debug info
==3005== TRANSLATE: 0x1B8E47A0 redirected to 0x52BFF040
==3005== TRANSLATE: 0x85DF00 redirected to 0x1B905A04
==3005== TRANSLATE: 0x85BE30 redirected to 0x1B905F30
==3005== TRANSLATE: 0x864240 redirected to 0x1B905800
==3005== TRANSLATE: 0x85DC20 redirected to 0x1B906380
==3005== Reading syms from /lib/libnss_files-2.3.6.so (0x1BA24000)
==3005==    object doesn't have any debug info

X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on
        skipper.houselan.net
X-Spam-Level: *
X-Spam-Status: No, score=1.6 required=4.0 tests=MISSING_DATE,MISSING_SUBJECT
        autolearn=disabled version=3.0.4

==3005== discard syms at 0x1BA24000-0x1BA2F000 in /lib/libnss_files-2.3.6.so due
to munmap()
==3005==
==3005== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 23 from 2)
--3005--
--3005-- supp:    2 _dl_relocate_object/dl_open_worker
--3005-- supp:   21 dl_relocate_object/dl_main
==3005== malloc/free: in use at exit: 272385 bytes in 1 blocks.
==3005== malloc/free: 50 allocs, 49 frees, 532041 bytes allocated.
==3005==
==3005== searching for pointers to 1 not-freed blocks.
==3005== checked 3633008 bytes.
==3005==
==3005== 272385 bytes in 1 blocks are definitely lost in loss record 1 of 1
==3005==    at 0x1B905A90: malloc (vg_replace_malloc.c:131)
==3005==    by 0x804A21A: (within /usr/bin/spamc)
==3005==    by 0x8049971: (within /usr/bin/spamc)
==3005==    by 0x80EE22: __libc_start_main (in /lib/tls/libc-2.3.6.so)
==3005==
==3005== LEAK SUMMARY:
==3005==    definitely lost: 272385 bytes in 1 blocks.
==3005==    possibly lost:   0 bytes in 0 blocks.
==3005==    still reachable: 0 bytes in 0 blocks.
==3005==         suppressed: 0 bytes in 0 blocks.
==3005== Reachable blocks (those to which a pointer was found) are not shown.
==3005== To see them, rerun with: --show-reachable=yes
--3005--     TT/TC: 0 tc sectors discarded.
--3005--            4007 tt_fast misses.
--3005-- translate: new     3830 (65594 -> 859803; ratio 131:10)
--3005--            discard 77 (959 -> 13116; ratio 136:10).
--3005-- chainings: 2386 chainings, 3 unchainings.
--3005--  dispatch: 100000 jumps (bb entries); of them 20785 (20%) unchained.
--3005--            538/4633 major/minor sched events.
--3005-- reg-alloc: 769 t-req-spill, 159235+5917 orig+spill uis,
--3005--            20386 total-reg-rank
--3005--    sanity: 276 cheap, 12 expensive checks.
--3005--    ccalls: 14325 C calls, 55% saves+restores avoided (46562 bytes)
--3005--            19186 args, avg 0.87 setup instrs each (4904 bytes)
--3005--            0% clear the stack (42690 bytes)
--3005--            6072 retvals, 30% of reg-reg movs avoided (3602 bytes)

hmm. 272385 bytes in 1 blocks are definitely lost in loss record 1 of 1
I set bayes to disable.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to