Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 368797 - net-misc/ntp-4.2.6_p3 `ntpd --panicgate --slew --quit` doesnt timeout
Summary: net-misc/ntp-4.2.6_p3 `ntpd --panicgate --slew --quit` doesnt timeout
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-26 16:01 UTC by Yun Zheng Hu
Modified: 2011-05-28 18:47 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 Yun Zheng Hu 2011-05-26 16:01:22 UTC
I use the following /etc/conf.d/ntp-client settings:

NTPCLIENT_CMD="ntpd"
NTPCLIENT_OPTS="--panicgate --slew --quit"

This way i can re-use the settings from "ntpd" in /etc/ntp.conf. 
It works perfectly, but when it cannot connect to the ntp servers it does not seem to timeout and therefor blocks the boot process.

The version I was using before was ntp-4.2.4_p6, this version did timeout so I wonder what changed in the code.

When stracing I see the following:

--- SIGALRM (Alarm clock) @ 0 (0) ---
sigreturn()                             = ? (mask now [])
clock_gettime(CLOCK_REALTIME, {1306425171, 670617738}) = 0
clock_gettime(CLOCK_REALTIME, {1306425171, 671257618}) = 0
sendto(19, "\343\0\6\364\0\0\0\0\0\0\0EINIT\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 48, 0, {sa_family=AF_INET, sin_port=htons(123), sin_addr=inet_addr("94.75.205.140")}, 16) = 48
clock_gettime(CLOCK_REALTIME, {1306425171, 672426486}) = 0
select(20, [16 17 18 19], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---
sigreturn()                             = ? (mask now [])
clock_gettime(CLOCK_REALTIME, {1306425172, 670561022}) = 0
select(20, [16 17 18 19], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---
sigreturn()                             = ? (mask now [])
clock_gettime(CLOCK_REALTIME, {1306425173, 670684700}) = 0
select(20, [16 17 18 19], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-05-26 17:05:28 UTC
It seems you are making the boot process depend on a good network connection. This means it is highly likely that the boot process stalls when there is no good network connection. Looking at the ntp-client conf.d script, it seems you had been warned:

# Command to run to set the clock initially
# Most people should just leave this line alone ...
# however, if you know what you're doing, and you
# want to use ntpd to set the clock, change this to 'ntpd'
NTPCLIENT_CMD="ntpdate"

If you want to really get this fixed as a bug, then ask at <http://www.ntp.org/>.