Bug #666327 - IMAP deadlock when moving message and checking new mail
with service lock removal the fix for bug #666327
went out (commit
74fcab535c0f50a27742c05e94036b8370ea9173).
Was a good thing as this version is less a hack.
To summarize:
imap folder deadlock:
1. do_copy :
.imap command on source lock the imap store
2. camel_imap_folder_fetch_data on destination:
. lock the destination folder
3. do_copy :
. call the hande user tag : wait for lock on the destination
folder cache .
4. camel_imap_folder_fetch_data on destination:
. wait for lock on the imap store to be freed.
Fix: get the lock on the destination folder cache before locking the
imap store (ie before calling the imap command).