Re: [exim] Exim clock offset and CLOCK_MONOTONIC timer

Etusivu
Poista viesti
Vastaa
Lähettäjä: Jeremy Harris
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] Exim clock offset and CLOCK_MONOTONIC timer
On 26/08/2021 14:08, Martin Preen via Exim-users wrote:
> I think there is a problem with the Solaris version of Exim.
>
> The symptoms I've seen are negative RT log entries and negative $message_age values.
> But there maybe more. With a SIGHUP the negative values disappear (temporarily).
>
> I've read the sources and manual pages and maybe this is the reason:
>
> Exim calculates an offset of the CLOCK_MONOTONIC timer once at the start of the program
> and this offset is used to calculate the real receive time of an incoming message.


... if _POSIX_MONOTONIC_CLOCK exists. I assume it does on your platform.

> This is fine if CLOCK_REALTIME and CLOCK_MONOTONIC timers are both updated by adjtime
> or other calls (e.g. via ntpd/ntpdate). This is the case with Linux and AFAIK this also
> applies to CLOCK_BOOTTIME. On Solaris CLOCK_MONOTONIC isn't updated by clock drifts.


But if your clock really is monotonic and not adjusted by adjtime (or similar),
it should never go backwards and you shouldn't get the symptoms you are seeing.

I'm worried that somewhere a different time syscall is being used.

--
Cheers,
Jeremy