https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7357
Bug ID: 7357
Summary: spamc memory leak
Product: Spamassassin
Version: 3.4.1
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: spamc/spamd
Assignee: [email protected]
Reporter: [email protected]
I run a low-volume spamd and exim on Debian.
Lately, the spamd children keep growing and growing, until one gets killed by
the kernel oom-killer. When first started, each child starts at about 100MB.
By they time they get killed, a child can grow to about 1.5GB. The trouble is
when it gets really fat, it has trouble forking dcc and pyzor.
I don't run any special custom rules. Mostly stock stuff with a few plugins
enabled (Pyzor, Razor, DCC, TxRep, Bayes, ASN, RelayCountry). If I disable
those plugins, there's still a (slower) memory leak. Rules are pre-compiled.
A simple message, repeated enough times will eventually grow out of control.
Spamd gets started by the standard Debian scripts with the following options:
/usr/sbin/spamd --nouser-config --username=debian-spamd
--groupname=debian-spamd --max-children 5
--helper-home-dir=/var/lib/spamassassin/ --listen /run/spamd.socket -d
--pidfile=/var/run/spamd.pid
My 'fix' is to restart spamd with a cron job. But that's just a band-aid
solution.
I can try and help further diagnose the problem, but I wouldn't even know where
to start.
Any help is appreciated.
Thanks,
Marc
debian-spamd@mail:~$ while true; do cat /tmp/test1.eml | spamc -y -U
/run/spamd.socket ; echo ; ps xv | grep spamd; echo ; done
ALL_TRUSTED,BAYES_00,MISSING_HEADERS,PYZOR_CHECK
4408 ? R 0:04 0 0 234380 113324 5.5 spamd child
4409 ? S 0:00 0 0 223512 99632 4.8 spamd child
4424 pts/5 R+ 0:00 0 200 15215 1968 0.0 grep spamd
ALL_TRUSTED,BAYES_00,MISSING_HEADERS,PYZOR_CHECK
4408 ? S 0:04 0 0 234832 113788 5.5 spamd child
4409 ? R 0:04 0 0 234512 113404 5.5 spamd child
4431 pts/5 S+ 0:00 0 200 15215 1904 0.0 grep spamd
ALL_TRUSTED,BAYES_00,MISSING_HEADERS,PYZOR_CHECK
4408 ? R 0:09 0 0 241564 120500 5.8 spamd child
4409 ? S 0:04 0 0 234816 113692 5.5 spamd child
4443 pts/5 S+ 0:00 0 200 15215 1904 0.0 grep spamd
ALL_TRUSTED,BAYES_00,MISSING_HEADERS,PYZOR_CHECK
4408 ? S 0:09 0 0 241844 120680 5.8 spamd child
4409 ? R 0:09 0 0 241556 120532 5.8 spamd child
4450 pts/5 S+ 0:00 0 200 15215 1884 0.0 grep spamd
^C
This is the message:
Return-path: <[email protected]>
Envelope-to: [email protected]
Delivery-date: Sun, 09 Oct 2016 07:29:22 -0500
Received: from localhost ([::1] helo=mclemente.net)
by mail.mclemente.net with smtp (Exim 4.87)
(envelope-from <[email protected]>)
id 1btDDu-0002gS-CC
for [email protected]; Sun, 09 Oct 2016 07:29:21 -0500
Subject: test1
Message-Id: <[email protected]>
From: [email protected]
Date: Sun, 09 Oct 2016 07:29:04 -0500
test1
--
You are receiving this mail because:
You are the assignee for the bug.