Problem moving between folders during 2.3.16 -> 2.5.9 upgrade
Kenneth Marshall
ktm at rice.edu
Mon Jul 25 08:53:04 EDT 2016
On Mon, Jul 25, 2016 at 03:53:43PM +1000, ellie timoney wrote:
> I don't have a 2.3.x environment handy to try to reproduce this from the
> outside in, so I'm starting at the error code and working outwards...
>
> > > <1469384361<a0080 UID COPY 1162729 "Drafts"
> > > >1469384362>a0080 NO Mailbox format corruption detected
>
> "Mailbox format corruption detected" corresponds with
> IMAP_MAILBOX_CHECKSUM
>
> This error code is exclusively returned by functions in imap/mailbox.c,
> for index/record crc mismatches. Given that the mailbox is selectable
> and such, I'm supposing that the whole-file/whole-record crc checks are
> okay...
>
> It looks like 2.3.16 had MAILBOX_MINOR_VERSION 10, and in particular
> doesn't have the record->cache_crc field, which many of the
> IMAP_MAILBOX_CHECKSUM checks are for. When reading mailboxes < 12 in
> newer Cyrus versions, this field is initialised to zero.
>
> Some of the places that want to do a crc check against record->cache_crc
> first make sure record->cache_crc is non-zero before doing so:
> cache_append_record(), mailbox_cacherecord().
>
> But some don't, or at least don't appear to: mailbox_append_cache()
> initially uses cache_append_record() (good), but then reads it straight
> back in to ensure freshness -- and then having done so, appears to do an
> unconditional check against record->cache_crc (dodgy?)
>
> Actually that seems like all the spots this check happens -- so the fix
> might be as simple as the attached patch?
>
> Kenneth, are you able to try this out?
>
> Cheers,
>
> ellie
>
Hi Ellie,
That fixes the problem. Thank you so much for the quick response.
Regards,
Ken
More information about the Info-cyrus
mailing list