Date: Wed, 25 Feb 2009 14:42:43 +0100 From: Max Laier <max@love2party.net> To: freebsd-pf@freebsd.org Cc: beck@openbsd.org, samm@os2.kiev.ua, Artis Caune <artis.caune@gmail.com> Subject: Re: openbsd spamd is leaking memory? Message-ID: <200902251442.43794.max@love2party.net> In-Reply-To: <9e20d71e0902250435y6e090fb0rc138233242fe7d60@mail.gmail.com> References: <9e20d71e0902250435y6e090fb0rc138233242fe7d60@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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@freebsd.org
\ / Max Laier | ICQ #67774661
X http://pf4freebsd.love2party.net/ | mlaier@EFnet
/ \ ASCII Ribbon Campaign | Against HTML Mail and News
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902251442.43794.max>
