[Dovecot] Mbox corruption - Inbox beginning with 'FFrom' or 'FrFrom'
Hello,
we're having some problems with our dovecot setup. I've seen similar problems in the mailing list some years ago but alas wasn't able to find a solution.
Our setup is as follows : An MX farm (postfix) sends mails via LMTP to a director farm (dovecot 2.1.12) which proxies pop3/imap/lmtp traffic to a dovecot farm (dovecot 2.1.16). All mailboxes and indexes are on NFS and all servers are Centos.
The problem is that at times we see mailboxes (all of them are in mbox format) beginning with FFrom or FrFrom and of course dovecot says it's not a valid mbox file. If we manually remove the offending extra characters from the beginning of the file everything is working again, but often the same user will show the problem again tomorrow. However it's very rare and so far we haven't been able to reproduce the problem.
After activating the mail_log plugin hoping it'll help us locate the problem we run across this case :
The user (let's call him user@domain.gr) logs in via pop3 and deletes some mails but one of them fails:
Jun 19 11:09:18 pop01 dovecot: pop3-login: Login: user=<user@domain.gr>, method=PLAIN, rip=83.235.173.26, lip=83.235.66.40, mpid=1389, secured, session=<Ao+rWH3fHgBT660a> Jun 19 11:09:18 director5 dovecot: pop3-login: proxy(user@domain.gr): started proxying to 83.235.66.40:110: user=<user@domain.gr>, method=PLAIN, rip=83.235.173.26, lip=83.235.66.65, session=<Ao+rWH3fHgBT660a> Jun 19 11:09:24 pop01 dovecot: pop3(user@domain.gr): expunge: box=INBOX, uid=20670, msgid=<9f5b1a20a9428ed31a9e7e42ce4411f08d0.20130612070424@mail84.us2.rsgsv.net>, size=36526 Jun 19 11:09:24 pop01 dovecot: pop3(user@domain.gr): expunge: box=INBOX, uid=20671, msgid=<b27d72dc5a47a3235a232494c6fe8aa0@newsletter.stockout.gr>, size=4637 Jun 19 11:09:24 pop01 dovecot: pop3(user@domain.gr): expunge: box=INBOX, uid=20672, msgid=<1113670779560.1111910791405.1470.2.32032003@scheduler.constantcontact.com>, size=38655 Jun 19 11:09:24 pop01 dovecot: pop3(user@domain.gr): expunge: box=INBOX, uid=20673, msgid=<83600a274c1407c5aa4c263e2592cb54@debop.gr>, size=1181688 Jun 19 11:09:24 pop01 dovecot: pop3(user@domain.gr): expunge: box=INBOX, uid=20674, msgid=<F2A59BE7-007A-4567-9BA5-803446C3D7F8@bernier-eliades.gr>, size=61116 Jun 19 11:09:26 pop01 dovecot: pop3(user@domain.gr): Error: Next message unexpectedly corrupted in mbox file /var/mail/K/Y/V/domain_gr_user_007 at 1 Jun 19 11:09:26 pop01 dovecot: pop3(user@domain.gr): Error: Cached message offset 1 is invalid for mbox file /var/mail/K/Y/V/domain_gr_user_007 Jun 19 11:09:27 pop01 dovecot: pop3(user@domain.gr): Disconnected: Logged out top=0/0, retr=2/1502843, del=122/359, size=137448432 Jun 19 11:09:27 pop01 dovecot: pop3(user@domain.gr): Warning: Our dotlock file /var/mail/K/Y/V/domain_gr_user_007.lock was deleted (locked 9 secs ago, touched 9 secs ago) Jun 19 11:09:27 pop01 dovecot: pop3(user@domain.gr): Error: file_dotlock_delete() failed with mbox file /var/mail/K/Y/V/domain_gr_user_007: No such file or directory Jun 19 11:09:27 director5 dovecot: pop3-login: proxy(user@domain.gr): disconnecting 83.235.173.26 (Disconnected by server): user=<user@domain.gr>, method=PLAIN, rip=83.235.173.26, lip=83.235.66.65, session=<Ao+rWH3fHgBT660a>
However he's still able to log in again :
Jun 19 11:11:36 pop01 dovecot: pop3-login: Login: user=<user@domain.gr>, method=PLAIN, rip=85.74.231.10, lip=83.235.66.40, mpid=10094, secured, session=<QDLrYH3f7ABVSucK> Jun 19 11:11:36 director3 dovecot: pop3-login: proxy(user@domain.gr): started proxying to 83.235.66.40:110: user=<user@domain.gr>, method=PLAIN, rip=85.74.231.10, lip=83.235.66.63, session=<QDLrYH3f7ABVSucK> Jun 19 11:11:51 pop01 dovecot: pop3(user@domain.gr): Disconnected: Logged out top=0/0, retr=0/0, del=0/237, size=75036938 Jun 19 11:11:51 director3 dovecot: pop3-login: proxy(user@domain.gr): disconnecting 85.74.231.10 (Disconnected by server): user=<user@domain.gr>, method=PLAIN, rip=85.74.231.10, lip=83.235.66.63, session=<QDLrYH3f7ABVSucK>
A few minutes later he receives another mail which is delivered with no problem :
Jun 19 11:30:39 corvus amavis[546]: (00546-22) Passed CLEAN, [91.190.168.40] [91.190.168.40] <tk-14439@free.splio.com> -> <user@domain.gr>, Message-ID: <58175-bWFyaW5hQGJlcm5pZXItZWxpYWR lcy5ncg==@free.splio.com>, mail_id: J1P-0WpmQksJ, Hits: 1.412, size: 9025, queued_as: 02BA4AE00414, Tests: [DKIM_VALID=-0.1,DKIM_VERIFIED=-0.1,FREEMAIL_FROM=0.001,HTML_IMAGE_RATIO_04=0.61,INVALID_MSGID=1,URIBL_BLOCKED=0.001], autolearn=disabled, 1533 ms Jun 19 11:30:39 corvus smtp/smtpd[1283]: proxy-accept: END-OF-MESSAGE: 250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 02BA4AE00414; from=<tk-14439@free.splio.com> to=<marina@bernier-eliades.gr> proto=ESMTP helo=<poc-pbcs2.splio.com> Jun 19 11:30:39 pop01 dovecot: lmtp(4099, user@domain.gr): 77O4IHlGwVEDEAAAYg/qxw: msgid=58175-bWFyaW5hQGJlcm5pZXItZWxpYWRlcy5ncg==@free.splio.com: from=residence.suddenly@gmx.com size=9610 saved mail to INBOX Jun 19 11:30:39 corvus postfix/lmtp[1350]: 02BA4AE00414: to=<user@domain.gr>, relay=lmtp.otenet.gr[62.103.147.209]:24, delay=0.12, delays=0.01/0/0/0.11, dsn=2.0.0, status=sent (250 2.0.0 <user@domain.gr> 77O4IHlGwVEDEAAAYg/qxw Saved)
And then RIGHT after the successful delivery, the mbox somehow ends up corrupted with an FFrom in the beginning :
Jun 19 11:31:27 pop01 dovecot: pop3-login: Login: user=<user@domain.gr>, method=PLAIN, rip=83.235.173.26, lip=83.235.66.40, mpid=14630, secured, session=<eBLjp33fUwBT660a> Jun 19 11:31:27 pop01 dovecot: pop3(user@domain.gr): Error: Syncing INBOX failed: Mailbox isn't a valid mbox file Jun 19 11:31:27 pop01 dovecot: pop3(user@domain.gr): Error: Couldn't init INBOX: Mailbox isn't a valid mbox file Jun 19 11:31:27 pop01 dovecot: pop3(user@domain.gr): Mailbox init failed top=0/0, retr=0/0, del=0/0, size=0 Jun 19 11:31:27 director5 dovecot: pop3-login: proxy(user@domain.gr): Login failed to 83.235.66.40:110: Mailbox isn't a valid mbox file Jun 19 11:31:27 pop01 dovecot: pop3-login: Login: user=<user@domain.gr>, method=PLAIN, rip=83.235.173.26, lip=83.235.66.40, mpid=14642, secured, session=<eBLjp33fUwBT660a> Jun 19 11:31:27 pop01 dovecot: pop3(user@domain.gr): Error: Syncing INBOX failed: Mailbox isn't a valid mbox file Jun 19 11:31:27 pop01 dovecot: pop3(user@domain.gr): Error: Couldn't init INBOX: Mailbox isn't a valid mbox file Jun 19 11:31:27 pop01 dovecot: pop3(user@domain.gr): Mailbox init failed top=0/0, retr=0/0, del=0/0, size=0 Jun 19 11:31:27 director5 dovecot: pop3-login: proxy(user@domain.gr): Login failed to 83.235.66.40:110: Mailbox isn't a valid mbox file Jun 19 11:31:27 director5 dovecot: pop3-login: Aborted login (proxy dest auth failed): user=<user@domain.gr>, method=PLAIN, rip=83.235.173.26, lip=83.235.66.65, session=<eBLjp33fUwBT660a
Our config :
# 2.1.16: /opt/dovecot-2.1.16/etc/dovecot/dovecot.conf # OS: Linux 2.6.18-92.1.22.el5 x86_64 CentOS release 5.9 (Final) auth_cache_negative_ttl = 10 mins auth_cache_size = 5 M auth_cache_ttl = 10 mins auth_verbose = yes default_client_limit = 5000 default_process_limit = 500 deliver_log_format = msgid=%m: from=%f size=%p %$ dict { sqlquota = mysql:/opt/dovecot/etc/dovecot/dovecot-dict-sql.conf.ext } disable_plaintext_auth = no first_valid_uid = 20 lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes listen = * log_timestamp = "%Y-%m-%d %H:%M:%S " login_greeting = ready login_trusted_networks = 83.235.66.0/24 mail_access_groups = mail disk root mail_fsync = always mail_nfs_index = yes mail_nfs_storage = yes mail_plugins = quota managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave imapflags notify mbox_lock_timeout = 3 secs mbox_read_locks = dotlock fcntl mmap_disable = yes passdb { args = /opt/dovecot/etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change append mail_log_fields = uid box msgid size quota = dict:User quota::noenforcing:proxy::sqlquota sieve = ~/.sieve sieve_dir = ~/sieve sieve_extensions = +notify +imapflags } postmaster_address = postmaster@otenet.gr quota_full_tempfail = yes service auth-worker { user = dovenull } service dict { unix_listener dict { group = mail mode = 0666 } } service imap-login { inet_listener imap { port = 143 } inet_listener imaps { port = 993 ssl = yes } } service lmtp { client_limit = 1 inet_listener lmtp { port = 24 } } service pop3-login { inet_listener pop3 { port = 110 } inet_listener pop3s { port = 995 ssl = yes } } service quota-warning { executable = script /opt/dovecot/etc/dovecot/quota-warning.sh user = dovecot } ssl = no userdb { args = /opt/dovecot/etc/dovecot/dovecot-ldap.conf.ext driver = ldap } verbose_proctitle = yes protocol lmtp { mail_plugins = quota sieve quota } protocol lda { mail_plugins = quota sieve quota } protocol imap { imap_client_workarounds = delay-newmail tb-extra-mailbox-sep mail_max_userip_connections = 100 mail_plugins = quota imap_quota quota notify mail_log } protocol pop3 { mail_max_userip_connections = 100 mail_plugins = quota quota mail_log notify pop3_client_workarounds = outlook-no-nuls oe-ns-eoh pop3_fast_size_lookups = yes pop3_lock_session = yes pop3_reuse_xuidl = yes pop3_uidl_format = %08Xu%08Xv }
Thank you for your time.
Dimos Alevizos
Dimos Alevizos skrev den 2013-06-19 15:00:
protocol imap { imap_client_workarounds = delay-newmail tb-extra-mailbox-sep mail_max_userip_connections = 100 mail_plugins = quota imap_quota quota notify mail_log }
quota listed 2 times
-- senders that put my email into body content will deliver it to my own trashcan, so if you like to get reply, dont do it
Yeah that's because by mistake we put quota both in 10-mail.conf and 20-imap.conf, however I don't see how that could be the cause of the problem.
D.
On Thu 20/06/2013 10:23, Benny Pedersen wrote:
Dimos Alevizos skrev den 2013-06-19 15:00:
protocol imap { imap_client_workarounds = delay-newmail tb-extra-mailbox-sep mail_max_userip_connections = 100 mail_plugins = quota imap_quota quota notify mail_log }
quota listed 2 times
-- senders that put my email into body content will deliver it to my own trashcan, so if you like to get reply, dont do it
On 19.6.2013, at 16.00, Dimos Alevizos <dalevizo@otenet.gr> wrote:
we're having some problems with our dovecot setup. I've seen similar problems in the mailing list some years ago but alas wasn't able to find a solution.
Our setup is as follows : An MX farm (postfix) sends mails via LMTP to a director farm (dovecot 2.1.12) which proxies pop3/imap/lmtp traffic to a dovecot farm (dovecot 2.1.16). All mailboxes and indexes are on NFS and all servers are Centos.
The problem is that at times we see mailboxes (all of them are in mbox format) beginning with FFrom or FrFrom and of course dovecot says it's not a valid mbox file.
This is quite an old bug, but it happens rarely enough that I haven't been able to reproduce and fix it. Actually people hadn't complained about it for a long time now, so I had assumed it had somehow gotten fixed already.
With the attached debug patch it should crash instead of (completely) corrupting the mbox file. Debugging the resulting core file with gdb could be useful in figuring this out.
Although I wouldn't recommend mbox format for any big installation anyway..
Thanx I'll try the patch as soon as possible and I'll let you know. It is indeed very rare. We're only seeing 4-5 corruptions in about 13 million logins per day. I've been trying to convince our design team that we should move to maildir, but the truth is that it's quite a change, and we're way too busy to deal with everything else AND a migration from mbox to maildir.
D.
On Mon 24/06/2013 13:16, Timo Sirainen wrote:
On 19.6.2013, at 16.00, Dimos Alevizos <dalevizo@otenet.gr> wrote:
we're having some problems with our dovecot setup. I've seen similar problems in the mailing list some years ago but alas wasn't able to find a solution.
Our setup is as follows : An MX farm (postfix) sends mails via LMTP to a director farm (dovecot 2.1.12) which proxies pop3/imap/lmtp traffic to a dovecot farm (dovecot 2.1.16). All mailboxes and indexes are on NFS and all servers are Centos.
The problem is that at times we see mailboxes (all of them are in mbox format) beginning with FFrom or FrFrom and of course dovecot says it's not a valid mbox file.
This is quite an old bug, but it happens rarely enough that I haven't been able to reproduce and fix it. Actually people hadn't complained about it for a long time now, so I had assumed it had somehow gotten fixed already.
With the attached debug patch it should crash instead of (completely) corrupting the mbox file. Debugging the resulting core file with gdb could be useful in figuring this out.
Although I wouldn't recommend mbox format for any big installation anyway..
Hi,
I haven't had the time to compile it yet, but a question just occurred. Given that it's so rare and we can't reproduce it on a dev server, how safe is this to use on a production server ? When you say "crash" you mean the whole dovecot server or that specific client's child ?
D.
-------- Original Message -------- Subject: Re: [Dovecot] Mbox corruption - Inbox beginning with 'FFrom' or 'FrFrom' From: dalevizo <dalevizo@otenet.gr> To: Timo Sirainen <tss@iki.fi> CC: dovecot@dovecot.org, Dimitris Paouris <dpaou@otenet.gr> Date: 24/06/2013 01:41 μμ
Thanx I'll try the patch as soon as possible and I'll let you know. It is indeed very rare. We're only seeing 4-5 corruptions in about 13 million logins per day. I've been trying to convince our design team that we should move to maildir, but the truth is that it's quite a change, and we're way too busy to deal with everything else AND a migration from mbox to maildir.
D.
On Mon 24/06/2013 13:16, Timo Sirainen wrote:
On 19.6.2013, at 16.00, Dimos Alevizos <dalevizo@otenet.gr> wrote:
we're having some problems with our dovecot setup. I've seen similar problems in the mailing list some years ago but alas wasn't able to find a solution.
Our setup is as follows : An MX farm (postfix) sends mails via LMTP to a director farm (dovecot 2.1.12) which proxies pop3/imap/lmtp traffic to a dovecot farm (dovecot 2.1.16). All mailboxes and indexes are on NFS and all servers are Centos.
The problem is that at times we see mailboxes (all of them are in mbox format) beginning with FFrom or FrFrom and of course dovecot says it's not a valid mbox file.
This is quite an old bug, but it happens rarely enough that I haven't been able to reproduce and fix it. Actually people hadn't complained about it for a long time now, so I had assumed it had somehow gotten fixed already.
With the attached debug patch it should crash instead of (completely) corrupting the mbox file. Debugging the resulting core file with gdb could be useful in figuring this out.
Although I wouldn't recommend mbox format for any big installation anyway..
It crashes one specific IMAP/POP3 session, so others are unaffected. The potential problems:
It might cause the user's mbox to become crashing constantly. so first crash -> client reconnects -> client attempts the same operation -> crash again. Then again, this might not happen, it depends.
The mbox file would probably become slightly more corrupted than normally, because it doesn't finish moving data around. No data should get actually lost, but some parts could become duplicated (e.g. some headers or even mails, possibly causing UID renumbering = redownloading).
So not ideal in production, but shouldn't be too bad either, especially if you just wait for the first crash and then immediately switch to the old unpatched version.
On 26.6.2013, at 10.21, Dimos Alevizos <dalevizo@otenet.gr> wrote:
Hi,
I haven't had the time to compile it yet, but a question just occurred. Given that it's so rare and we can't reproduce it on a dev server, how safe is this to use on a production server ? When you say "crash" you mean the whole dovecot server or that specific client's child ?
D.
-------- Original Message -------- Subject: Re: [Dovecot] Mbox corruption - Inbox beginning with 'FFrom' or 'FrFrom' From: dalevizo <dalevizo@otenet.gr> To: Timo Sirainen <tss@iki.fi> CC: dovecot@dovecot.org, Dimitris Paouris <dpaou@otenet.gr> Date: 24/06/2013 01:41 μμ
Thanx I'll try the patch as soon as possible and I'll let you know. It is indeed very rare. We're only seeing 4-5 corruptions in about 13 million logins per day. I've been trying to convince our design team that we should move to maildir, but the truth is that it's quite a change, and we're way too busy to deal with everything else AND a migration from mbox to maildir.
D.
On Mon 24/06/2013 13:16, Timo Sirainen wrote:
On 19.6.2013, at 16.00, Dimos Alevizos <dalevizo@otenet.gr> wrote:
we're having some problems with our dovecot setup. I've seen similar problems in the mailing list some years ago but alas wasn't able to find a solution.
Our setup is as follows : An MX farm (postfix) sends mails via LMTP to a director farm (dovecot 2.1.12) which proxies pop3/imap/lmtp traffic to a dovecot farm (dovecot 2.1.16). All mailboxes and indexes are on NFS and all servers are Centos.
The problem is that at times we see mailboxes (all of them are in mbox format) beginning with FFrom or FrFrom and of course dovecot says it's not a valid mbox file.
This is quite an old bug, but it happens rarely enough that I haven't been able to reproduce and fix it. Actually people hadn't complained about it for a long time now, so I had assumed it had somehow gotten fixed already.
With the attached debug patch it should crash instead of (completely) corrupting the mbox file. Debugging the resulting core file with gdb could be useful in figuring this out.
Although I wouldn't recommend mbox format for any big installation anyway..
I'm afraid it doesn't seem to be working. I've compiled a patched 2.2.6 dovecot with the patch you sent and installed it in a production server (had to be 2.2.6 cause we've upgraded all the rest since I begun this thread months ago) and although we still have mbox corruptions (rarely as before) the server isn't crashing :
Oct 30 11:15:19 pop04 dovecot: pop3-login: Login: user=<artower@otenet.gr>, method=PLAIN, rip=85.72.232.35, lip=83.235.66.43, mpid=24419, secured, session=<+0ywxfHpIQBVSOgj> Oct 30 11:15:20 pop04 dovecot: pop3(artower@otenet.gr): Disconnected: Logged out top=0/0, retr=0/0, del=0/1336, size=471029518 Oct 30 11:19:12 pop04 dovecot: lmtp(2863, artower@otenet.gr): r7U3KnyhcFIvCwAAckDtvw: msgid=<E1VbRvh-00040e-Ol@cpmail.force24.dedicated.catalyst2.com>: size=17823 saved mail to INBOX Oct 30 11:33:12 pop04 dovecot: pop3-login: Login: user=<artower@otenet.gr>, method=PLAIN, rip=85.72.224.94, lip=83.235.66.43, mpid=600, secured, session=<vT2aBfLpxQBVSOBe> Oct 30 11:33:12 pop04 dovecot: pop3(artower@otenet.gr): Error: Syncing INBOX failed: Mailbox isn't a valid mbox file Oct 30 11:33:12 pop04 dovecot: pop3(artower@otenet.gr): Error: Couldn't init INBOX: Mailbox isn't a valid mbox file Oct 30 11:33:12 pop04 dovecot: pop3(artower@otenet.gr): Mailbox init failed top=0/0, retr=0/0, del=0/0, size=0 Oct 30 11:33:33 pop04 dovecot: lmtp(16314, artower@otenet.gr): Au4vIMqucFK6PwAAckDtvw: msgid=<004401ced552$bb5ecd70$321c6850$@planet.nl>: size=7975817 save failed to INBOX: Mailbox isn't a valid mbox file
Perhaps the patch is only valid for 2.1.16 and needs to be modified for 2.2.6 ?
Thank you for your time Dimos Alevizos
-------- Original Message -------- Subject: Re: [Dovecot] Mbox corruption - Inbox beginning with 'FFrom' or 'FrFrom' From: Timo Sirainen <tss@iki.fi> To: Dimos Alevizos <dalevizo@otenet.gr> CC: dovecot@dovecot.org, Dimitris Paouris <dpaou@otenet.gr> Date: 26/06/2013 06:59 μμ
It crashes one specific IMAP/POP3 session, so others are unaffected. The potential problems:
It might cause the user's mbox to become crashing constantly. so first crash -> client reconnects -> client attempts the same operation -> crash again. Then again, this might not happen, it depends.
The mbox file would probably become slightly more corrupted than normally, because it doesn't finish moving data around. No data should get actually lost, but some parts could become duplicated (e.g. some headers or even mails, possibly causing UID renumbering = redownloading).
So not ideal in production, but shouldn't be too bad either, especially if you just wait for the first crash and then immediately switch to the old unpatched version.
On 26.6.2013, at 10.21, Dimos Alevizos <dalevizo@otenet.gr> wrote:
Hi,
I haven't had the time to compile it yet, but a question just occurred. Given that it's so rare and we can't reproduce it on a dev server, how safe is this to use on a production server ? When you say "crash" you mean the whole dovecot server or that specific client's child ?
D.
-------- Original Message -------- Subject: Re: [Dovecot] Mbox corruption - Inbox beginning with 'FFrom' or 'FrFrom' From: dalevizo <dalevizo@otenet.gr> To: Timo Sirainen <tss@iki.fi> CC: dovecot@dovecot.org, Dimitris Paouris <dpaou@otenet.gr> Date: 24/06/2013 01:41 μμ
Thanx I'll try the patch as soon as possible and I'll let you know. It is indeed very rare. We're only seeing 4-5 corruptions in about 13 million logins per day. I've been trying to convince our design team that we should move to maildir, but the truth is that it's quite a change, and we're way too busy to deal with everything else AND a migration from mbox to maildir.
D.
On Mon 24/06/2013 13:16, Timo Sirainen wrote:
On 19.6.2013, at 16.00, Dimos Alevizos <dalevizo@otenet.gr> wrote:
we're having some problems with our dovecot setup. I've seen similar problems in the mailing list some years ago but alas wasn't able to find a solution.
Our setup is as follows : An MX farm (postfix) sends mails via LMTP to a director farm (dovecot 2.1.12) which proxies pop3/imap/lmtp traffic to a dovecot farm (dovecot 2.1.16). All mailboxes and indexes are on NFS and all servers are Centos.
The problem is that at times we see mailboxes (all of them are in mbox format) beginning with FFrom or FrFrom and of course dovecot says it's not a valid mbox file.
This is quite an old bug, but it happens rarely enough that I haven't been able to reproduce and fix it. Actually people hadn't complained about it for a long time now, so I had assumed it had somehow gotten fixed already.
With the attached debug patch it should crash instead of (completely) corrupting the mbox file. Debugging the resulting core file with gdb could be useful in figuring this out.
Although I wouldn't recommend mbox format for any big installation anyway..
Well, if that patch didn’t work, then the problem is elsewhere. There aren’t many other good possibilities left though.. How about adding this patch, it should be even safer than the previous one:
http://hg.dovecot.org/dovecot-2.2/rev/d3062d066593
On 30.10.2013, at 12.42, Dimos Alevizos <dalevizo@otenet.gr> wrote:
I'm afraid it doesn't seem to be working. I've compiled a patched 2.2.6 dovecot with the patch you sent and installed it in a production server (had to be 2.2.6 cause we've upgraded all the rest since I begun this thread months ago) and although we still have mbox corruptions (rarely as before) the server isn't crashing :
Oct 30 11:15:19 pop04 dovecot: pop3-login: Login: user=<artower@otenet.gr>, method=PLAIN, rip=85.72.232.35, lip=83.235.66.43, mpid=24419, secured, session=<+0ywxfHpIQBVSOgj> Oct 30 11:15:20 pop04 dovecot: pop3(artower@otenet.gr): Disconnected: Logged out top=0/0, retr=0/0, del=0/1336, size=471029518 Oct 30 11:19:12 pop04 dovecot: lmtp(2863, artower@otenet.gr): r7U3KnyhcFIvCwAAckDtvw: msgid=<E1VbRvh-00040e-Ol@cpmail.force24.dedicated.catalyst2.com>: size=17823 saved mail to INBOX Oct 30 11:33:12 pop04 dovecot: pop3-login: Login: user=<artower@otenet.gr>, method=PLAIN, rip=85.72.224.94, lip=83.235.66.43, mpid=600, secured, session=<vT2aBfLpxQBVSOBe> Oct 30 11:33:12 pop04 dovecot: pop3(artower@otenet.gr): Error: Syncing INBOX failed: Mailbox isn't a valid mbox file Oct 30 11:33:12 pop04 dovecot: pop3(artower@otenet.gr): Error: Couldn't init INBOX: Mailbox isn't a valid mbox file Oct 30 11:33:12 pop04 dovecot: pop3(artower@otenet.gr): Mailbox init failed top=0/0, retr=0/0, del=0/0, size=0 Oct 30 11:33:33 pop04 dovecot: lmtp(16314, artower@otenet.gr): Au4vIMqucFK6PwAAckDtvw: msgid=<004401ced552$bb5ecd70$321c6850$@planet.nl>: size=7975817 save failed to INBOX: Mailbox isn't a valid mbox file
Perhaps the patch is only valid for 2.1.16 and needs to be modified for 2.2.6 ?
Thank you for your time Dimos Alevizos
-------- Original Message -------- Subject: Re: [Dovecot] Mbox corruption - Inbox beginning with 'FFrom' or 'FrFrom' From: Timo Sirainen <tss@iki.fi> To: Dimos Alevizos <dalevizo@otenet.gr> CC: dovecot@dovecot.org, Dimitris Paouris <dpaou@otenet.gr> Date: 26/06/2013 06:59 μμ
It crashes one specific IMAP/POP3 session, so others are unaffected. The potential problems:
It might cause the user's mbox to become crashing constantly. so first crash -> client reconnects -> client attempts the same operation -> crash again. Then again, this might not happen, it depends.
The mbox file would probably become slightly more corrupted than normally, because it doesn't finish moving data around. No data should get actually lost, but some parts could become duplicated (e.g. some headers or even mails, possibly causing UID renumbering = redownloading).
So not ideal in production, but shouldn't be too bad either, especially if you just wait for the first crash and then immediately switch to the old unpatched version.
On 26.6.2013, at 10.21, Dimos Alevizos <dalevizo@otenet.gr> wrote:
Hi,
I haven't had the time to compile it yet, but a question just occurred. Given that it's so rare and we can't reproduce it on a dev server, how safe is this to use on a production server ? When you say "crash" you mean the whole dovecot server or that specific client's child ?
D.
-------- Original Message -------- Subject: Re: [Dovecot] Mbox corruption - Inbox beginning with 'FFrom' or 'FrFrom' From: dalevizo <dalevizo@otenet.gr> To: Timo Sirainen <tss@iki.fi> CC: dovecot@dovecot.org, Dimitris Paouris <dpaou@otenet.gr> Date: 24/06/2013 01:41 μμ
Thanx I'll try the patch as soon as possible and I'll let you know. It is indeed very rare. We're only seeing 4-5 corruptions in about 13 million logins per day. I've been trying to convince our design team that we should move to maildir, but the truth is that it's quite a change, and we're way too busy to deal with everything else AND a migration from mbox to maildir.
D.
On Mon 24/06/2013 13:16, Timo Sirainen wrote:
On 19.6.2013, at 16.00, Dimos Alevizos <dalevizo@otenet.gr> wrote:
we're having some problems with our dovecot setup. I've seen similar problems in the mailing list some years ago but alas wasn't able to find a solution.
Our setup is as follows : An MX farm (postfix) sends mails via LMTP to a director farm (dovecot 2.1.12) which proxies pop3/imap/lmtp traffic to a dovecot farm (dovecot 2.1.16). All mailboxes and indexes are on NFS and all servers are Centos.
The problem is that at times we see mailboxes (all of them are in mbox format) beginning with FFrom or FrFrom and of course dovecot says it's not a valid mbox file.
This is quite an old bug, but it happens rarely enough that I haven't been able to reproduce and fix it. Actually people hadn't complained about it for a long time now, so I had assumed it had somehow gotten fixed already.
With the attached debug patch it should crash instead of (completely) corrupting the mbox file. Debugging the resulting core file with gdb could be useful in figuring this out.
Although I wouldn't recommend mbox format for any big installation anyway..
At last, I was finally able to find time and run a backtrace, I've attached the file. If you don't remember (and hey, you can blame you after all this time) the problem is only with a couple (~10) of users among the hundreds of thousands currently using the service.
Please let me know if I should provide any other info, logs or whatever.
Dimos Alevizos
-------- Original Message -------- Subject: Re: [Dovecot] Mbox corruption - Inbox beginning with 'FFrom' or 'FrFrom' From: Timo Sirainen <tss@iki.fi> To: Dimos Alevizos <dalevizo@otenet.gr> CC: Dimitris Paouris <dpaou@otenet.gr>, Dovecot Mailing List <dovecot@dovecot.org> Date: 02/11/2013 01:16 μμ
Well, if that patch didn’t work, then the problem is elsewhere. There aren’t many other good possibilities left though.. How about adding this patch, it should be even safer than the previous one:
http://hg.dovecot.org/dovecot-2.2/rev/d3062d066593
On 30.10.2013, at 12.42, Dimos Alevizos <dalevizo@otenet.gr> wrote:
I'm afraid it doesn't seem to be working. I've compiled a patched 2.2.6 dovecot with the patch you sent and installed it in a production server (had to be 2.2.6 cause we've upgraded all the rest since I begun this thread months ago) and although we still have mbox corruptions (rarely as before) the server isn't crashing :
Oct 30 11:15:19 pop04 dovecot: pop3-login: Login: user=<artower@otenet.gr>, method=PLAIN, rip=85.72.232.35, lip=83.235.66.43, mpid=24419, secured, session=<+0ywxfHpIQBVSOgj> Oct 30 11:15:20 pop04 dovecot: pop3(artower@otenet.gr): Disconnected: Logged out top=0/0, retr=0/0, del=0/1336, size=471029518 Oct 30 11:19:12 pop04 dovecot: lmtp(2863, artower@otenet.gr): r7U3KnyhcFIvCwAAckDtvw: msgid=<E1VbRvh-00040e-Ol@cpmail.force24.dedicated.catalyst2.com>: size=17823 saved mail to INBOX Oct 30 11:33:12 pop04 dovecot: pop3-login: Login: user=<artower@otenet.gr>, method=PLAIN, rip=85.72.224.94, lip=83.235.66.43, mpid=600, secured, session=<vT2aBfLpxQBVSOBe> Oct 30 11:33:12 pop04 dovecot: pop3(artower@otenet.gr): Error: Syncing INBOX failed: Mailbox isn't a valid mbox file Oct 30 11:33:12 pop04 dovecot: pop3(artower@otenet.gr): Error: Couldn't init INBOX: Mailbox isn't a valid mbox file Oct 30 11:33:12 pop04 dovecot: pop3(artower@otenet.gr): Mailbox init failed top=0/0, retr=0/0, del=0/0, size=0 Oct 30 11:33:33 pop04 dovecot: lmtp(16314, artower@otenet.gr): Au4vIMqucFK6PwAAckDtvw: msgid=<004401ced552$bb5ecd70$321c6850$@planet.nl>: size=7975817 save failed to INBOX: Mailbox isn't a valid mbox file
Perhaps the patch is only valid for 2.1.16 and needs to be modified for 2.2.6 ?
Thank you for your time Dimos Alevizos
-------- Original Message -------- Subject: Re: [Dovecot] Mbox corruption - Inbox beginning with 'FFrom' or 'FrFrom' From: Timo Sirainen <tss@iki.fi> To: Dimos Alevizos <dalevizo@otenet.gr> CC: dovecot@dovecot.org, Dimitris Paouris <dpaou@otenet.gr> Date: 26/06/2013 06:59 μμ
It crashes one specific IMAP/POP3 session, so others are unaffected. The potential problems:
It might cause the user's mbox to become crashing constantly. so first crash -> client reconnects -> client attempts the same operation -> crash again. Then again, this might not happen, it depends.
The mbox file would probably become slightly more corrupted than normally, because it doesn't finish moving data around. No data should get actually lost, but some parts could become duplicated (e.g. some headers or even mails, possibly causing UID renumbering = redownloading).
So not ideal in production, but shouldn't be too bad either, especially if you just wait for the first crash and then immediately switch to the old unpatched version.
On 26.6.2013, at 10.21, Dimos Alevizos <dalevizo@otenet.gr> wrote:
Hi,
I haven't had the time to compile it yet, but a question just occurred. Given that it's so rare and we can't reproduce it on a dev server, how safe is this to use on a production server ? When you say "crash" you mean the whole dovecot server or that specific client's child ?
D.
-------- Original Message -------- Subject: Re: [Dovecot] Mbox corruption - Inbox beginning with 'FFrom' or 'FrFrom' From: dalevizo <dalevizo@otenet.gr> To: Timo Sirainen <tss@iki.fi> CC: dovecot@dovecot.org, Dimitris Paouris <dpaou@otenet.gr> Date: 24/06/2013 01:41 μμ
Thanx I'll try the patch as soon as possible and I'll let you know. It is indeed very rare. We're only seeing 4-5 corruptions in about 13 million logins per day. I've been trying to convince our design team that we should move to maildir, but the truth is that it's quite a change, and we're way too busy to deal with everything else AND a migration from mbox to maildir.
D.
On Mon 24/06/2013 13:16, Timo Sirainen wrote:
On 19.6.2013, at 16.00, Dimos Alevizos <dalevizo@otenet.gr> wrote:
> we're having some problems with our dovecot setup. > I've seen similar problems in the mailing list some years ago but alas wasn't able to find a solution. > > Our setup is as follows : > An MX farm (postfix) sends mails via LMTP to a director farm (dovecot 2.1.12) which proxies pop3/imap/lmtp traffic to a dovecot farm (dovecot 2.1.16). > All mailboxes and indexes are on NFS and all servers are Centos. > > The problem is that at times we see mailboxes (all of them are in mbox format) beginning with FFrom or FrFrom and of course dovecot says it's not a valid mbox file.
This is quite an old bug, but it happens rarely enough that I haven't been able to reproduce and fix it. Actually people hadn't complained about it for a long time now, so I had assumed it had somehow gotten fixed already.
With the attached debug patch it should crash instead of (completely) corrupting the mbox file. Debugging the resulting core file with gdb could be useful in figuring this out.
Although I wouldn't recommend mbox format for any big installation anyway..
Kind reminder :-)
D.
On Thu 13/02/2014 15:52, Dimos Alevizos wrote:
At last, I was finally able to find time and run a backtrace, I've attached the file. If you don't remember (and hey, you can blame you after all this time) the problem is only with a couple (~10) of users among the hundreds of thousands currently using the service.
Please let me know if I should provide any other info, logs or whatever.
Dimos Alevizos
-------- Original Message -------- Subject: Re: [Dovecot] Mbox corruption - Inbox beginning with 'FFrom' or 'FrFrom' From: Timo Sirainen <tss@iki.fi> To: Dimos Alevizos <dalevizo@otenet.gr> CC: Dimitris Paouris <dpaou@otenet.gr>, Dovecot Mailing List <dovecot@dovecot.org> Date: 02/11/2013 01:16 μμ
Well, if that patch didn’t work, then the problem is elsewhere. There aren’t many other good possibilities left though.. How about adding this patch, it should be even safer than the previous one:
http://hg.dovecot.org/dovecot-2.2/rev/d3062d066593
On 30.10.2013, at 12.42, Dimos Alevizos <dalevizo@otenet.gr> wrote:
I'm afraid it doesn't seem to be working. I've compiled a patched 2.2.6 dovecot with the patch you sent and installed it in a production server (had to be 2.2.6 cause we've upgraded all the rest since I begun this thread months ago) and although we still have mbox corruptions (rarely as before) the server isn't crashing :
Oct 30 11:15:19 pop04 dovecot: pop3-login: Login: user=<artower@otenet.gr>, method=PLAIN, rip=85.72.232.35, lip=83.235.66.43, mpid=24419, secured, session=<+0ywxfHpIQBVSOgj> Oct 30 11:15:20 pop04 dovecot: pop3(artower@otenet.gr): Disconnected: Logged out top=0/0, retr=0/0, del=0/1336, size=471029518 Oct 30 11:19:12 pop04 dovecot: lmtp(2863, artower@otenet.gr): r7U3KnyhcFIvCwAAckDtvw: msgid=<E1VbRvh-00040e-Ol@cpmail.force24.dedicated.catalyst2.com>: size=17823 saved mail to INBOX Oct 30 11:33:12 pop04 dovecot: pop3-login: Login: user=<artower@otenet.gr>, method=PLAIN, rip=85.72.224.94, lip=83.235.66.43, mpid=600, secured, session=<vT2aBfLpxQBVSOBe> Oct 30 11:33:12 pop04 dovecot: pop3(artower@otenet.gr): Error: Syncing INBOX failed: Mailbox isn't a valid mbox file Oct 30 11:33:12 pop04 dovecot: pop3(artower@otenet.gr): Error: Couldn't init INBOX: Mailbox isn't a valid mbox file Oct 30 11:33:12 pop04 dovecot: pop3(artower@otenet.gr): Mailbox init failed top=0/0, retr=0/0, del=0/0, size=0 Oct 30 11:33:33 pop04 dovecot: lmtp(16314, artower@otenet.gr): Au4vIMqucFK6PwAAckDtvw: msgid=<004401ced552$bb5ecd70$321c6850$@planet.nl>: size=7975817 save failed to INBOX: Mailbox isn't a valid mbox file
Perhaps the patch is only valid for 2.1.16 and needs to be modified for 2.2.6 ?
Thank you for your time Dimos Alevizos
-------- Original Message -------- Subject: Re: [Dovecot] Mbox corruption - Inbox beginning with 'FFrom' or 'FrFrom' From: Timo Sirainen <tss@iki.fi> To: Dimos Alevizos <dalevizo@otenet.gr> CC: dovecot@dovecot.org, Dimitris Paouris <dpaou@otenet.gr> Date: 26/06/2013 06:59 μμ
It crashes one specific IMAP/POP3 session, so others are unaffected. The potential problems:
It might cause the user's mbox to become crashing constantly. so first crash -> client reconnects -> client attempts the same operation -> crash again. Then again, this might not happen, it depends.
The mbox file would probably become slightly more corrupted than normally, because it doesn't finish moving data around. No data should get actually lost, but some parts could become duplicated (e.g. some headers or even mails, possibly causing UID renumbering = redownloading).
So not ideal in production, but shouldn't be too bad either, especially if you just wait for the first crash and then immediately switch to the old unpatched version.
On 26.6.2013, at 10.21, Dimos Alevizos <dalevizo@otenet.gr> wrote:
Hi,
I haven't had the time to compile it yet, but a question just occurred. Given that it's so rare and we can't reproduce it on a dev server, how safe is this to use on a production server ? When you say "crash" you mean the whole dovecot server or that specific client's child ?
D.
-------- Original Message -------- Subject: Re: [Dovecot] Mbox corruption - Inbox beginning with 'FFrom' or 'FrFrom' From: dalevizo <dalevizo@otenet.gr> To: Timo Sirainen <tss@iki.fi> CC: dovecot@dovecot.org, Dimitris Paouris <dpaou@otenet.gr> Date: 24/06/2013 01:41 μμ
Thanx I'll try the patch as soon as possible and I'll let you know. It is indeed very rare. We're only seeing 4-5 corruptions in about 13 million logins per day. I've been trying to convince our design team that we should move to maildir, but the truth is that it's quite a change, and we're way too busy to deal with everything else AND a migration from mbox to maildir.
D.
On Mon 24/06/2013 13:16, Timo Sirainen wrote: >On 19.6.2013, at 16.00, Dimos Alevizos <dalevizo@otenet.gr> wrote: > >>we're having some problems with our dovecot setup. >>I've seen similar problems in the mailing list some years ago but alas wasn't able to find a solution. >> >>Our setup is as follows : >>An MX farm (postfix) sends mails via LMTP to a director farm (dovecot 2.1.12) which proxies pop3/imap/lmtp traffic to a dovecot farm (dovecot 2.1.16). >>All mailboxes and indexes are on NFS and all servers are Centos. >> >>The problem is that at times we see mailboxes (all of them are in mbox format) beginning with FFrom or FrFrom and of course dovecot says it's not a valid mbox file. > >This is quite an old bug, but it happens rarely enough that I haven't been able to reproduce and fix it. Actually people hadn't complained about it for a long time now, so I had assumed it had somehow gotten fixed already. > >With the attached debug patch it should crash instead of (completely) corrupting the mbox file. Debugging the resulting core file with gdb could be useful in figuring this out. > >Although I wouldn't recommend mbox format for any big installation anyway.. >
> >
Feb 13 15:41:08 pop06 dovecot: imap-login: Login: user=<someuser@somedomain>, method=PLAIN, rip=195.170.0.170, lip=83.235.66.45, mpid=8157, session=<E/1110nyQADDqgCq> Feb 13 15:41:09 pop06 dovecot: imap(someuser@somedomain): Panic: file mbox-sync.c: line 655 (mbox_sync_handle_header): assertion failed: (mail_ctx->mail.from_offset + move_diff != 1 && mail_ctx->mail.from_offset + move_diff != 2) Feb 13 15:41:09 pop06 dovecot: imap(someuser@somedomain): Error: Raw backtrace: /opt/dovecot-2.2.9/lib/dovecot/libdovecot.so.0 [0x2adf551923fa] -> /opt/dovecot-2.2.9/lib/dovecot/libdovecot.so.0 [0x2adf55192466] -> /opt/dovecot-2.2.9/lib/dovecot/libdovecot.so.0 [0x2adf55191583] -> /opt/dovecot-2.2.9/lib/dovecot/libdovecot-storage.so.0 [0x2adf54e7e9a7] -> /opt/dovecot-2.2.9/lib/dovecot/libdovecot-storage.so.0(mbox_sync+0x620) [0x2adf54e7f160] -> /opt/dovecot-2.2.9/lib/dovecot/libdovecot-storage.so.0(mbox_storage_sync_init+0x83) [0x2adf54e80093] -> /opt/dovecot-2.2.9/lib/dovecot/libdovecot-storage.so.0(mailbox_sync_init+0x31) [0x2adf54e99da1] -> /opt/dovecot-2.2.9/lib/dovecot/libdovecot-storage.so.0(mailbox_sync+0x27) [0x2adf54e9abc7] -> dovecot/imap someuser@somedomain 195.170.0.170 SELECT [0x4111c9] -> dovecot/imap someuser@somedomain 195.170.0.170 SELECT [0x411afb] -> dovecot/imap someuser@somedomain 195.170.0.170 SELECT [0x4165e7] -> dovecot/imap [d Feb 13 15:41:09 pop06 dovecot: imap(someuser@somedomain): Fatal: master: service(imap): child 8157 killed with signal 6 (core dumped)
root@pop06:someuser $ gdb /opt/dovecot-2.2.9/libexec/imap core.8157 GNU gdb (GDB) CentOS (7.0.1-45.el5.centos) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /opt/dovecot-2.2.9/libexec/imap...done. [New Thread 8157] Reading symbols from /opt/dovecot-2.2.9/lib/dovecot/libdovecot-storage.so.0...done. Loaded symbols for /opt/dovecot-2.2.9/lib/dovecot/libdovecot-storage.so.0 Reading symbols from /opt/dovecot-2.2.9/lib/dovecot/libdovecot.so.0...done. Loaded symbols for /opt/dovecot-2.2.9/lib/dovecot/libdovecot.so.0 Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib64/libc.so.6 Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done. Loaded symbols for /lib64/librt.so.1 Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib64/libdl.so.2 Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found)...done. [Thread debugging using libthread_db enabled] Loaded symbols for /lib64/libpthread.so.0 Reading symbols from /opt/dovecot-2.2.9/lib/dovecot/lib10_quota_plugin.so...done. Loaded symbols for /opt/dovecot-2.2.9/lib/dovecot/lib10_quota_plugin.so Reading symbols from /opt/dovecot-2.2.9/lib/dovecot/lib11_imap_quota_plugin.so...done. Loaded symbols for /opt/dovecot-2.2.9/lib/dovecot/lib11_imap_quota_plugin.so Reading symbols from /opt/dovecot-2.2.9/lib/dovecot/lib15_notify_plugin.so...done. Loaded symbols for /opt/dovecot-2.2.9/lib/dovecot/lib15_notify_plugin.so Reading symbols from /opt/dovecot-2.2.9/lib/dovecot/lib20_fts_plugin.so...done. Loaded symbols for /opt/dovecot-2.2.9/lib/dovecot/lib20_fts_plugin.so Reading symbols from /opt/dovecot-2.2.9/lib/dovecot/lib21_fts_solr_plugin.so...done. Loaded symbols for /opt/dovecot-2.2.9/lib/dovecot/lib21_fts_solr_plugin.so Reading symbols from /lib64/libexpat.so.0...(no debugging symbols found)...done. Loaded symbols for /lib64/libexpat.so.0 Reading symbols from /lib64/libgcc_s.so.1...(no debugging symbols found)...done. Loaded symbols for /lib64/libgcc_s.so.1
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff49dfd000 Core was generated by `dovecot/imap [someuser@somed'. Program terminated with signal 6, Aborted. #0 0x0000003efe030265 in raise () from /lib64/libc.so.6 (gdb) bt full #0 0x0000003efe030265 in raise () from /lib64/libc.so.6 No symbol table info available. #1 0x0000003efe031d10 in abort () from /lib64/libc.so.6 No symbol table info available. #2 0x00002adf5519241e in default_fatal_finish (type=<value optimized out>, status=0) at failures.c:192 backtrace = 0x14d90370 "/opt/dovecot-2.2.9/lib/dovecot/libdovecot.so.0 [0x2adf551923fa] -> /opt/dovecot-2.2.9/lib/dovecot/libdovecot.so.0 [0x2adf55192466] -> /opt/dovecot-2.2.9/lib/dovecot/libdovecot.so.0 [0x2adf55191583] ->"... #3 0x00002adf55192466 in i_internal_fatal_handler (ctx=0x7fff49d91340, format=<value optimized out>, args=<value optimized out>) at failures.c:653 status = 0 #4 0x00002adf55191583 in i_panic (format=0x1fdd <Address 0x1fdd out of bounds>) at failures.c:264 ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0} args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fff49d91410, reg_save_area = 0x7fff49d91350}} #5 0x00002adf54e7e9a7 in mbox_sync_handle_header (sync_ctx=0x7fff49d935e0, mail_ctx=0x7fff49d937d0, partial=true) at mbox-sync.c:654 orig_from_offset = 14200194 move_diff = -14200194 ret = <value optimized out> __FUNCTION__ = "mbox_sync_handle_header" #6 mbox_sync_loop (sync_ctx=0x7fff49d935e0, mail_ctx=0x7fff49d937d0, partial=true) at mbox-sync.c:1138 rec = 0x14dc0d20 uid = <value optimized out> messages_count = 302 offset = 14200194 ret = <value optimized out> expunged = false skipped_mails = false uids_broken = false #7 0x00002adf54e7f160 in mbox_sync_int (mbox=0x14db5b30, flags=MBOX_SYNC_UNDIRTY) at mbox-sync.c:1619 index_sync_ctx = 0x14dd3710 sync_view = 0x14dd3780 ret = <value optimized out> delay_writes = true readonly = false trans = 0x14dbf420 sync_ctx = {mbox = 0x14db5b30, flags = MBOX_SYNC_UNDIRTY, input = 0x14dd4fe8, file_input = 0x14dd4e18, write_fd = 15, orig_mtime = 1392290551, orig_atime = 1391079897, orig_size = 29081201, last_stat = {st_dev = 25, st_ino = 30254297, st_nlink = 1, st_mode = 33152, st_uid = 1904649, st_gid = 550, pad0 = 0, st_rdev = 0, st_size = 29081201, st_blksize = 32768, st_blocks = 56920, st_atim = {tv_sec = 1391079897, tv_nsec = 0}, st_mtim = {tv_sec = 1392290551, tv_nsec = 0}, st_ctim = {tv_sec = 1392290551, tv_nsec = 961280000}, __unused = {0, 0, 0}}, index_sync_ctx = 0x14dd3710, sync_view = 0x14dd3780, t = 0x14dbf420, reset_hdr = {major_version = 0 '\000', minor_version = 0 '\000', base_header_size = 0, header_size = 0, record_size = 0, compat_flags = 0 '\000', unused = "\000\000", indexid = 0, flags = 0, uid_validity = 0, next_uid = 0, messages_count = 0, unused_old_recent_messages_count = 0, seen_messages_count = 0, deleted_messages_count = 0, first_recent_uid = 0, first_unseen_uid_lowwater = 0, first_deleted_uid_lowwater = 0, log_file_seq = 0, log_file_tail_offset = 0, log_file_head_offset = 0, unused_old_sync_size = 0, unused_old_sync_stamp = 0, day_stamp = 0, day_first_uid = {0, 0, 0, 0, 0, 0, 0, 0}}, hdr = 0x14dbf090, header = 0x14dcb070, from_line = 0x14dcd100, base_uid_validity = 1387910574, base_uid_last = 439, base_uid_last_offset = 0, mails = {arr = {buffer = 0x14dcb0b0, element_size = 64}, v = 0x14dcb0b0, v_modifiable = 0x14dcb0b0}, sync_changes = 0x14dcb0f0, mail_keyword_pool = 0x14dbf780, saved_keywords_pool = 0x14de7480, prev_msg_uid = 242, next_uid = 440, idx_next_uid = 440, seq = 105, idx_seq = 105, need_space_seq = 0, last_nonrecent_uid = 0, expunged_space = 14200194, space_diff = 0, dest_first_mail = 1, first_mail_crlf_expunged = 0, keep_recent = 0, readonly = 0, delay_writes = 1, renumber_uids = 0, moved_offsets = 0, ext_modified = 0, index_reset = 0, errors = 0} sync_flags = <value optimized out> changed = <value optimized out> __FUNCTION__ = "mbox_sync_int" #8 mbox_sync (mbox=0x14db5b30, flags=MBOX_SYNC_UNDIRTY) at mbox-sync.c:2000 lock_id = 3 ret = <value optimized out> __FUNCTION__ = "mbox_sync" #9 0x00002adf54e80093 in mbox_storage_sync_init (box=0x14db5b30, flags=65) at mbox-sync.c:2049 mbox = 0x1fdd mbox_sync_flags = 8157 ret = 0 #10 0x00002adf54e99da1 in mailbox_sync_init (box=0x14db5b30, flags=65) at mail-storage.c:1668 _data_stack_cur_id = 4 ctx = <value optimized out> #11 0x00002adf54e9abc7 in mailbox_sync (box=0x1fdd, flags=8157) at mail-storage.c:1716 ctx = 0x14d99110 status = {sync_delayed_expunges = 0} #12 0x00000000004111c9 in select_open (cmd=0x14db3310, readonly=false) at cmd-select.c:313 No locals. #13 cmd_select_full (cmd=0x14db3310, readonly=false) at cmd-select.c:439 client = 0x14db2b00 ctx = 0x14db3408 args = 0x14d9ba98 list_args = 0x101010101010101 mailbox = 0x14d902b8 "INBOX" error = <value optimized out> ret = <value optimized out> __FUNCTION__ = "cmd_select_full" ---Type <return> to continue, or q <return> to quit--- #14 0x0000000000411afb in cmd_select (cmd=0x1fdd) at cmd-select.c:448 No locals. #15 0x00000000004165e7 in command_exec (cmd=0x14db3310) at imap-commands.c:158 hook = 0x14d99110 ret = <value optimized out> #16 0x00000000004153db in client_command_input (cmd=0x1fdd) at imap-client.c:780 client = 0x14db2b00 command = <value optimized out> __FUNCTION__ = "client_command_input" #17 0x0000000000415495 in client_command_input (cmd=0x14db3310) at imap-client.c:841 client = 0x14db2b00 command = 0x6 __FUNCTION__ = "client_command_input" #18 0x000000000041564f in client_handle_next_command (client=0x14db2b00) at imap-client.c:879 No locals. #19 client_handle_input (client=0x14db2b00) at imap-client.c:891 _data_stack_cur_id = 3 remove_io = <value optimized out> handled_commands = false __FUNCTION__ = "client_handle_input" #20 0x0000000000415a52 in client_input (client=0x14db2b00) at imap-client.c:933 cmd = <value optimized out> output = 0x14db0c00 bytes = 19 __FUNCTION__ = "client_input" #21 0x00002adf551a1676 in io_loop_call_io (io=0x14db0cd0) at ioloop.c:388 ioloop = 0x14d98740 t_id = 2 #22 0x00002adf551a2c7d in io_loop_handler_run (ioloop=<value optimized out>) at ioloop-epoll.c:220 ctx = <value optimized out> event = 0x14d9a250 list = 0x14db0d20 io = 0x1fdd tv = {tv_sec = 3, tv_usec = 790044} events_count = <value optimized out> msecs = <value optimized out> ret = 1 i = 0 call = false __FUNCTION__ = "io_loop_handler_run" #23 0x00002adf551a15f8 in io_loop_run (ioloop=0x14d98740) at ioloop.c:412 __FUNCTION__ = "io_loop_run" #24 0x00002adf551528d3 in master_service_run (service=0x14d985d0, callback=0x1fdd) at master-service.c:566 No locals. #25 0x000000000041ef07 in main (argc=2, argv=0x14d98390) at main.c:400 login_set = {auth_socket_path = 0x14d90060 "\210", postlogin_socket_path = 0x14d900b8 "", postlogin_timeout_secs = 60, callback = 0x41f100 <login_client_connected>, failure_callback = 0x41f0a0 <login_client_failed>, request_auth_token = 1} service_flags = <value optimized out> storage_service_flags = MAIL_STORAGE_SERVICE_FLAG_DISALLOW_ROOT username = 0x0 c = <value optimized out> set_roots = {0x426b20, 0x0} (gdb)
participants (4)
-
Benny Pedersen
-
dalevizo
-
Dimos Alevizos
-
Timo Sirainen