dspam: exited on signal 11 (core dumped)

Hi all,

Trying to fix a small problem elsewhere, I inadvertently broke my mail/dspam installation. dspam is now dying about once an hour, and I see lines like this in /var/log/maillog:
Code:
status=deferred (lost connection with myhost [/var/run/dspam.sock] while performing the LHLO handshake)
I have debugging switched on, but /var/log/dspam/dspam.debug isn't telling me anything. In dmesg, however, I repeatedly see lines like this:
Code:
pid 7038 (dspam), uid 0: exited on signal 11 (core dumped)
dspam appears to be running OK; it is filtering messages and writing to its logs and data files (/var/db/dspam/data), but is sporadically dying. Any suggestions for how to determine why this is happening?
 
Reinstall dspam with WITH_DEBUG flag. Use gdb(1) to print a complete backtrace. IIRC core dumps with signal core 11 are RAM problems.
# cd /usr/ports/mail/dspam && make WITH_DEBUG=yes install clean

Submit a PR to freebsd-currents@ ML providing the output.
 
Thanks. This is what I now see in gdb:

Code:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 801408800 (LWP 146330/dspam)]
0x00000008011e93fa in _hash_drv_seek (map=0x8014be200, offset=0, hashcode=3254489448401649664, flags=0) at hash_drv.c:1193
1193	hash_drv.c: No such file or directory.
	in hash_drv.c
 
Running # cssclean [email=/var/db/dspam/data/user@domain.tld]/var/db/dspam/data/user@domain.tld[/email]/user@domain.tld.css seems to have fixed it... I think.
 
No more segfaults; if the hash file was corrupt, it is no longer. Not sure what was going on there; I run cssclean in a nightly cronjob; it wasn't like it was the first time I used that command.

I thought this might be a useful opportunity to migrate to the MySQL driver. dspam includes a command for importing tokens from the hash file format into MySQL: # dspam_2sql | mysql -D dspam -u dspam -p
But alas it throws up a lot of errors like this:
Code:
Unable to obtain uid for user cb@domain.TLD
That makes sense, no, these would all be virtual users. But I can't find any documentation explaining how this is supposed to work.
 
Thanks, I had already seen that page. Problem is, that patch is for v3.8. The oldest version I can find on SF is v3.9

If one knows what they are doing (which I don't), perhaps one could patch the patch file, but this is getting above my head:
Code:
--- dspam-3.8.0.orig/src/tools/dspam_2sql.c	2006-05-13 03:13:01.000000000 +0200
+++ dspam-3.8.0/src/tools/dspam_2sql.c	2009-03-03 18:12:45.000000000 +0100
@@ -25,6 +25,7 @@
[...]
 
cbrace said:
Not sure I follow you. I don't have access to dspam-3.8.0/src/tools/dspam_2sql.c

# diff -u dspam_2sql.c.orig dspam_2sql.c > dspam_2sql.c.diff
Code:
--- dspam_2sql.c.orig   2006-05-13 03:13:01.000000000 +0200
+++ dspam_2sql.c        2013-05-02 13:44:02.000000000 +0200
@@ -2,7 +2,7 @@
 
 /*
  DSPAM
- COPYRIGHT (C) 2002-2006 JONATHAN A. ZDZIARSKI
+ COPYRIGHT (C) 2002-2009 DSPAM PROJECT

Apply patch is safe:

Code:
# cd /usr/ports/mail/dspam/work/dspam-3.9.0/src/tools
# fetch http://www.shapeshifter.se/wp-content/uploads/2009/03/dspam_2sql_virtuser.patch
# patch -p0 < dspam_2sql_virtuser.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- dspam-3.8.0.orig/src/tools/dspam_2sql.c	2006-05-13 03:13:01.000000000 +0200
|+++ dspam-3.8.0/src/tools/dspam_2sql.c	2009-03-03 18:12:45.000000000 +0100
--------------------------
File to patch: dspam_2sql.c
Patching file dspam_2sql.c using Plan A...
Hunk #1 succeeded at 25.
Hunk #2 succeeded at 44.
Hunk #3 succeeded at 59.
Hunk #4 succeeded at 77.
Hunk #5 succeeded at 89.
Hunk #6 succeeded at 100.
Hunk #7 succeeded at 117.
Hunk #8 succeeded at 157.
Hunk #9 succeeded at 167.
Hunk #10 succeeded at 204.
Hunk #11 succeeded at 213.
done

Rebuild mail/dspam port.
 
Back
Top