Modify

Opened 4 years ago

Last modified 4 years ago

#14541 new defect

busybox-ntpd cannot set time / error message "Alarm clock"

Reported by: bittorf@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: busybox ntpd Cc:

Description

i'am really unsure how to debug further - is it a firewall issue?

root@E2-chemiesaal-AP:~ for I in 1 2 3; do URI="$I.openwrt.pool.ntp.org"; ping -c1 $URI; ntpd -d -n -q -p $URI; done
PING 1.openwrt.pool.ntp.org (5.9.122.148): 56 data bytes
64 bytes from 5.9.122.148: seq=0 ttl=51 time=35.273 ms

--- 1.openwrt.pool.ntp.org ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 35.273/35.273/35.273 ms
ntpd: resolved peer 1.openwrt.pool.ntp.org to 84.200.73.161
ntpd: sent query to 84.200.73.161
Alarm clock
PING 2.openwrt.pool.ntp.org (5.9.110.236): 56 data bytes
64 bytes from 5.9.110.236: seq=0 ttl=50 time=34.433 ms

--- 2.openwrt.pool.ntp.org ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 34.433/34.433/34.433 ms
ntpd: resolved peer 2.openwrt.pool.ntp.org to 85.214.100.186
ntpd: sent query to 85.214.100.186
Alarm clock
PING 3.openwrt.pool.ntp.org (149.20.68.17): 56 data bytes
64 bytes from 149.20.68.17: seq=0 ttl=53 time=190.138 ms

--- 3.openwrt.pool.ntp.org ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 190.138/190.138/190.138 ms
ntpd: resolved peer 3.openwrt.pool.ntp.org to 72.8.140.200
ntpd: sent query to 72.8.140.200
Alarm clock

root@E2-chemiesaal-AP:~ date
Sun Jan 11 04:34:52 CET 1970

i cannot even find the string "Alarm clock" in ntpd.c

Attachments (0)

Change History (3)

comment:1 Changed 4 years ago by bittorf@…

it is definitely a firewall issue with 'ipfire', but the error-message is misleading:

public timeserver:

root@box:~ ntpd -d -n -q -p 1.openwrt.pool.ntp.org
ntpd: resolved peer 1.openwrt.pool.ntp.org to 85.214.111.180
ntpd: sent query to 85.214.111.180
Alarm clock

with local/internal-timeserver:

root@box:~ ntpd -d -n -q -p 10.10.0.1
ntpd: resolved peer 10.10.0.1 to 10.10.0.1
ntpd: sent query to 10.10.0.1
ntpd: reply from 10.10.0.1: reach 0x01 offset -0.037225 delay 0.003906 status 0x24 strat 11 refid 0x7f7f0100 rootdelay 0.000000
ntpd: sent query to 10.10.0.1
ntpd: reply from 10.10.0.1: reach 0x03 offset -0.037393 delay 0.003906 status 0x24 strat 11 refid 0x7f7f0100 rootdelay 0.000000
ntpd: sent query to 10.10.0.1
ntpd: reply from 10.10.0.1: reach 0x07 offset -0.037632 delay 0.003906 status 0x24 strat 11 refid 0x7f7f0100 rootdelay 0.000000
ntpd: sent query to 10.10.0.1
ntpd: reply from 10.10.0.1: reach 0x0f offset -0.037845 delay 0.003906 status 0x24 strat 11 refid 0x7f7f0100 rootdelay 0.000000
ntpd: sent query to 10.10.0.1
ntpd: reply from 10.10.0.1: reach 0x1f offset -0.037935 delay 0.003906 status 0x24 strat 11 refid 0x7f7f0100 rootdelay 0.000000

comment:2 Changed 4 years ago by etienne.champetier

Hi,

The "Alarm clock" come from a SIGALRM.
When you are using "-q" option, busybox ntpd wait 10s for the first reply from a peer, if it get one, give 50s max to sync time.

also when your using "-d" it seems to imply "-q" (maybe a bug in busybox/in strace i see "alarm(50)")

see http://git.busybox.net/busybox/commit/?id=8e23fafadee75bbe275bb795d0b2c2121dad93e7

see also man alarm
http://linux.die.net/man/2/alarm

comment:3 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.