You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Carlo Contavalli <cc...@commedia.it> on 2005/09/26 19:28:53 UTC

pyzor & leftover processes

Hello, 
  using spamd (3.02/3.0.4) on quite some busy servers, with different
versions of Debian GNU/Linux, after a couple days there are many, many, 
apparently useless, pyzor processes running. 

  By looking to the Dns.pm and Report.pm code, helper_app_pipe_open, 
it seems like that at a given time there shouldn't be more than a 
single instance of pyzor running for a given spamd children. However, 
the output of ps faux doesn't look like so.

  By stracing some of the leftover pyzors, I can see they're stuck
on a recvfrom, probably on an UDP socket. Well, by looking at Dns.pm
and Report.pm, I can see that an alarm with a timeout is set while
waiting for a pyzor reply. What I cannot see is some cleanup code
in case the timeout expires. Eg, if the 10 seconds default timeout
expires, the die() exits the eval block, waitpid is never called,
the PYZOR descriptor not closed, and the process left there, hoping
it will eventually die earlyer or later. 

Wouldn't it be better to try to kill the process, since its
reply is no longer needed? Is this correct? Should I report this 
as a BUG? (I can't find any other reason why leftover pyzors
could be left around...)

Note: I looked around on the BTS and mailing lists, but couldn't
find any reference to this problem... ok, maybe this is the 
wrong ml...

Cheers,
Carlo

-- 
  GPG Fingerprint: 2383 7B14 4D08 53A4 2C1A CA29 9E98 5431 1A68 6975
                        -------------
"Here at the Phone Company, we serve all kinds of people; from
Presidents and Kings to the scum of the earth ..."