Re: ntpd exits without word in log



On Tue, Nov 22, 2011 at 13:14, <mass85@xxxxxxx> wrote:
My ntpd running on embedded Linux sometimes exits and does not log any
reason for it. It's hard to say when it exactly happens, usually some
time (a few minutes or more) after synchronisation. I have ntpd in
version 4.2.4p2, uClibc 0.9.29.

Is there any reason for this behaviour? Is it a crash?

If there is no reason, it would not be repeatable :) If it were not a
crash (broadly defined) it would still be running.

To figure out what's going on, one possibility is to run ntpd from a
shell. Use ps to see the current ntpd command line when run as a
daemon. Stop the ntpd daemon. From a shell:

sudo /path/to/ntpd -ddd {normal command line}

With a bit of luck, when it exits, the preceding debug output will
shed a clue about what triggered the exit. If it doesn't, escalate to
doing the same but under gdb with breakpoints set on exit and _exit
before running ntpd, so the silent exit will break to the debugger
where a backtrace can be obtained to finger the offending code.

Keep in mind 4.2.4p2 is well-aged (20 June 2007). If you identify the
cause of the exit this way, you might find a newer ntpd already has
the bug fixed. In any case, a fixed 4.2.4 will never be released by
ntp.org. Current ntp-stable version is 4.2.6p4 -- fixes go in
successors like the currently-posted 4.2.6p5-RC1 or the ntp-dev 4.2.7
snapshots. It may be more productive to first see if 4.2.6p4 or
4.2.6p5-RC1 suffers the same problem.

Cheers,
Dave Hart
.



Relevant Pages

  • Re: ntpd exits without word in log
    ... doing the same but under gdb with breakpoints set on exit and _exit ... cause of the exit this way, you might find a newer ntpd already has ... interface 10.120.162.121 -> ...
    (comp.protocols.time.ntp)
  • Re: BUG: check your ntpd, it may be dead
    ... ntpd (pid 4207) is running... ... $ uname -r ... $ exit ...
    (Fedora)
  • Re: "ntpd -q" is slow compared to ntpdate
    ... that one should use 'ntpd -q -g' instead. ... Why in theworld do you want it to exit? ... If you care about having reasonably correct timestamps in your logs, ... daemonizing until the first time the clock is set". ...
    (comp.protocols.time.ntp)
  • Re: ntpd sync fails on boot
    ... However, after the boot, if I log on and restart ntpd, ... I ran a script that would start up NTPD quite late in the boot process. ...
    (Fedora)
  • Re: Set your system clock
    ... I don't see any reason not to just turn off ntpd and let ... >> cron run ntpdate every hour or so. ... >> clock accurate with less net bandwidth and resource usage. ... versions of ntpd do in fact call ntpdate to do that one time crash ...
    (Debian-User)