[ntp:questions] ntpdate.c unsafe buffer write

David Woolley david at ex.djwhome.demon.co.uk.invalid
Sun Feb 10 21:49:26 UTC 2008


Harlan Stenn wrote:
> 
> Why would ntpd be exiting during a warm start?

Because we are discussing using it with the -q option.  If you just use 
-g, it will take a lot longer to converge within a few milliseconds, as 
it will not slew at the maximum rate.  If you use -q, you need to force 
a step if you want fast convergence.

> 
> For the case I'm describing the startup script sequence is to fire up 'ntpd
> -g' early.  If there are applications that need the system clock to be
> on-track stable (even if a wiggle is being dealt with), that's 'state 4',
> and running 'ntp-wait' before starting those services is, to the best of my
> knowledge, all that is required.

State 4 means within 128ms and using the normal control loop, which has 
a time constant of around an hour.

> David> For a cold start, it won't reach state 4 for a further 900 seconds
> David> after first priming the clock filter.
> 
> If the system has a good drift file, I disagree with you.

The definition of cold start is that there is no drift file.

> And what is the big deal with using different config files?  The config file
> mechanism has "include" capability so it is trivial to to easily maintain
> common 'base' configuration with customizations for separate start/run
> phases.

You are now talking about using -q.  The difficulty is that people have 
enough trouble getting the run phase config file right.

> 
> But the bigger problem is why are you insisting on separate start/run
> phases?  This has not been "best practice" for quite a while, and if you
> insist on using this method you will be running in to the exact problems you
> are describing.

> No, the best advice is to understand why you have been using ntpdate -b so
> far and understand the pros/cons of the new choices.

We are talking about system managers and package creators, neither of 
which have much time to study the details.




More information about the questions mailing list