Cyrus 2.3.8 imapd process periodically sticks at 100% CPU

Bron Gondwana brong at fastmail.fm
Tue Sep 30 00:14:15 EDT 2008


On Mon, 29 Sep 2008 14:47:04 +0100, "Mark Cave-Ayland" <mark.cave-ayland at siriusit.co.uk> said:
> Bron Gondwana wrote:
> 
> > No, it won't.  You need to fix the mailbox or patch the code to not be
> > put into an infinite loop by a bogus index file.
> > 
> > The attached patch might do the trick for you.  I just slapped it
> > together on spec.  It compiles, that's about all I can offer about
> > it :)
> 
> Hi Bron,
> 
> Thanks for taking the time to respond, it is greatly appreciated. My 
> colleague Duncan has taken a look at this (see separate email) and found 
>   a corrupted index file which have now been rebuilt. Fingers crossed 
> that the problem is now resolved (I guess we'll find out in a month or 
> so) ;)

No problem, I've spent a while digging around inside the index code,
so I have pretty good idea of where the hairy bits are.  I started
work a while back on CRC32 checksums for individual index records.
Unfortunately, due to the direct memory access pattern used, it would
either be a massive CPU hit (re-calculate the CRC32 for every field
access) or a memory hit to parse the record into an object each time.

Actually, the memory hit isn't that bad (you're generally looking at
one record at a time), but there are a LOT of bits of code that access
the index records directly.

So I went the easy route of just not crashing.  I'm tempted to rework
that patch with a syslog call so you can know which mailbox needs a
reconstruct and then push it upstream.

Bron.
-- 
  Bron Gondwana
  brong at fastmail.fm



More information about the Info-cyrus mailing list