You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by snowcrash+spamassassin <sc...@gmail.com> on 2006/12/14 05:18:37 UTC

spamd won't stay dead. (possible follow-up to bug 4304?)

after launching spamd (31x branch, r486953) with,

	spamd --daemonize --nouser-config --allow-tell
--allowed-ips=192.168.1.10,127.0.0.1 --listen-ip=127.0.0.1 --port=783
</dev/null >> /var/log/spamd.log &

i see only,

	ps -ax | grep -i spamd
	  922  ??  S      0:00.18 spamd child
	  923  ??  S      0:00.14 spamd child
	24006  p1  R+     0:00.01 grep -i spamd

if i want to stop/restart spamd,

	kill 922 923

kills the two child processes, which then immediately restart.

iirc, this,

	kill -HUP `ps -ax | grep \? | grep "bin/spamd" | cut -c1-5`

used to work because i actually saw a kill-able spamd master process.

how do i kill spamd and "keep it dead"?

this bug,

	http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4304

seems related, and seomthing (a fix?) WAS committed to r485842, but
i'm still seeing this problem with my version.

was this commit a fix?
was it to TRUNK or bracnh 31x?

Re: spamd won't stay dead. (possible follow-up to bug 4304?)

Posted by snowcrash+spamassassin <sc...@gmail.com>.
> >  % ps -ef | grep spamd
> >    ps: illegal option -- f
>
> Hrm.  What platform are you on?  "ps -axwg", "ps -el" ?

well, what day/time is it?

at the moment, MacOSXServer.  during the day, usually an OpenSuSE or
FreeBSD box.

> Anyway, you could also look at using a pid file.  Tell spamd when starting "-r
> /path/to/pidfile", and then you can use that to figure out who the parent is.

i had actually been specifying the PID just didn't include it in my
post), and had not thought of that.

but still, the master was missing.

anyway, i've switched to unix sockets for now -- goood enough.

and, i *see* the master with a simple "ps -ax" ... which is what i
remember the behavior as being b4.

also, with the unix sockets, the other issue i posted abt, repeating
messages of,

Wed Dec 13 18:36:13 2006 [923] dbg: prefork: periodic ping from spamd parent
Wed Dec 13 18:36:13 2006 [923] dbg: prefork: sysread(9) not ready,
wait max 300 secs

seems to have been resolved as well.

Re: spamd won't stay dead. (possible follow-up to bug 4304?)

Posted by Theo Van Dinter <fe...@apache.org>.
On Wed, Dec 13, 2006 at 09:05:39PM -0800, snowcrash+spamassassin wrote:
> not sure what you're looking for here, but,
> 
>  % ps -ef | grep spamd
>    ps: illegal option -- f

Hrm.  What platform are you on?  "ps -axwg", "ps -el" ?

Anyway, you could also look at using a pid file.  Tell spamd when starting "-r
/path/to/pidfile", and then you can use that to figure out who the parent is.

-- 
Randomly Selected Tagline:
Love is grand.  Divorce, twenty grand.

Re: spamd won't stay dead. (possible follow-up to bug 4304?)

Posted by snowcrash+spamassassin <sc...@gmail.com>.
> Hrm.  There's no parent in that output.
>
> Try "ps -ef | grep spamd" and see what happens.

not sure what you're looking for here, but,

  % ps -ef | grep spamd
    ps: illegal option -- f

> > kills the two child processes, which then immediately restart.
>
> Yeah, you need to deal with the parent, not the children.

hm.

if i replace,

	--allowed-ips=192.168.1.10,127.0.0.1 --listen-ip=127.0.0.1 --port=783

with,

	--socketpath /var/proc/spamd.sock --socketowner spamassassin
--socketgroup spamassassin --socketmode 0664

and then relaunch spamd,

checking, i see, now,

ps -ax | grep -i spamd
24190  ??  Ss     0:11.55 /usr/bin/perl -T -w
/usr/local/spamassassin/bin/spamd ... --allow-tell --daemonize
--min-children
24213  ??  S      0:00.07 spamd child
24214  ??  S      0:00.07 spamd child
24216  p2  S+     0:00.00 grep -i spamd

so the master is here now.

this 'missing master' is, for me, reproducible when spamd is launched
using TCP sockets.

anyway, now, with spamd launch on UNIX sock,

	kill `ps -ax | grep \? | grep "bin/spamd" | cut -c1-5`

works as expected.

as i use spamd on localhost to my MTA, UNIX sock is just fine.

are there any DISadvantages to launching spamd on a UNIX socket, vs a
TCP socket?

Re: spamd won't stay dead. (possible follow-up to bug 4304?)

Posted by Theo Van Dinter <fe...@apache.org>.
On Wed, Dec 13, 2006 at 08:18:37PM -0800, snowcrash+spamassassin wrote:
> 	ps -ax | grep -i spamd
> 	  922  ??  S      0:00.18 spamd child
> 	  923  ??  S      0:00.14 spamd child
> 	24006  p1  R+     0:00.01 grep -i spamd

Hrm.  There's no parent in that output.

Try "ps -ef | grep spamd" and see what happens.

> kills the two child processes, which then immediately restart.

Yeah, you need to deal with the parent, not the children.

-- 
Randomly Selected Tagline:
"I feel so lucky that I have the right brain chemicals." - Dr. Lewis on ER