mailboxes.db locking problem after updating from 2.4 to 2.5.9

Deniss cyrus at
Thu Nov 17 08:00:30 EST 2016


I trying to migrate one big cyrus imap server from 2.4 to 2.5.9.

I updated binaries, fix db backend in imapd.conf and converted
mailboxes.db with ctl_mboxlist -d & -u to twoskip.

cyrus ran fine until morning when a count of simultanious sessions
started to rise.

then imapd processes become locked on mailboxes.db when logs show
something like
Nov 17 08:04:21 srv1 imap[11019]: cmdtimer: 'yo at' 'list'
'<none>' '46.741322' '0.000000' '46.741322'
Nov 17 08:04:21 srv1 imap[11019]: buf: A1 LIST "" "*"

I converted mailboxes.db back to skiplist and got a bunch (10-20 per
sec) of following logs:

Nov 17 09:59:09 srv1 imap[5352]: skiplist: longlock
/var/imap/mailboxes.db for 177.7 seconds
Nov 17 09:59:09 srv1 imap[6760]: skiplist: longlock
/var/imap/mailboxes.db for 169.7 seconds
Nov 17 09:59:09 srv1 imap[6764]: skiplist: longlock
/var/imap/mailboxes.db for 171.7 seconds
Nov 17 09:59:09 srv1 imap[5230]: skiplist: longlock
/var/imap/mailboxes.db for 171.8 seconds
Nov 17 09:59:09 srv1 imap[5251]: skiplist: longlock
/var/imap/mailboxes.db for 203.2 seconds
Nov 17 09:59:09 srv1 imap[5221]: skiplist: longlock
/var/imap/mailboxes.db for 168.9 seconds

then I rolled back to cyrus 2.4 (converting mailboxes.db back to old
format) and the server started to work just fine again.

I run 8core 16gb box with mailboxes.db on SSD disk, noswap,
Linux 4.4.8-hardened glibc-2.20 x86_64-pc-linux-gnu-4.8.4 on Gentoo

mailboxes.db is ~200Mb depending of format
135M /var/imap/mailboxes.plain
180M /var/imap/mailboxes.db.skiplist.24
215M /var/imap/mailboxes.db.skiplist.25
262M /var/imap/mailboxes.db.twoskip.25

Any ideas or suggestion for investigation ?


More information about the Info-cyrus mailing list