Bug 6117 - CLOSE_WAIT and defunct process problems
Summary: CLOSE_WAIT and defunct process problems
Status: RESOLVED INVALID
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamc/spamd (show other bugs)
Version: 3.2.5
Hardware: Other Linux
: P5 major
Target Milestone: 3.2.5
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-23 22:29 UTC by Guido Allione
Modified: 2009-05-26 15:57 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Guido Allione 2009-05-23 22:29:59 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.
Comment 1 Mark Martinec 2009-05-24 16:01:43 UTC
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.
Comment 2 Mark Martinec 2009-05-26 15:57:09 UTC
Closing, unless some evidence is presented that it is a spamd problem.