Re: [chrony-dev] Chrony "Watchdog" |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
Sorry for my late answer. I was on vacation and my mailbox was overloaded.
Am 2011-06-10 12:43, schrieb Miroslav Lichvar:
> On Fri, Jun 10, 2011 at 09:55:59AM +0200, Harald Krammer wrote:
>> Hello *,
>> my tests are nearly completed with 1.25. One thing I have noted.
>> If a time jump will happen into the past (done by settimeofday)
>> then Chrony does not update the information's anymore.
>> The leap in time happens by a software fault in my application.
>> I fixed that, but I have an uneasy feeling. It is clear to me
>> that a time-jump is a sensitive subject.
>
> chrony currently doesn't handle external jumps in system time. On
> a large forward jump all timers will fire at once, that's not that
> bad, but on a backward jump all timer activity will stop until the
> clock is back at the time they were originally scheduled.
>
>> Currently I uses the 'System time' from command tracking to find
>> out the current offset. That isn't enough. A watchdog
>> functionality may be helpful. What do you think?
>
> You mean something using alarm()? What exactly would it do to recover
> from the backward jump?
>
> One of the items in my todo list is to rework the timer facility to be
> able to use the CLOCK_MONOTONIC clock. That should solve the problem
> with external jumps nicely.
>
> In the meantime I think it should be good enough to compare timestamp
> captured after every select() call with the previous one and if the
> difference is negative, adjust all timers by that amount. I'll look
> into it.
>
You are right. CLOCK_MONOTONIC clock would be the best solution. In the
past I monitored the chrony process from my application. This solution
is not generally valid.
I saw you made a patch for that and it's already released in Chrony
1.26. so I will test it.
Thank you!
Nice greetings,
Harald
--
Harald Krammer
Mobil +43.(0) 664. 130 59 58
Mail: Harald.Krammer (at) hkr.at
---
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.