race conditon on 2 concurrent mailbox rename in murder setup

Michael Menge michael.menge at zdv.uni-tuebingen.de
Thu Sep 8 04:24:42 EDT 2016


I discovered a race condition in cyrus imapd 2.4.18 if 2 concurrent  
rename operation are running on the same folder

19:44:15 mailserv08 imap[1001]: Rename: user.userA.Folder ->  
19:45:27 mailserv08 imap[1002]: Rename: user.userA.Folder ->  
19:46:43 mailserv08 imap[1001]: Deleted mailbox user.userA.Folder
19:46:43 mailserv08 imap[1002]: MUPDATE: can't commit mailbox entry  
for 'user.userA.jetanotherFolder.Folder'
19:46:43 mailserv08 imap[1002]: Deleted mailbox  

The first rename succeeds, but the second rename recreates the  
mailboxdb entry for the original folder, which does not exist in the  
filesystem. Which will lead to IOErrors if the original folder is  
accessed (e.g. cyr_expung / squatter)

I am not sure if the race condition was introduced by my patch for Bug  
3862 (https://bugzilla.cyrusimap.org/show_bug.cgi?id=3862) or if it  
existed before.

At the moment i restore the original folder (mkdir Folder; touch  
cyrus.index cyrus.header; reconstruct)
and delete it with cyradm. Is there an better way to remove the non  
existing folder from the
mailboxdb / mupdate without restoring it?


     Michael Menge

M.Menge                                Tel.: (49) 7071/29-70316
Universität Tübingen                   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung          mail:  
michael.menge at zdv.uni-tuebingen.de
Wächterstraße 76
72074 Tübingen

More information about the Cyrus-devel mailing list