[ntp:questions] ntpd exits without word in log

Dave Hart hart at ntp.org
Tue Nov 22 14:44:14 UTC 2011


On Tue, Nov 22, 2011 at 13:14,  <mass85 at tlen.pl> 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


More information about the questions mailing list