systemd-timesyncd.service: Timed out waiting for reply from NTP server

Bug #1905688 reported by ethan.hsieh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
New
Low
Unassigned

Bug Description

systemd-timesyncd.service fails to correct time if the system time is later than February 7, 2036.

Image: ubuntu-20.10-desktop-amd64.iso
systemd: 246.6-1ubuntu1

$ timedatectl status
               Local time: Fri 2038-11-26 07:58:16 UTC
           Universal time: Fri 2038-11-26 07:58:16 UTC
                 RTC time: Fri 2038-11-26 07:58:17
                Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: no

ubuntu@ubuntu:~$ sudo systemctl status systemd-timesyncd.service
● systemd-timesyncd.service - Network Time Synchronization
     Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2038-11-26 07:36:55 UTC; 7min ago
       Docs: man:systemd-timesyncd.service(8)
   Main PID: 1257 (systemd-timesyn)
     Status: "Idle."
      Tasks: 2 (limit: 9283)
     Memory: 1.8M
     CGroup: /system.slice/systemd-timesyncd.service
             └─1257 /lib/systemd/systemd-timesyncd

Nov 26 07:39:09 ubuntu systemd-timesyncd[1257]: Timed out waiting for reply from 91.189.94.4:123 (ntp.ubuntu.com).
Nov 26 07:39:19 ubuntu systemd-timesyncd[1257]: Timed out waiting for reply from 91.189.89.198:123 (ntp.ubuntu.com).
Nov 26 07:40:34 ubuntu systemd-timesyncd[1257]: Timed out waiting for reply from 91.189.91.157:123 (ntp.ubuntu.com).
Nov 26 07:40:44 ubuntu systemd-timesyncd[1257]: Timed out waiting for reply from 91.189.89.199:123 (ntp.ubuntu.com).

There is no issue with ntpdate:

ubuntu@ubuntu:~$ sudo ntpdate -v ntp.ubuntu.com
26 Nov 08:16:21 ntpdate[8926]: ntpdate 4.2.8p12@1.3728-o (1)
26 Nov 08:16:30 ntpdate[8926]: step time server 91.189.91.157 offset -567993599.624839 sec
ubuntu@ubuntu:~$ date
Thu Nov 26 08:16:33 AM UTC 2020

Revision history for this message
ethan.hsieh (ethan.hsieh) wrote :
Revision history for this message
ethan.hsieh (ethan.hsieh) wrote :

Based on the wireshark log in comment#1, system received the package from NTP server.
But, the log showed "Timed out waiting for reply from NTP server"

Balint Reczey (rbalint)
Changed in systemd (Ubuntu):
importance: Undecided → Low
Revision history for this message
Balint Reczey (rbalint) wrote :

IMO it is a bug in systemd-timesyncd (see LP: #1880839) that it adjusts time backward automatically and thus this won't become a real issue until 2036.

Revision history for this message
Marjan (frikoanpulento) wrote :

This is beacuse in 2036 UTC will reach int limit.
To solve this bug time sohuld be stored in a long variable

Revision history for this message
Marjan (frikoanpulento) wrote :

P.S. I tried to reproduce it, but I cannot set time beyond 2036 (due to int limit problem), how did you acheive it?

Revision history for this message
ethan.hsieh (ethan.hsieh) wrote :

@Marjan
I set time by BIOS settings.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.