You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2004/09/25 17:20:54 UTC

[Bug 3817] spamd failed to restart on receiving SIGHUP (kill -HUP _pid_)

http://bugzilla.spamassassin.org/show_bug.cgi?id=3817





------- Additional Comments From tim@bishnet.net  2004-09-25 08:20 -------
Subject: Re:  New: spamd failed to restart on receiving SIGHUP
	(kill -HUP _pid_)

On Fri, 2004-09-24 at 05:52, bugzilla-daemon@bugzilla.spamassassin.org
wrote:
> I just upgraded my SA 2.63 to SA 3.00 GA and found that spamd had problems
> restarting on receiving HUP signal from kill.  It simply got killed.
> 
> A log for your reference:
> $ sudo ps ax | grep spam
>  2453 ?        S      0:01 /usr/bin/spamd -d -m5 -u mail                    
>  2458 ?        S      0:00 spamd child                                      
>  2459 ?        S      0:00 spamd child                                      
>  2460 ?        S      0:00 spamd child                                      
>  2461 ?        S      0:00 spamd child                                      
>  2462 ?        S      0:00 spamd child                                      
> $ sudo kill -HUP 2453
> $ sudo tail /var/log/maillog
> Sep 24 12:49:38 mail spamd[2453]: server successfully spawned child process, pid
> 2460 
> Sep 24 12:49:38 mail spamd[2453]: server successfully spawned child process, pid
> 2461 
> Sep 24 12:49:38 mail spamd[2453]: server successfully spawned child process, pid
> 2462 
> Sep 24 12:50:03 mail spamd[2453]: server hit by SIGHUP, restarting 
> Sep 24 12:50:03 mail spamd[2453]: child 2458 killed successfully 
> Sep 24 12:50:03 mail spamd[2453]: child 2461 killed successfully 
> Sep 24 12:50:03 mail spamd[2453]: child 2459 killed successfully 
> Sep 24 12:50:03 mail spamd[2453]: child 2462 killed successfully 
> Sep 24 12:50:03 mail spamd[2453]: child 2460 killed successfully 

[This is from experience :-)]

You're running as user mail, so what's happening is that spamd becomes
that user shortly after it's set things up (such as the pid file,
socket, logfile). Consequently, these things are usually owned by root.

When you use a HUP to restart it's running as user mail, causing it to
fail at operations like recreating the pid file and socket. SA doesn't
seem particularly vocal when this happens... it just seems to die.

My solution is just to restart SA by stopping it and starting it - a HUP
doesn't do much different than that.

There's some discussion on a a related issue here:
http://bugzilla.spamassassin.org/show_bug.cgi?id=3568

Cheers,
Tim.





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.