Some part of bug from 2.3.4 still in 2.3.5

Bron Gondwana brong at fastmail.fm
Fri May 26 01:52:16 EDT 2006


On Thu, 25 May 2006 09:00:36 -0400, "Ken Murchison" <murch at andrew.cmu.edu> said:
> Robert Mueller wrote:
> > Hi Ken
> > 
> > There's still a serious bug in 2.3.5 that causes copied messages to be 
> > pseudo invisible in the moved to folder. I can reproduce it as follows:
> 
> Have you uncovered any other bugs that need to be fixed before I 
> embarrass myself again by making a premature 2.3.6 release?

*cough*  (line numbers may vary, I'm working on a patched source set
here).

Symptom: reconstruct of a newly copied user fails with:
...
May 26 00:15:17 imap5 reconstruct[12807]: IOERROR: locking cache for user.foobarbaz: Bad file descriptor
May 26 00:15:17 imap5 reconstruct[12807]: IOERROR: locking cache for user.foobarbaz.Drafts: Bad file descriptor
May 26 00:15:17 imap5 reconstruct[12807]: IOERROR: locking cache for user.foobarbaz.Trash: Bad file descriptor
...

So, it appears that in mailbox_open_index:

mailbox.c:628      if (mailbox_doing_reconstruct) break;

means we don't run:

mailbox.c:636      mailbox->cache_fd = open(fname->buf, O_RDWR, 0);

But in mailbox_upgrade_index:

mailbox.c:1696     r = mailbox_lock_pop(mailbox);

We go ahead and try to lock pop.  Unfortunately, lock_pop actually
locks (you guessed it) cache_fd.

The attached patch protects mailbox_lock_pop and mailbox_unlock_pop
so that they turn into a noop when mailbox_doing_reconstruct is set.
Of the various approaches, this seemed the sanest to me - since they
can't possibly work without a cache_fd and you'll never have one
when in reconstruct mode.  I don't know enough about reconstruct to
go the alternative route (actually creating a cache_fd back up in
mailbox_open_index)

This is fine for us, because we generally lock users from logging in
when we're running reconstructs on them anyway.

Bron.
-- 
  Bron Gondwana
  brong at fastmail.fm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cyrus-indexupgrade-2.3.6.diff
Type: text/x-patch
Size: 816 bytes
Desc: not available
Url : http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20060526/8ee090c0/cyrus-indexupgrade-2.3.6.bin


More information about the Info-cyrus mailing list