Opened 6 years ago

Closed 3 weeks ago

#9348 closed bug (fixed)

Network time won't synchronize clock at boot

Reported by: Giova84 Owned by: leavengood
Priority: normal Milestone: R1
Component: Preferences/Time & Date Version: R1/Development
Keywords: Network time won't synchronize clock at boot Cc:
Blocked By: Blocking: #12266, #14206
Has a Patch: no Platform: x86

Description

Since i have installed hrev45110, at every startup i found that the clock is one hour behind (with Haiku Alpha 4.1 i don't have this issue). In Time Preference time is set correctly to my time zone. If i click on "Synchronize" in the "Network Time" tab, clock will show the correct time, but if i select "Synchronize at boot", at the boot time the clock is not synchronized.

Change History (8)

comment:1 Changed 6 years ago by diver

Synchronize at boot has never worked for me since it was added in hrev41956. Maybe Time should wait for an active network interface before trying to sync?

comment:2 Changed 6 years ago by leavengood

I'm pretty sure I tested that, but it may work on some systems but not others if there is a race condition in it running before a network is up. I think we could change Time to wait for a network with a reasonable timeout when the --update command-line option is provided. Or a --boot option could be added to turn on this behavior.

comment:3 in reply to:  2 Changed 6 years ago by anevilyak

Replying to leavengood:

I'm pretty sure I tested that, but it may work on some systems but not others if there is a race condition in it running before a network is up. I think we could change Time to wait for a network with a reasonable timeout when the --update command-line option is provided. Or a --boot option could be added to turn on this behavior.

What would be more ideal is to use BNetworkRoster/BNetworkDevice to watch for interface changes in order to actually know when the device is up and in a usable state. That rules out time-based races entirely.

comment:4 Changed 6 years ago by axeld

It could simply keep trying for a while if the synchronization fails. It should just not keep the system from booting in case it's currently doing that.

comment:5 Changed 6 years ago by leavengood

Owner: changed from axeld to leavengood
Status: newassigned

Taking ownership since I added the feature to Time. I may not get around to fixing this for a while though.

comment:6 Changed 4 years ago by diver

Blocking: 12266 added

comment:7 Changed 3 months ago by diver

Blocking: 14206 added

comment:8 Changed 3 weeks ago by waddlesplash

Resolution: fixed
Status: assignedclosed

Fixed in hrev53049.

Note: See TracTickets for help on using tickets.