Error: Could not shut down filedescriptor...

Rob Siemborski rjs3 at
Wed Jul 23 09:58:59 EDT 2003

On Wed, 23 Jul 2003, Henrique de Moraes Holschuh wrote:

> I need more coffee.  Debian uses skiplist for the SEEN db, so it is a lock
> contention in skiplist.  I am not sure this is good at all, it is the first
> I've heard of it.
> Although I did not deploy 2.1.14 to production here yet, so it might have
> something to do with changes in 2.1.14's skiplist I did not notice in time.

Nothing major changed in the 2.1.14 skiplist or seen state handling code.

>From the log that Erik provided it appears that his client simultaneously
opens several (5-6) mailboxes.  All of these open operations are going to
require access to the seen state database for the same user.  This means
there will be contention on the per-user seen state.

On stock Cyrus this probably isn't even noticeable since the processes will
just block and be notified immediately when the file is available as
opposed to having to poll for availability.

The lock retry code, on the other hand, will need to make several attempts
before it gets the lock, resulting in more delay to the user (and some
unattractive log messages, apparently).  I haven't checked the patch but I
suspect this is a symptom of too-high of a log level and little else.

Ironicly, this wouldn't be a problem if we were still using per-mailbox
seen state.  However, such a seen state architecture falls apart as soon
as you get a decent number of popular shared folders.

> Well, if it tries to do so at the same time, a lock contention will happen,
> but it should be a rather fast one...  however, it appears that by the time
> cyrus imapd tries again, the other instance has moved on to another mailbox,
> and it gets contention again, and again, and again...

This seems to be an accurate assessment.


Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper

More information about the Info-cyrus mailing list