On Mon, 2008-07-21 at 18:08 +0200, Andreas M. Kirchwitz wrote:
Jul 12 01:04:45 linux dovecot: Panic: IMAP(user2): file index-sync.c: line 39 (index_mailbox_set_recent_uid): assertion failed: (seq_range_exists(&ibox->recent_flags, uid))
I think I finally managed to fix this: http://hg.dovecot.org/dovecot-1.1/rev/48bbaf0c3e4d
I was able to reproduce it with imaptest by running two of them:
imaptest copybox=Trash clients=5 msgs=10000 delete=10 expunge=10 copy=100 logout=1 imaptest box=Trash clients=2 append=0 msgs=10000 expunge=10 delete=10 logout=1 rawlog
The problem was that Dovecot marked messages \Recent only when it read them from the mbox file. But when messages were saved by Dovecot itself, they were already in index files so there wasn't any need to read them. Then in some situations Dovecot could read the messages in reverse order and try to set the \Recent flags in that order.