[Dovecot] 1.0.rc10 status report

Dalvenjah FoxFire dalvenjah at DAL.NET
Mon Oct 23 09:52:08 UTC 2006


On Oct 20, 2006, at 5:26 AM, David Lee wrote:
> 3. There were several occurences of:
>       IMAP(...): file ../../../../../src/lib-storage/index/mbox/ 
> mbox-sync-rewrite.c: line 405 (mbox_sync_read_and_move): assertion  
> failed: (need_space == (uoff_t)-mails[idx].space)
>       child 30842 (imap) killed with signal 6
>
> This looks particularly awkward.  Any thoughts?

I'm also getting this error fairly often. I first installed Dovecot  
with 1.0rc10 last Wednesday after running with UW-Imap for a few  
years, under RedHat 9 Linux, using mbox format. The primary client  
I'm using is Apple MacOS X Mail; the box has between 3-5 regular imap  
users.

I added the following code right before the assert to try and assist  
with debugging (assert line copied in for context), in the file src/ 
lib-storage/index/mbox/mbox-sync-rewrite.c at line 405:

+                if (need_space != (uoff_t)-mails[idx].space)
+                        i_info("Need_space: %d idx: %d mails 
[idx].space: %d",need_space,idx,mails[idx].space);
                 i_assert(need_space == (uoff_t)-mails[idx].space);

I know I'm not doing a proper cast of the variables, but here's the  
log message I've gotten about 17 times since installing the debug  
version about an hour ago:

Oct 23 01:24:58 dragonlair dovecot: IMAP(dalvenja): Need_space: -12  
idx: 6 mails[idx].space: -1

(which is particularly odd, since the three numbers are always the  
same.)

I've only halfheartedly tried to track back what's going on in the  
daemon to get to this point;
I know that it seems to happen when I delete mails with the client  
(which moves the mails to a Trash folder and then either sets the D  
status flag or removes them from the Inbox entirely); beyond that I'm  
not sure what's happening exactly. (If anyone does and can give me a  
couple of hints as to what to try or look for, I can do some more  
debugging).

It doesn't appear to be doing anything bad, other than slowing down  
mail client operations a bit; OS X mail seems to be smart enough to  
know when the imap server didn't do what it wants and to repeat the  
operations, and I don't believe I've had any real issues as a result  
of the assert failure.

Just as a data point, when I first converted, I did get the following  
types of messages as well:

Oct 18 22:08:06 dragonlair dovecot: IMAP(dalvenja): mbox sync:  
Expunged message reappeared in mailbox /var/spool/mail/dalvenja (UID  
1 < 34486, seq=1, idx_msgs=0)
Oct 18 22:08:57 dragonlair dovecot: IMAP(dalvenja): mbox sync: UID  
inserted in the middle of mailbox /var/spool/mail/dalvenja (34486 >  
1, seq=1, idx_msgs=5607)
Oct 18 22:16:52 dragonlair dovecot: IMAP(dalvenja): UIDs broken with  
partial sync in mbox file /var/spool/mail/dalvenja

but those don't appear to have shown up since (I assume Dovecot is  
correcting them as it finds them.)

Other than that, Dovecot is certainly much faster than UW-IMAP; I'm  
very pleased with the speedup I've gotten from it so far. It's also  
lessened the incidents of OS X mail "giving up" on operations; with  
UW-IMAP, if I tried to do too many operations at once (delete 5  
messages, delete 5 more messages, pull up a message, delete 5 more,  
pull up another), it would sometimes give up, put all the deleted  
messages back, and try to resync itself with the imap server. So far  
I haven't had any of those occurrences when using Dovecot.

Thanks all,

-dalvenjah


More information about the dovecot mailing list