[Dovecot] dovecot and ntp: Fatal: Time just moved backwards

Timo Sirainen tss at iki.fi
Mon Jun 22 05:03:01 EEST 2009


On Mon, 2009-06-08 at 16:09 -0700, Timo Sirainen wrote:
> Hmm. I suppose I could change Dovecot master so that if no imap/pop3  
> processes have been created yet, it would silently ignore the clock  
> move.

Implemented to v2.0. Maybe I'll backport it to v1.2 some day. From
http://wiki.dovecot.org/TimeMovedBackwards :

Dovecot v2.0 finally tries to handle this a bit more gracefully. Its
behavior when time moves backwards is: 

      * Existing imap and pop3 processes either sleep or die, just like
        with older versions 
      * Master process stops creating new processes until either the
        original time is reached, or after a maximum wait of 3 minutes. 
      * Other processes log a warning, but do nothing else. 
      * Timeouts are updated so that the timeout is executed
        approximately at the original intended time. 

Dovecot v2.0 also notices when time unexpectedly jumps forwards. In that
situation it logs a warning and also updates timeouts. 

The reason why imap/pop3 processes get killed and new ones can't be
created for a while is to avoid problems related to timestamps. Some
issues are: 

      * Uniqueness of Maildir filenames and dbox global unique
        identifiers relies on a growing timestamp 
      * Dotlock files' staleness is detected by looking at its mtime. 
      * Timestamps are stored internally all around in memory (as well
        as in index files) and compared to current time. Those checks
        may or may not be buggy if current time shrinks. 

While killing mail processes doesn't fully solve any of those issues,
they're at least less likely to happen then.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20090621/44b38705/attachment.bin 


More information about the dovecot mailing list