Hi, I did a bit of digging into the assertions from mbox-rewrite.c (hdr_parsed_size.physical_size == hdr_size). Every time it happens, hdr_size is 0, while hdr_parsed_size.physical_size is non-zero (presumably the correct value). Does this help track it down? I can't manage to get hold of an mbox that causes this though. Another infrequent assertion that's popped up: file message-address.c: line 262 (message_address_write): assertion failed: (addr->domain != NULL) And one that's only ever been spotted once in the last few weeks: file imap-bodystructure.c: line 278 (part_parse_headers): assertion failed: (part->physical_pos >= input->v_offset - start_offset) I'm waiting for them to happen again to provide some more info... Regards, Bernard. -- Bernard Blackham bernard at blackham dot com dot au
On Sun, 2003-10-05 at 22:43, Bernard Blackham wrote:> Hi, > > I did a bit of digging into the assertions from mbox-rewrite.c > (hdr_parsed_size.physical_size == hdr_size). Every time it happens, > hdr_size is 0, while hdr_parsed_size.physical_size is non-zero > (presumably the correct value).That'd mean the header size is saved incorrectly to index file.. Hmm. CVS doesn't anymore store header size in indexes and the assertion has been removed. Maybe that "fixes" it :)> Another infrequent assertion that's popped up: > file message-address.c: line 262 (message_address_write): assertion failed: (addr->domain != NULL)This is fixed by the address-parser patch in web page.> And one that's only ever been spotted once in the last few weeks: > file imap-bodystructure.c: line 278 (part_parse_headers): assertion failed: (part->physical_pos >= input->v_offset - start_offset)This assertion has also been removed from CVS, but it also indicates some index corruption.. Maybe next version magically fixes everything :) BTW. I fixed today the mbox code to work again and I'm now using it. Lets see how long it takes to corrupt my inbox :)
Timo, Just FYI while you're working on the mbox code, I discovered a bug that occasionally causes dovecot to insert a single blank line at the beginning of the mbox, I'm not sure when/how/why. A single blank line seems to really confuse dovecot, and causes the server to crash when somebody connects to an afflicted mbox. ("Error indexing mbox" in the log, and disconects the user right away). I fixed it with lots of ugly code at our site (basically just remember that we skipped an intial blank line when doing other operations, instead of skipping it then forgetting later). I suspect there's a more elegant way to do it. - Mike