Hi all.
I am trying to get dovecot (1.0.rc17) running with antispam plugin.
I have created another backend, which executes "sa-learn" from
spamassassin's arsenal. The backend is modeled after sendmail backend.
But I can't seem to get the plugin working wit either my backend or
signature-log.
This is my ".config":
DOVECOT=/usr/src/dovecot-1.0.7
DOVECOT_VERSION=1.0
BACKEND=spamassassin-exec
INSTALLDIR=/usr/lib/dovecot/modules/imap/
PLUGINNAME=antispam
This is how I make the plugin:
make && make install && chmod 644
/usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so
Since Ubuntu server does not come with dovecot sources, I have downloaded
dovecot-1.0.7 and put it in /usr/src. As far as I understand, only the
headers are needed, so this should not be the cause of the crash (if the
headers hadn't changed).
When invoked from dovecot process, the "imap" dies with signal 11.
When running:
strace /usr/sbin/dovecot --exec-mail imap
This is how it ends:
etdents64(8, /* 14 entries */, 4096) = 592
getdents64(8, /* 0 entries */, 4096) = 0
open("/usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so",
O_RDONLY) = 9
read(9, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\21"...,
512) 512
fstat64(9, {st_mode=S_IFREG|0644, st_size=19252, ...}) = 0
mmap2(NULL, 16148, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 9, 0)
0xb7f29000
mmap2(0xb7f2c000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 9, 0x2) = 0xb7f2c000
close(9) = 0
close(8) = 0
stat64("/var/mail/mailboxes/boky/Maildir/subscriptions", 0xbfc17d2c) =
-1
EACCES (Permission denied)
lstat64("/var/mail/mailboxes/boky/Maildir/cur", 0xbfc17c3c) = -1
EACCES
(Permission denied)
write(2, "imap(boky): ", 12imap(boky): ) = 12
write(2, "Error: ", 7Error: ) = 7
write(2, "lstat(/var/mail/mailboxes/boky/M"...,
69lstat(/var/mail/mailboxes/boky/Maildir/cur) failed: Permission denied) 69
write(2, "\n", 1
) = 1
open("/etc/localtime", O_RDONLY) = 8
fstat64(8, {st_mode=S_IFREG|0644, st_size=696, ...}) = 0
fstat64(8, {st_mode=S_IFREG|0644, st_size=696, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
0xb7de2000
read(8, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\6\0"...,
4096) 696
close(8) = 0
munmap(0xb7de2000, 4096) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=696, ...}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Process 4707 detached
antispam plugin was downloaded from:
http://git.sipsolutions.net/?p=dovecot-antispam.git;a=snapshot;h=HEAD;sf=tgz
Please advise me n next steps; I'm just a beginner with debugging C/C++.
Thank you all.
Boky
Charles Marcus
2007-Nov-17 20:20 UTC
[Dovecot] SIGSEGV (Segmentation fault) with antispam plugin
On 11/17/2007, Boky (verynotbad at gmail.com) wrote:> I am trying to get dovecot (1.0.rc17) running with antispam plugin.<snip>> DOVECOT=/usr/src/dovecot-1.0.7Is it 1.0rc17, or 1.0.7? Please always provide dovecot -n output instead of select snippets... -- Best regards, Charles
Johannes Berg
2007-Nov-18 13:12 UTC
[Dovecot] SIGSEGV (Segmentation fault) with antispam plugin
Hi,> I have created another backend, which executes "sa-learn" from > spamassassin's arsenal. The backend is modeled after sendmail > backend.Neat. Send me the file or a patch and I'll integrate it.> But I can't seem to get the plugin working wit either my backend or > signature-log. > > This is my ".config": > DOVECOT=/usr/src/dovecot-1.0.7 > DOVECOT_VERSION=1.0 > BACKEND=spamassassin-exec > INSTALLDIR=/usr/lib/dovecot/modules/imap/ > PLUGINNAME=antispamThat looks right.> Since Ubuntu server does not come with dovecot sources, I have > downloaded dovecot-1.0.7 and put it in /usr/src. As far as I > understand, only the headers are needed, so this should not be the > cause of the crash (if the headers hadn't changed). > > When invoked from dovecot process, the "imap" dies with signal 11. > > When running: > strace /usr/sbin/dovecot --exec-mail imap> stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=696, ...}) = 0 > --- SIGSEGV (Segmentation fault) @ 0 (0) --- > +++ killed by SIGSEGV +++ > Process 4707 detachedstrace is pretty useless for a segfault. Can you compile everything or at least the plugin with -g and run it in gdb? I've never had the plugin segfault on me, maybe your plugin's init code is bad? There are also a bunch of permission errors that may be causing it.> antispam plugin was downloaded > from:http://git.sipsolutions.net/?p=dovecot-antispam.git;a=snapshot;h=HEAD;sf=tgzThat should be good :) johannes -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 828 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20071118/e73f8a34/attachment-0002.bin>
Reasonably Related Threads
- Synchronizing to multiple locations on a single destination serve r
- [PATCH] xentop: fix sigsegv
- [Bug 21908] New: SIGSEGV when no kernel DRM present
- [LLVMdev] : SIGSEGV in compiled programs during stack unwinding
- [LLVMdev] : SIGSEGV in compiled programs during stack unwinding