openbsd spamd is leaking memory?

Artis Caune artis.caune at gmail.com
Wed Feb 25 04:35:31 PST 2009


Hi,

we are running spamd-4.1.2 on amd64 boxes for a week now and one of
it's processes are getting bigger and bigger:
spamd: (pf <spamd-white> update) (spamd)
    SIZE: 836M
    RES: 773M

we use redundant firewalls and they have the same problem.

grey count is 500'000 - 1'000'000
white count is 80'000 and growing
200 - 600 concurrent connections to spamd
/var/db/spamd is 170M




I look at spamd/grey.c and found that while traversing SLIST in
do_changes() function, entry is removed from head but not freed:
    while (!SLIST_EMPTY(&db_changes)) {
        dbc = SLIST_FIRST(&db_changes);
        ...
        free(dbc->key);
        free(dbc->data);
        SLIST_REMOVE_HEAD(&db_changes, entry);
    }

there is no "free(dbc);"




-- 
regards,
Artis Caune

<----. CCNA | BSDA
<----|====================
<----' didii FreeBSD


More information about the freebsd-pf mailing list