[pkg-ntp-maintainers] Bug#471358: race condition in /etc/network/if-up.d/ntpdate with many interfaces
Bas van Sisseren
bas at quarantainenet.nl
Mon Mar 17 17:14:24 UTC 2008
Package: ntpdate
Version: 1:4.2.2.p4+dfsg-2
Severity: important
When after a reboot all interfaces are brought up, the
/etc/network/if-up.d/ntpdate script spawns a 'ntpdate &' for every
interface. With many interfaces and an incorrectly set hardware-clock,
this can result in a mayor time-shift:
Mar 17 15:05:21 qserver ntpdate[1408]: step time server 81.171.44.131
offset -3468.662657 sec
Mar 17 14:07:33 qserver ntpdate[1585]: step time server
87.238.168.160 offset -3468.664036 sec
Mar 17 13:09:45 qserver ntpdate[1618]: step time server
87.238.168.160 offset -3468.664084 sec
Mar 17 12:11:58 qserver ntpdate[1651]: step time server
87.238.168.160 offset -3468.663937 sec
Mar 17 11:14:10 qserver ntpdate[1684]: step time server
87.238.168.160 offset -3468.663897 sec
Mar 17 10:16:22 qserver ntpdate[1720]: step time server 192.87.106.2
offset -3468.662245 sec
The problem can be fixed by forcing that only one ntpdate process is running
at a time. You could choose not to background the ntpdate task (I think the
1 second timeout is good enough), or use a lockfile to hold off the other
ntpdate processes.
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.23.8-cfs-v24-hrt3.0-qnet64.2
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages ntpdate depends on:
ii libc6 2.3.6.ds1-13etch5 GNU C Library: Shared libraries
ii libcap1 1:1.10-14 support for getting/setting POSIX.
ii libssl0.9.8 0.9.8c-4etch1 SSL shared libraries
ii netbase 4.29 Basic TCP/IP networking system
ntpdate recommends no packages.
-- no debconf information
More information about the pkg-ntp-maintainers
mailing list