Expunged mail files left 'on disk'?

Bron Gondwana brong at fastmail.fm
Tue Jul 9 21:06:44 EDT 2013


On Wed, Jul 10, 2013, at 10:36 AM, Henrique de Moraes Holschuh wrote:
> On Wed, 10 Jul 2013, Bron Gondwana wrote:
> > On Tue, Jul 9, 2013, at 11:38 PM, Henrique de Moraes Holschuh wrote:
> > > On Tue, 09 Jul 2013, Bron Gondwana wrote:
> > > > On Tue, Jul 9, 2013, at 11:46 AM, Bron Gondwana wrote:
> > > > > This really SHOULD work - it would be pretty bad if we've broken
> > > > > expunge, and I'll make it a priority to get a fix for you.
> > > > 
> > > > Back on list - one issue that can cause cleanups to fail on 2.4.x is an
> > > > ongoing connection to the mailbox.  If another process is holding the
> > > > mailbox name lock, then the cleanup is left for that process to finish
> > > > instead.  24x7 connections by an IMAP client can trigger it.
> > > > 
> > > > This is fixed on the master tree by releasing the lock in the imapd
> > > > command loop, so it's not maintained by idle connections.  It was a big,
> > > > messy change that won't ever be backported though.
> > > 
> > > What's the procedure to recover?  Run reconstruct (which would ressurect the
> > > left-over messages) and then delete them?
> > 
> > Actually, reconstruct doesn't do anything about it - it doesn't kill off the
> > connections.  The procedure to recover is just to disconnect all clients
> > (potentially by restarting the server) and then visit all mailboxes
> > (cyr_expire will do that - as will reconstruct.  I would recommend
> > reconstruct -s to reduce the IO hit if you go that path)
> 
> Can we add support for SIGQUIT for the workers as a "shutdown connection,
> clean up and exit", if we don't do that already?  It would make it trivial
> to clean up children that lived for too long...  Granted, it would be best
> to also add the hability for long-lived children to shutdown after a
> configurable number of hours of service.
> 
> This should be something less complicated to backport to 2.4...

Yeah, we do indeed support SIGQUIT for precisely that.  It may not be perfect
(there have been some signal handling changes in master), but I'm pretty sure
it works.

Bron.


-- 
  Bron Gondwana
  brong at fastmail.fm


More information about the Cyrus-devel mailing list