NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/39893: rc.d/ntpd cannot reliably use pidfiles
>Number: 39893
>Category: bin
>Synopsis: rc.d/ntpd cannot reliably use pidfiles
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Nov 11 12:50:00 +0000 2008
>Originator: Roy Marples
>Release: NetBSD-5.99.01
>Organization:
>Environment:
NetBSD uberlaptop 5.99.01 NetBSD 5.99.01 (UBERLAPTOP) #1: Wed Nov 5 09:45:08
GMT 2008 roy@uberlaptop:/usr/obj/sys/arch/i386/compile/UBERLAPTOP i386
>Description:
ntpd takes a while to create it's pidfile after forking.
This poses a problem to the rc.d/ntpd script which expects a fully working
pidfile.
>How-To-Repeat:
# /etc/rc.d/ntpd restart; /etc/rc.d/ntpd status; /etc/rc.d/ntpd restart;
/etc/rc.d/ntpd status
Stopping ntpd.
Waiting for PIDS: 4820.
Starting ntpd.
ntpd is not running.
ntpd not running? (check /var/run/ntpd.pid).
Starting ntpd.
ntpd is running as pid 5134.
>Fix:
Remove the pidfile directive from /etc/rc.d/ntpd and you then get this
# /etc/rc.d/ntpd restart; /etc/rc.d/ntpd status; /etc/rc.d/ntpd restart;
/etc/rc.d/ntpd status
Stopping ntpd.
Waiting for PIDS: 5134.
Starting ntpd.
ntpd is running as pid 6335.
Stopping ntpd.
Waiting for PIDS: 6335.
Starting ntpd.
ntpd is running as pid 4852.
I also wrote a patch for ntpd to create the pidfile as early as possible. There
is still a window, but it's much smaller.
https://support.ntp.org/bugs/show_bug.cgi?id=794
Home |
Main Index |
Thread Index |
Old Index