[Dovecot] Unsolved : mbox-sync-rewrite.c : assertion failed

Dalvenjah FoxFire dalvenjah at dal.net
Thu Oct 26 21:31:04 UTC 2006


It got a bit weirder with this patch. It no longer crashed, but I got  
a different assert error, and a slight (fixable) corruption bug:

Oct 26 12:22:16 dragonlair dovecot: imap-login: Login:  
user=<dalvenja>, method=PLAIN, rip=X.X.X.X, lip=X.X.X.X, TLS
Oct 26 12:22:16 dragonlair dovecot: IMAP(dalvenja): L466 count: 0  
last_seq: 22025 first_seq: 22025
Oct 26 12:22:16 dragonlair dovecot: IMAP(dalvenja): file mbox-sync- 
rewrite.c: line 468 (mbox_sync_rewrite): assertion failed: (count ==  
last_seq - first_seq + 1)
Oct 26 12:22:16 dragonlair dovecot: child 20995 (imap) killed with  
signal 6
[...]
Oct 26 12:24:32 dragonlair dovecot: imap-login: Login:  
user=<dalvenja>, method=PLAIN, rip=X.X.X.X, lip=X.X.X.X, TLS
Oct 26 12:24:37 dragonlair dovecot: IMAP(dalvenja): L466 count: 0  
last_seq: 6370 first_seq: 6365
Oct 26 12:24:37 dragonlair dovecot: IMAP(dalvenja): file mbox-sync- 
rewrite.c: line 468 (mbox_sync_rewrite): assertion failed: (count ==  
last_seq - first_seq + 1)
Oct 26 12:24:37 dragonlair dovecot: child 21132 (imap) killed with  
signal 6

(the L466 line was added by me to print out the values for the assert  
variables)

This happened with two different mbox files.

The weirder part (the corruption bug) was that every time dovecot  
wrote the mbox file, it added between 280 and 320 NUL (ascii 0)  
characters at the end of the last message; so the next message to get  
appended by procmail started its 'From ' header on a "line" with NUL  
characters, and that message would not get recognized on the next  
check. I found this had happened a total of 3 times to the mbox file.

I was able to clean the NULs out of the mbox file, but I've again  
reverted back to the raw rc10 code for now.

Do you want me to try debugging with just the first patch and try to  
find where the core dump occurs?

Let me know -- thanks!

-dalvenjah

On Oct 26, 2006, at 4:28 AM, Timo Sirainen wrote:

> On Thu, 2006-10-26 at 00:38 -0700, Dalvenjah FoxFire wrote:
>> Same here -- segfaults with the patch. I tried an strace on the child
>> imap processes, but keep getting permission denied (even as root). I
>> turned on debugging but no luck. I went ahead and reverted to the
>> code from before the patch.
>
> Wonder why I didn't get it to crash. Anyway, this should fix it:
>
> http://dovecot.org/list/dovecot-cvs/2006-October/006634.html
>



More information about the dovecot mailing list