openbsd spamd is leaking memory?

Max Laier max at love2party.net
Wed Feb 25 05:42:50 PST 2009


Hello Artis,

looks like a valid catch to me.  I'm CC'ing the upstream maintainer (Bob, 
that's you, right?)  From a quick glance there is also a minor leak in 
readsuffixlists in the goto bad case.

On Wednesday 25 February 2009 13:35:29 Artis Caune wrote:
> 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);"

-- 
/"\  Best regards,                      | mlaier at freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier at EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News


More information about the freebsd-pf mailing list