Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#40501 - [dspam] segfaults during processing,

Attached to Project: Community Packages
Opened by Leeman (alaricljs) - Friday, 23 May 2014, 01:58 GMT
Last edited by Sergej Pupykin (sergej) - Tuesday, 24 June 2014, 11:28 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I'm attempting to move my current mail server setup from Gentoo to Arch. The only piece of the puzzle that is not fitting in is dspam.

dspam-3.10.2-8 installed from community and also rebuilt locally from the community PKGBUILD segfaults in a way that I've only found reported once before and was resolved by rebuilding with different optimization flags. (here's the cleanest source: http://permalink.gmane.org/gmane.mail.spam.dspam.user/18954 )

Log output is: dspam[12421]: Ignoring disallowed preference 'signatureLocation'
and then it segfaults. strace attached.

The setup/config is exactly as is working on Gentoo, LMTP from postfix -> dspam -> dovecot-deliver.



This task depends upon

Closed by  Sergej Pupykin (sergej)
Tuesday, 24 June 2014, 11:28 GMT
Reason for closing:  Fixed
Comment by Sergej Pupykin (sergej) - Friday, 23 May 2014, 09:52 GMT
please try dspam 3.10.2-9
Comment by Leeman (alaricljs) - Friday, 23 May 2014, 21:39 GMT
No change.

In my working dspam here are the strace lines immediately following where this one segfaults:

22279 stat("/data/mail/dspam/opt-in/domain.com/me.dspam", 0x7f3014ade5d0) = -1 ENOENT (No such file or directory)
22279 stat("/data/mail/dspam/opt-out/domain.com/me.nodspam", 0x7f3014ade5d0) = -1 ENOENT (No such file or directory)
22279 gettimeofday({1400810812, 867222}, NULL) = 0
22279 open("(null)", O_RDONLY) = -1 ENOENT (No such file or directory)

Seeing as how they don't exist on either installation, their non-existence shouldn't be causing the crash.
Comment by Leeman (alaricljs) - Wednesday, 28 May 2014, 01:50 GMT
w/ --enable-debug, dspam.debug:
28378: [05/27/2014 21:47:25] DSPAM Instance Startup
28378: [05/27/2014 21:47:25] input args: dspam --deliver=innocent,spam
28378: [05/27/2014 21:47:25] pass-thru args: /usr/lib/dovecot/deliver -d %u
28378: [05/27/2014 21:47:25] processing user me@domain.com
28378: [05/27/2014 21:47:25] uid = 500, euid = 500, gid = 500, egid = 500
28378: [05/27/2014 21:47:25] loading preferences for user me@domain.com
28378: [05/27/2014 21:47:25] _pgsql_drv_getpwnam: successful returning struct for name: me@domain.com
28378: [05/27/2014 21:47:25] Loading preferences for uid 1
28378: [05/27/2014 21:47:25] Loading preferences for uid 0
28378: [05/27/2014 21:47:25] Loading preferences for uid 0
28378: [05/27/2014 21:47:25] loaded default preferences externally

Comment by Leeman (alaricljs) - Wednesday, 28 May 2014, 15:01 GMT
gdb core analysis: (edited to get actual debugging... wow that was not as easy as I remember)

Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fad9ef95ac7 in vfprintf () from /usr/lib/libc.so.6
#1 0x00007fad9f044616 in __vsnprintf_chk () from /usr/lib/libc.so.6
#2 0x00007fad9fe88e03 in vsnprintf (__ap=0x7fad9d11f1d8,
__fmt=0x7fad9fe917c8 "Ignoring disallowed preference '%s'", __n=256,
__s=0x7fad9d11f270 "Ignoring disallowed preference '\001")
at /usr/include/bits/stdio2.h:77
#3 LOG (priority=priority@entry=3,
err=err@entry=0x7fad9fe917c8 "Ignoring disallowed preference '%s'")
at error.c:94
#4 0x00007fad9fe8bb32 in _ds_pref_aggregate (STX=STX@entry=0x7fad98003880,
UTX=UTX@entry=0x7fad98004d60) at pref.c:90
#5 0x000000000040a310 in load_aggregated_prefs (ATX=ATX@entry=0x7fad98000f30,
username=username@entry=0x7fad98001ea0 "invest@domain.com") at dspam.c:4325
#6 0x000000000040bf8b in process_users (ATX=0x7fad98000f30,
message=0x7fad98001f60) at dspam.c:1812
#7 0x000000000040f8b6 in process_connection (ptr=0x1823ee0) at daemon.c:738
#8 0x00007fad9f302124 in start_thread () from /usr/lib/libpthread.so.0
#9 0x00007fad9f0364bd in clone () from /usr/lib/libc.so.6
Comment by Leeman (alaricljs) - Wednesday, 28 May 2014, 16:09 GMT
Solved.

Ok, that was harder than it should have been.... interesting how the log output pertained to exactly the item that needed attention. For whatever reason I had to delete from the DB the preference for signatureLocation=headers

Loading...