DaemonForums  

Go Back   DaemonForums > Miscellaneous > General software and network

General software and network General OS-independent software and network questions, X11, MTA, routing, etc.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 5th June 2008
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Thanked 6 Times in 6 Posts
Default OpenBSD's SPAMd dying

Hello,

I have a FreeBSD machine running OpenBSD's SPAMd and SPAMd crashes sometimes... "/usr/local/etc/rc.d/obspamd status" show the process is not running and there is only a gap in my logs... nothing about the failure. Restarting the service works.

Any ideas?
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
  #2   (View Single Post)  
Old 6th June 2008
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Thanked 25 Times in 24 Posts
Default

Well try to get crash dump of crashed process (if it crashed at all) and debug it. Find way to 100% reproduce problem.

Current report is very obscure.

obspamd appears to be shell script (it is listed in files directory of FreeBSD SPAMd port)
Reply With Quote
  #3   (View Single Post)  
Old 6th June 2008
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Thanked 6 Times in 6 Posts
Default

Thanks for the reply richardpl,

Yes, the problem is also very obscure to me. What makes me guess it's a crash is the absence of anything useful in my log file. I simply have a "gap" between the time the process died and when I restarted it manually:
Code:
Jun  6 05:06:25 spamd[96152]: 88.254.50.84: connected (3/1)
Jun  6 07:02:58  spamd[53857]: listening for incoming connections.
Currently, I am more suspecting another application is sending something like "killall spamd" to the system (to kill and restart, I think, Spam Assassin).

Would there be any ways of "intercepting" or logging those kill signals?

Thanks!
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
  #4   (View Single Post)  
Old 7th June 2008
ohauer ohauer is offline
Port Guard
 
Join Date: May 2008
Location: germany
Posts: 32
Thanked 2 Times in 2 Posts
Default

Quote:
Currently, I am more suspecting another application is sending something like "killall spamd" to the system (to kill and restart, I think, Spam Assassin).
This can be possible, to make shure it is this problem try the patch.
http://sorry.mine.nu/patches/FreeBSD...or-stukov.diff
short howto apply the patch:
Code:
cd /usr/ports/mail
patch < path_to_patch/patch-spamd-for-stukov
I never had this problems at any of my machines, but i don't run SpamAssassin's spamd.

Please give report so others can also benefit in next versions of spamd, even you solved the problem at another way.

Thanks
Attached Files
File Type: diff patch-spamd-for-stukov.diff (2.3 KB, 10 views)
Reply With Quote
  #5   (View Single Post)  
Old 9th June 2008
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Thanked 6 Times in 6 Posts
Default

Thanks for the patch ohauer. I will have to do this by night. I'll let you know guys how it went.
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
  #6   (View Single Post)  
Old 9th June 2008
ohauer ohauer is offline
Port Guard
 
Join Date: May 2008
Location: germany
Posts: 32
Thanked 2 Times in 2 Posts
Default

Please note the patch change only the binary name to obspamd and adjusts the name in the rc script and for the pitfile.
If the problem persists we have to search for the reason in the ported spamd.
If the problem is gone we have to search if something send a signal to the wrong deamon.
I hope the second one
Reply With Quote
  #7   (View Single Post)  
Old 15th June 2008
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Thanked 6 Times in 6 Posts
Default

OK. Dumb question. How do I overcome to following error?
Code:
# cvsup /root/ports-supfile
# cd /usr/ports/mail
# patch < /tmp/spamd-patch
# cd spamd
# make
===>  Extracting for spamd-4.1.2
=> MD5 Checksum OK for spamd-4.1.2.tar.gz.
=> SHA256 Checksum OK for spamd-4.1.2.tar.gz.
===>  Patching for spamd-4.1.2
===>  Applying FreeBSD patches for spamd-4.1.2
1 out of 1 hunks failed--saving rejects to spamd/Makefile.rej
=> Patch patch-spamd:Makefile failed to apply cleanly.
=> Patch(es) patch-makefile applied cleanly.
*** Error code 1

Stop in /usr/ports/mail/spamd.
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
  #8   (View Single Post)  
Old 15th June 2008
ohauer ohauer is offline
Port Guard
 
Join Date: May 2008
Location: germany
Posts: 32
Thanked 2 Times in 2 Posts
Default

Hm,

maybe there is some leftover.
I made a clean port for you, please grap it here:
http://sorry.mine.nu/patches/FreeBSD...-stukov.tar.gz

extract the port with the following command
# tar xvfz spamd-stukov.tar.gz -C /usr/ports/mail/
then
# cd /usr/ports/mail/spamd-stukov/
# make

If you have problems send me a PR
Reply With Quote
  #9   (View Single Post)  
Old 15th June 2008
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Thanked 6 Times in 6 Posts
Default

Thanks ohauer. New port in place. Let's hope the process will survive tomorrow. I'll let you know if that worked out as expected.

Thanks!
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
Old 16th June 2008
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Thanked 6 Times in 6 Posts
Default

ohauer, that did the trick. I could sleep late this morning because there were no Nagios alarms to wake me up

I suppose this was, in fact, a killall sent by some cPanel script for SpamAssassin.

Thanks again!
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
Old 16th June 2008
ohauer ohauer is offline
Port Guard
 
Join Date: May 2008
Location: germany
Posts: 32
Thanked 2 Times in 2 Posts
Default

Quote:
I could sleep late this morning because there were no Nagios alarms to wake me up
Thats one of the reason why people choose *BSD

I'm a little afread that this happens again if you update the mail/spamd port.

I have taken a short look into the community from cPanel and notice that some of them adjust there scripts from `pkill -HUP $procname` to 'kill -HUP `cat /var/run/xxx.pid`'

Can you do a grep -R spamd over the cPanel scripts?
Maybe they can adjust the kill command in the next release to the pidfile?

At the moment there are two pid files
/var/run/spamd/spamd.pid => SpamAssassin spamd
/var/run/spamd.pid => OpenBSD spamd (in your case with patch now obspamd.pid)

Reasons to not change the default deamon name to obspamd for me
- keep code and names from OpenBSD so people know it comes from there
- break of existing scripts for the mail/spamd port since procname change, for example logfile parsers, statistics ...
- bad feedback for the change from pf-spamd to obspamd (that's another story)
Reply With Quote
Old 16th June 2008
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Thanked 6 Times in 6 Posts
Default

Thanks ohauer. I will open a bug report with cPanel and strongly recommend that this issues gets fixed for the other releases.

Thank you very much for you help, your patches and your helpful explanations.
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
spamd logging question roundkat OpenBSD General 10 11th June 2008 01:27 PM


All times are GMT. The time now is 06:32 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick