SA Bugzilla – Bug 6117
CLOSE_WAIT and defunct process problems
Last modified: 2009-05-26 15:57:09 UTC
HI, recently use spamassassin 3.2.5-26-7 in openSuse 11.0 with postfix 2.5.5-6.7 and amavisd 2.6.1. If my mail Server received high number of mail for minutes, after I have into my server the follow situation: 1) CPU hight load (view top command into %id cpu information) 2) very much socket in CLOSE_WAIT condition (with netstat -tpan) 3) two or more process (see after) defunct (??). This proces not close if send kill -9 <pid> command (and after ending spamd deamon). only solution (today) is reboot server. Example (process defunct): # ps aux | grep spam nobody 735 0.0 2.4 53680 49776 ? D 01:12 0:07 spamd child nobody 5136 0.0 2.4 53428 49496 ? D 04:22 0:07 spamd child Help me! Thank's.
You say you are using amavisd-new, but next you talk about a spamd child process. So which one is it? Are you using amavisd or spamd? Either one can use the SpamAssasin library, and you most likely don't need both for spam filtering. > If my mail Server received high number of mail for minutes, after I > have into my server the follow situation: > 1) CPU hight load (view top command into %id cpu information) SpamAssassin is quite CPU intensive, so this is likely a normal situation. You can control the load by letting MTA only use a limited number of concurrent content filtering sessions, or specifying the maximum number of child processes for spamd, if using it. > 2) very much socket in CLOSE_WAIT condition (with netstat -tpan) What program are these processes running? Spamd? Amavisd? Some other utility program? A CLOSE_WAIT means the remote client closed a TCP session but the server process did not yet close its socket. Could be due to an overloaded system, or due to a programming error. > 3) two or more process (see after) defunct (??). This proces not close if > send kill -9 <pid> command (and after ending spamd deamon). > only solution (today) is reboot server. > > Example (process defunct): > # ps aux | grep spam > nobody 735 0.0 2.4 53680 49776 ? D 01:12 0:07 spamd child > nobody 5136 0.0 2.4 53428 49496 ? D 04:22 0:07 spamd child Hey, Unix is not a Windows system where you'd have to reboot when something goes wrong. A defunc process does not exist anymore, so it can't be killed. What is left of it is only an entry in the process table, which does not consume resources (apart for a couple of bytes). You get rid of a zombie by killing its parent process, which forgot to reclaim its child or is too busy with other duties. Btw, if this is an amavisd question, this isn't and appropriate forum - use its mailing list.
Closing, unless some evidence is presented that it is a spamd problem.