Opened 5 years ago

Last modified 19 months ago

#15408 reopened bug

NTP on boot seems broken

Reported by: nephele Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: - General Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #15741, #18423
Platform: All

Description

hrev53536

I can't recall a hrev where ntp on boot worked for me though, not quite sure how to debug this, it failed on a laptop for me (with a busted battery, and probably busted cmos battery) aswell as on this desktop (which has an ethernet connection).

On the desktop atleast clicking "synchronize now" gets me the correct time after boot.

attaching syslog since i am not sure what is needed to debug this.

Attachments (1)

ntpsyslog.txt (35.2 KB ) - added by nephele 5 years ago.

Download all attachments as: .zip

Change History (16)

by nephele, 5 years ago

Attachment: ntpsyslog.txt added

comment:1 by pulkomandy, 5 years ago

The relevant part of /system/data/user_launch/user:

        job update-time {
                launch /system/preferences/Time "" --update
                if setting ~/config/settings/networktime\ settings "synchronize at boot"
                on network_available
        }

So I see 3 possible causes:

  • The command line used there does not work
  • The setting is disabled
  • The network_available event is triggered too early and the network isn't actually available yet

I suggest checking the first 2 as they seem easier to do, and hope it's an easy fix there.

comment:2 by pulkomandy, 5 years ago

In particular I don't see what's the empty string as first argument to Time doing, and that could well be the problem?

comment:3 by waddlesplash, 5 years ago

I wrote that rule. I can't remember off the top of my head what the purpose of the empty string was, but IIRC all other launch rules used it too. I think it's argv 0?

comment:4 by nephele, 5 years ago

# cat networktime\ settings pool.ntp.orgde.pool.ntp.orgtime.nist.govdefault serversynchronize at boottry all servers#

# koder networktime\ steeings

HMF1tstn

Not sure what that is about, atleast for cat the setting seams to be there? though i am not quite sure what the format is

to test the commandline, how would i invoke a job via user_launch manually?

comment:5 by pulkomandy, 5 years ago

The settings are in BMessage format, the "message" command line tool will give more readable output (in particular the boolean value of the setting, but you can as well see that the checkbox is ticked in Time preferences)

As for testing, the launch_roster command can be used, I don't know if it allows triggering this however.

comment:6 by nephele, 5 years ago

synchronize at boot = bool(true)

So, case two should be fine

comment:7 by nephele, 5 years ago

I tried severall locations to overwrite what launch_roster pulls from, but no luck, so not quite sure how i would test condition #1

comment:8 by mrentropy, 5 years ago

I'm seeing the same issue on an ASRock DESKMINI A300W The clock is set to use local time, not UTC The BIOS is set to local time The timezone is set correctly (or as correctly as it can be)

Boot to desktop, and clock is set about five hours ahead Bring up the clock prefs and manually sync the time server Everything works fine, until a reboot.

comment:9 by pulkomandy, 5 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev53666.

comment:10 by nephele, 5 years ago

Resolution: fixed
Status: closedreopened

This is still an issue on hrev53673, I have had severall boots with ethernet connection that kept the clock state from the previous shutdown.

comment:11 by waddlesplash, 5 years ago

Did you actually set a timezone, or set your hardware clock to UTC? If you do not do one of those things I don't think it will synchronize.

comment:12 by nephele, 5 years ago

Yes, the system seems to be configured correctly, i do have the HW clock set to UTC and my timezone set to "Germany Time", as i said, synchronizing after boot works fine, but the system comes up with a wrong time untill i trigger a sync manually

comment:13 by pulkomandy, 5 years ago

Summary: NTP on boot seams brokenNTP on boot seems broken

comment:14 by diver, 5 years ago

Blocking: 15741 added

comment:15 by waddlesplash, 19 months ago

Blocking: 18423 added
Note: See TracTickets for help on using tickets.