Bug#445680: cyrus-imapd-2.2: mail lost: race condition with duplicates and shutdown?
Ross Boylan
RossBoylan at stanfordalumni.org
Sun Oct 7 18:09:23 UTC 2007
Package: cyrus-imapd-2.2
Version: 2.2.13-13
Severity: normal
This problem appears to involve data loss. A message was being
delivered while the server was shutting down. It appears not to have
been delivered, but when the server came back up there was an entry
for it in the duplicates database. So the retry (by exim) was tossed.
As a result, the mail was never saved by cyrus.
I speculate that the problem is that a message's id goes into the
duplicate database before the message is actually delivered. It would
be safer to make the entry after delivery.
Oct 7 01:28:59 corn cyrus/master[22025]: about to exec /usr/lib/cyrus/bin/lmtpd
Oct 7 01:28:59 corn cyrus/lmtpunix[22025]: executed
Oct 7 01:29:00 corn cyrus/lmtpunix[22025]: accepted connection
Oct 7 01:29:00 corn cyrus/lmtpunix[22025]: lmtp connection preauth'd as postman
Oct 7 01:29:00 corn cyrus/lmtpunix[22025]: WARNING: sieve script /var/spool/sieve/r/ross/defaultbc doesn't exist: No such file or directory
Oct 7 01:29:00 corn cyrus/lmtpunix[22025]: duplicate_check: <E1IeRVL-0005jA-1K at corn.betterworld.us> user.ross.comp.admin 0
Oct 7 01:29:02 corn cyrus/lmtpunix[22025]: duplicate_check: <E1IeRVL-0005jA-1K at corn.betterworld.us> user.ross.comp.admin 0
Oct 7 01:29:02 corn cyrus/lmtpunix[22025]: mystore: starting txn 2147485087
Oct 7 01:29:02 corn cyrus/lmtpunix[22025]: mystore: committing txn 2147485087
Oct 7 01:29:02 corn cyrus/lmtpunix[22025]: duplicate_mark: <E1IeRVL-0005jA-1K at corn.betterworld.us> user.ross.comp.admin 1191745740 134539227
Oct 7 01:29:03 corn cyrus/master[16669]: exiting on SIGTERM/SIGINT
Then, when it comes back up:
Oct 7 08:26:56 corn cyrus/master[8503]: about to exec /usr/lib/cyrus/bin/lmtpd
Oct 7 08:26:56 corn cyrus/lmtpunix[8503]: executed
Oct 7 08:26:56 corn cyrus/lmtpunix[8503]: accepted connection
Oct 7 08:26:56 corn cyrus/lmtpunix[8503]: lmtp connection preauth'd as postman
Oct 7 08:26:56 corn cyrus/lmtpunix[8503]: WARNING: sieve script /var/spool/sieve/r/ross/defaultbc doesn't exist: No such file or directory
Oct 7 08:26:56 corn cyrus/lmtpunix[8503]: duplicate_check: <E1IeRVL-0005jA-1K at corn.betterworld.us> user.ross.comp.admin 1191745740
Oct 7 08:26:56 corn cyrus/lmtpunix[8503]: dupelim: eliminated duplicate message to user.ross.comp.admin id <E1IeRVL-0005jA-1K at corn.betterworld.us> (delivery)
Oct 7 08:27:57 corn cyrus/master[8338]: process 8503 exited, status 0
The corresponding exim logs show this
2007-10-07 01:28:58 1IeRVL-0005jA-1K <= root at localhost H=localhost (corn.betterworld.us) [127.0.0.1] P=smtp S=5266
2007-10-07 01:29:03 1IeRVL-0005jA-1K == ross+comp.admin at betterworld.us <root at localhost> R=imap_user T=cyrus defer (-1): LMTP connection closed after end of data
2007-10-07 08:26:56 1IeRVL-0005jA-1K => ross+comp.admin <root at localhost> R=imap_user T=cyrus
2007-10-07 08:26:56 1IeRVL-0005jA-1K Completed
The message that got lost was from one backup job; the next backup job
was for Cyrus and shut the server down as its first step.
It is possible the real problem is that cyrus did not fully commit the
original transaction. I have a bdb backend.
The relevant spool directory has nothing timestamped around 1:29, so
the message, not just the index entry, seems to be missing.
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing'), (990, 'stable'), (50, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.18-5-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages cyrus-imapd-2.2 depends on:
ii cyrus-common-2.2 2.2.13-13 Cyrus mail system (common files)
ii libasn1-6-heimdal 0.7.2.dfsg.1-10 Libraries for Heimdal Kerberos
ii libc6 2.6.1-1+b1 GNU C Library: Shared libraries
ii libcomerr2 1.40.2-1 common error description library
ii libdb4.2 4.2.52+dfsg-4 Berkeley v4.2 Database Libraries [
ii libgssapi4-heimdal 0.7.2.dfsg.1-10 Libraries for Heimdal Kerberos
ii libkrb5-17-heimdal 0.7.2.dfsg.1-10 Libraries for Heimdal Kerberos
ii libroken16-heimdal 0.7.2.dfsg.1-10 Libraries for Heimdal Kerberos
ii libsasl2-2 2.1.22.dfsg1-14 Authentication abstraction library
ii libssl0.9.8 0.9.8e-9 SSL shared libraries
ii libwrap0 7.6.dbs-14 Wietse Venema's TCP wrappers libra
cyrus-imapd-2.2 recommends no packages.
-- no debconf information
More information about the Pkg-Cyrus-imapd-Debian-devel
mailing list