BUG: Mailbox renaming algorithm got into a potentially infinite loop, aborting

Timo Sirainen
2019-10-16T14:55:04Z

On 25 Sep 2019, at 17.03, Alex Ha via dovecot <dovecot at dovecot.org
<mailto:dovecot at dovecot.org>> wrote:
>
> Hi all!
>
> I have two dovecot servers with dsync replication over tcp.
> Replication works fine except for one user.
>
> # doveadm replicator status
> username
priority fast sync full sync success sync failed
> customer at example.com <mailto:customer at example.com>
none     00:00:33  07:03:23  03:22:31     y
>
> If i run dsync manually, i get the following error message:
>
> dsync-local(customer at example.com <mailto:customer at
example.com>): Debug: brain M: -- Mailbox renamed, restart sync --
> dsync-local(customer at example.com <mailto:customer at
example.com>): Error: BUG: Mailbox renaming algorithm got into a potentially
infinite loop, aborting
> dsync-local(customer at example.com <mailto:customer at
example.com>): Error: Mailbox INBOX.Foldername sync: mailbox_rename failed:
Invalid mailbox name 'Foldername-temp-1': Missing namespace prefix
'INBOX.'
>
I've never fixed this because I haven't figured out how to reproduce it.
If it happens with you all the time, could you try:

 - Get a copy of both replica sides, e.g. under /tmp/replica1 and /tmp/replica2
 - Make sure dsync still crashes with them, e.g. doveadm -o
mail=maildir:/tmp/replica1 sync maildir:/tmp/replica2
 - Delete all mails and dovecot.index* files (but not dovecot.mailbox.log)
 - Make sure dsync still crashes
 - Send me the replicas - they should no longer contain anything sensitive

As for fixing, you could see if deleting dovecot.mailbox.log from both replicas
happens to fix this.

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://dovecot.org/pipermail/dovecot/attachments/20191016/143a32d2/attachment.html>