[exim] Exim clock offset and CLOCK_MONOTONIC timer

Top Pagina
Delete this message
Reply to this message
Auteur: Martin Preen
Datum:  
Aan: exim-users
Onderwerp: [exim] Exim clock offset and CLOCK_MONOTONIC timer
Hi,
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.

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.

Thus, depending on the clock drifts of a particuliar system,
the offset may become wrong in a long running process.

There seems to be no equivalent to the Linux variant of CLOCK_MONOTONIC on Solaris.
Only for the opposite direction (see CLOCK_MONOTONIC_RAW on Linux).

Martin

----------------------------------------------------------------------
Martin Preen, Universität Freiburg, Institut für Informatik
Georges-Koehler-Allee 52, Raum EG-006, 79110 Freiburg, Germany

phone: ++49 761 203-8250    preen@???
fax: ++49 761 203-8242      swt.informatik.uni-freiburg.de/staff/preen