spamd child eating 100% of Cpu help

bsasninja

Well-Known Member
Sep 2, 2004
527
0
166
Spamd child is eating 100% of CPU.
It happens only with a mail account.

Notes:
Spamassasin is globaly enabled on all domains, but I cant disable in this one.
Mail account is empty

The only fix I found by now is to stop and start exim. Is there a permanent solution to this?????

Help will be apreciated!

Thanks
 

jack01

Well-Known Member
Jul 21, 2004
200
0
166
bsasninja,

We have this same problem on 2 of our servers, the same user (different on each server) keeps hogging a "spamd child" process with high cpu, as if its endlessly looping or something.

Can you confirm that since reinstalling the account as per your solution that this really did stop for good?

Thanks.

P.S. does anyone else have a fix that does not involve removing the affected account(s)?
 
Last edited:

yapluka

Well-Known Member
Dec 24, 2003
301
1
168
France
cPanel Access Level
Root Administrator
Check that the account is not running out of space. I had the very same issue and this was the cause...

Good luck :)
 

bsasninja

Well-Known Member
Sep 2, 2004
527
0
166
shows the following

open("/home/user/.spamassassin/auto-whitelist.lock.server1.domain.com.31435", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 11
ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfe854f8) = -1 ENOTTY (Inappropriate ioctl for device)

stat64("/home/user/.spamassassin/auto-whitelist", {st_mode=S_IFREG|0600, st_size=10510336, ...}) = 0
open("/home/user/.spamassassin/auto-whitelist", O_RDWR|O_LARGEFILE) = 11

is there a way to tell spamassassin not to scan files over 1mb or so ?

Thanks
 

dexus

Well-Known Member
Jan 14, 2006
180
11
168
cPanel Access Level
Root Administrator
I had the same problem for last few days, but when my spamd stucks it did this:

Code:
stat64("/home/user/.spamassassin/bayes_toks.new", 0xbfffb120) = -1 ENOENT (No such file or directory)
open("/home/user/.spamassassin/__db.bayes_toks.new", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = -1 EEXIST (File exists)
open("/home/user/.spamassassin/__db.bayes_toks.new", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = -1 EEXIST (File exists)
open("/home/user/.spamassassin/__db.bayes_toks.new", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = -1 EEXIST (File exists)
stat64("/home/user/.spamassassin/bayes_toks.new", 0xbfffb120) = -1 ENOENT (No such file or directory)
open("/home/user/.spamassassin/__db.bayes_toks.new", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = -1 EEXIST (File exists)
open("/home/user/.spamassassin/__db.bayes_toks.new", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = -1 EEXIST (File exists)
So I just deleted file /home/user/.spamassassin/__db.bayes_toks.new and spamd got out of loop :)
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,483
35
208
cPanel Access Level
DataCenter Provider
Also make sure you have perl 5.8.8
and if you aren't using nfs

uncomment lock_method flock in /etc/mail/spamassassin/local.cf and run
Code:
/scripts/restartsrv_exim
 

isputra

Well-Known Member
May 3, 2003
575
0
166
Mbelitar
In my case, my customer is running out of space.
So i do like dexus said and works.

I have perl 5.8.8 :
----------
[email protected] [~]# perl -v
This is perl, v5.8.8 built for i686-linux
----------

cpanelnick, could you explain to me what is lock_method flock in /etc/mail/spamassassin/local.cf for ?
 

adapter

Well-Known Member
PartnerNOC
Sep 17, 2003
391
0
166
same problem here, if i delete the db file in the spamassasin folder i am out from the loop, but is there any fast way to fix this problem? i can't do it for all my server and over quota account

Thx
 

myrtlenet

Registered
Apr 19, 2005
1
0
151
Same problem

Some accounts close to quota, others have plenty of space. Other thing is it seems to be random. It started out with 3 accounts, now its around 7.

I ended up turning Bayesian off altogether
 

Arsalan

Well-Known Member
Jan 5, 2002
51
0
306
try deleting the databases of Bayesian in /home/user/.spamassassin


We found that large databases are usually responsible for this problem. Removing the files usually resolves the issue. Further more, keep an eye out on their size.
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,483
35
208
cPanel Access Level
DataCenter Provider
This is a bug in the berkleydb library. We have tracked it down and are testing a work around patch for spamassassin. We have also reported the problem to spamassassin and the DB_File author. We will release an autofixer for spamassassin once the testing has been completed and proven to not create any unwanted side effected.

Note: RHEL 5 && Centos 5 are not affected
 

xphost

Well-Known Member
Nov 12, 2003
76
0
156
have the same problem after bug fix

User Domain %CPU %MEM MySQL Processes
login login.com 9.59 2.47 0.0
Top Process %CPU 34.8 spamd child
Top Process %CPU 33.9 spamd child
Top Process %CPU 32.2 spamd child