Miernik
2006-May-12 23:00 UTC
[Pkg-exim4-users] exim periodically segfaults on any attempt to deliver message to local mailbox
I have a strange problem with my exim4 which started happening from time
to time. Here is what happens when it tries to deliver eny message (here
I run it manually on one message with debug):
tarnica:~# exim4 -d -M 1FeUkc-0002oC-TK
Exim version 4.61 uid=0 gid=0 pid=16736 D=fbb95cfd
Berkeley DB: Sleepycat Software: Berkeley DB 4.2.52: (December 3, 2003)
Support for: crypteq iconv() IPv6 GnuTLS move_frozen_messages
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dsearch nis
nis0 passwd
Authenticators: cram_md5 plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
changed uid/gid: forcing real = effective
uid=0 gid=0 pid=16736
auxiliary group list: <none>
configuration file is /var/lib/exim4/config.autogenerated
log selectors = 00000ffc 00089001
cwd=/root 4 args: exim4 -d -M 1FeUkc-0002oC-TK
trusted user
admin user
skipping ACL configuration - not needed
set_process_info: 16736 delivering specified messages
set_process_info: 16736 delivering 1FeUkc-0002oC-TK
reading spool file 1FeUkc-0002oC-TK-H
user=root uid=0 gid=0 sender=eboard-bounces@ffii.org
sender_fullhost = localhost (tarnica.miernik.name) [127.0.0.1]
sender_rcvhost = localhost ([127.0.0.1] helo=tarnica.miernik.name)
sender_local=0 ident=unset
Non-recipients:
Empty Tree
---- End of tree ----
recipients_count=1
body_linecount=59 message_linecount=63
Delivery address list:
miernik@localhost
locking /var/spool/exim4/db/retry.lockfile
locked /var/spool/exim4/db/retry.lockfile
EXIM_DBOPEN(/var/spool/exim4/db/retry)
Segmentation fault
tarnica:~#
If I run the above command through strace, the end of strace run looks like this
write(2, "Delivery address list:\n", 23Delivery address list:
) = 23
write(2, " miernik@localhost \n", 21 miernik@localhost
) = 21
open("/var/spool/exim4/db/retry.lockfile", O_RDWR|O_LARGEFILE) = 5
write(2, "locking /var/spool/exim4/db/retr"..., 43locking
/var/spool/exim4/db/retry.lockfile
) = 43
alarm(60) = 0
fcntl64(5, F_SETLKW64, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0},
0xbff33d34) = 0
alarm(0) = 60
write(2, "locked /var/spool/exim4/db/retry"..., 42locked
/var/spool/exim4/db/retry.lockfile
) = 42
write(2, "EXIM_DBOPEN(/var/spool/exim4/db/"...,
39EXIM_DBOPEN(/var/spool/exim4/db/retry)
) = 39
open("/etc/mtab", O_RDONLY) = 6
fstat64(6, {st_mode=S_IFREG|0644, st_size=644, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f5d000
read(6, "/dev/hda1 / ext3 rw,errors=remou"..., 4096) = 644
close(6) = 0
munmap(0xb7f5d000, 4096) = 0
open("/proc/stat", O_RDONLY) = 6
fstat64(6, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f5d000
read(6, "cpu 382170 77548 99319 8606641 "..., 1024) = 708
read(6, "", 1024) = 0
close(6) = 0
munmap(0xb7f5d000, 4096) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
tarnica:~#
This started happening a few weeks ago, and for some days it did this
segfault with every message it tried, I couldn''t find a way to force it
to deliver a message. Then, after a few days, the problem went away by
itself, I don''t know how, just suddenly exim started delivering
messages. Then after a few days the segfault started happening again,
and again I couldn''t make it go away, but after another few days it got
fixed by itself. And yesterday the problem appeared again, and didn''t
go
away yet. Any idea what might be going on here?
I fetch mail with fetchmail, and the messages get dumped in
/var/spool/exim4/input/ and stay there, as any attempt to have them
delivered to user mailbox ends with a segfault like above.
I already tried moving away all files from subdirectories of
/var/spool/exim4/input/ and purging all exim4 packages (which didn''t
leave any old exim4 config or spool file there, everything cleared), and
installing them again, and then fetching some new mail (the mail that
was previously in /var/spool/exim4/input/ I backed-up somewhere else,
and didn''t move than back to /var/spool/exim4/input/ after reinstall as
I thought it might be some problem with corrupted mail) but it still
segfaults.
What should I try to reinstall, or what to try to debug? I don''t want
to
reinstall the whole system just because exim4 broke.
--
Miernik _________________________ xmpp:miernik@amessage.info
___________________/_______________________/ mailto:miernik@ffii.org
Protect Europe from a legal disaster. Petition against software patents
http://www.noepatents.org/index_html?LANG=en
Andreas Metzler
2006-May-13 07:10 UTC
[Pkg-exim4-users] exim periodically segfaults on any attempt to deliver message to local mailbox
On 2006-05-13 Miernik <miernik@ffii.org> wrote:> I have a strange problem with my exim4 which started happening from time > to time. Here is what happens when it tries to deliver eny message (here > I run it manually on one message with debug):> tarnica:~# exim4 -d -M 1FeUkc-0002oC-TK > Exim version 4.61 uid=0 gid=0 pid=16736 D=fbb95cfd > Berkeley DB: Sleepycat Software: Berkeley DB 4.2.52: (December 3, 2003)[...]> locked /var/spool/exim4/db/retry.lockfile > EXIM_DBOPEN(/var/spool/exim4/db/retry) > Segmentation fault[...]> What should I try to reinstall, or what to try to debug? I don''t want to > reinstall the whole system just because exim4 broke.Looks like the hints database somehow got f*cked up and berkeleyDB cannot handle it. Try removing the files in /var/spool/exim4/db/ (They just contain retry hints, no e-mails or other persistant data. cu andreas -- The ''Galactic Cleaning'' policy undertaken by Emperor Zhark is a personal vision of the emperor''s, and its inclusion in this work does not constitute tacit approval by the author or the publisher for any such projects, howsoever undertaken. (c) Jasper Ffforde
Miernik
2006-May-13 09:05 UTC
[Pkg-exim4-users] Re: exim periodically segfaults on any attempt to deliver message to local mailbox
Andreas Metzler <ametzler@downhill.at.eu.org> wrote:>> Berkeley DB: Sleepycat Software: Berkeley DB 4.2.52: (December 3, 2003) > [...] >> locked /var/spool/exim4/db/retry.lockfile >> EXIM_DBOPEN(/var/spool/exim4/db/retry) >> Segmentation fault > [...] >> What should I try to reinstall, or what to try to debug? I don''t want to >> reinstall the whole system just because exim4 broke. > > Looks like the hints database somehow got f*cked up and berkeleyDB > cannot handle it. Try removing the files in /var/spool/exim4/db/ (They > just contain retry hints, no e-mails or other persistant data. > cu andreasThat didn''t help, but doing: dpkg --force-depends --purge libdb4.2 wget http://ftp.pl.debian.org/debian/pool/main/d/db4.2/libdb4.2_4.2.52-23.1_i386.deb dpkg -i libdb4.2_4.2.52-23.1_i386.deb did help. Thanks for the clue! -- Miernik _________________________ xmpp:miernik@amessage.info ___________________/_______________________/ mailto:miernik@ffii.org Protect Europe from a legal disaster. Petition against software patents http://www.noepatents.org/index_html?LANG=en