Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 82859 - /etc/init.d/ntpd restart tries to kill wrong process
Summary: /etc/init.d/ntpd restart tries to kill wrong process
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-21 12:11 UTC by Peter Wendrich
Modified: 2005-08-19 21:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Wendrich 2005-02-21 12:11:30 UTC
athlon1800 peter # /etc/init.d/ntpd restart
 * Stopping ntpd ...
start-stop-daemon: warning: failed to kill 347: No such process
1 pids were not killed
No process in pidfile `/var/run/ntpd.pid' found running; none killed.
 * Failed to stop ntpd                                                                 [ !! ]
 * Starting ntpd ...                                                                   [ ok ]

Apperently ntpd was no longer running. Looking at the logging might show the reason it is not running.
athlon1800 peter # cat /var/log/ntp.log
21 Feb 19:27:31 ntpd[347]: synchronized to 132.163.4.101, stratum 1
21 Feb 19:27:31 ntpd[347]: time correction of 4079 seconds exceeds sanity limit (1000); set clock manually to the correct UTC time.

Which I find ok, but I don't like it tries to kill 347 if this is no longer the ntp process. What happens if this pid is used for something else by the time I do a restart?

Reproducible: Didn't try
Steps to Reproduce:
1. distroy local time
2. wait for ntpd to complain in the log
3. /etc/init.d/ntpd restart

Actual Results:  
See details 

Expected Results:  
ntpd should delete the /var/run/ntpd.pid file when it discovers an error and 
terminates itself (just a guess)
Comment 1 SpanKY gentoo-dev 2005-08-19 21:09:20 UTC
fixed in cvs