[Dovecot] Time moved backwards by 4398 seconds

Timo Sirainen tss at iki.fi
Fri Jun 20 12:13:53 EEST 2008


On Fri, 2008-06-20 at 10:53 +0200, Anders wrote:
> Dovecot (v1.1.rc8) died tonight, with an error about time moving
> backwards by 4398 seconds. I can see from logs that this has happend a
> few times before with the imap processes, without me noticing. I sure
> noticed the master process missing, though :-).
> 
> I was puzzled that it was always 4398 seconds, in particular because
> this server runs an NTP daemon. A little searching for this problem
> shows that it is an issue with the Linux kernel gettimeofday(), see
> e.g. http://lkml.org/lkml/2007/8/23/96
> 
> Below is a patch (untested) to work around this issue. Do you see
> something wrong with this approach, apart from the uglyness?

Only problem I can see is that if there's a legitimate jump of 4395
seconds it'll busy-loop for 5 seconds before continuing. Probably not
very likely to happen.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080620/09f32679/attachment.bin 


More information about the dovecot mailing list