Bug#1070474: time sync overflows on ARCH armhf(Debian 12, bookworm) with systemd-timesyncd.service

Perr Zhang strongbox8 at zoho.com
Fri May 10 02:16:59 BST 2024


I debuged the systemd core file:
------------------------------
root at archlinux:/# gdb /usr/bin/systemd core
GNU gdb (Debian 13.1-3) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/systemd...
Reading symbols from /usr/lib/debug/.build-id/08/012654d6118a0fa2d1b816477ee009edee155f.debug...

warning: exec file is newer than core file.
[New LWP 23696]
[New LWP 1]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Core was generated by `/sbin/init earlyprintk'.
Program terminated with signal SIGABRT, Aborted.
#0  0xb6b674c8 in __GI_kill () at ../sysdeps/unix/syscall-template.S:120
120	../sysdeps/unix/syscall-template.S: No such file or directory.
[Current thread is 1 (LWP 23696)]
(gdb) thread apply all bt

Thread 2 (Thread 0xb69b6d00 (LWP 1)):
warning: Couldn't find general-purpose registers in core file.
Python Exception <class 'gdb.error'>: Register 13 is not available
#0  <unavailable> in ?? ()

Thread 1 (LWP 23696):
#0  0xb6b674c8 in __GI_kill () at ../sysdeps/unix/syscall-template.S:120
#1  0x004220d2 in crash (sig=6, siginfo=<optimized out>, context=<optimized out>) at ../src/core/crash-handler.c:83
#2  <signal handler called>
#3  __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
#4  0xb6b9850c in __pthread_kill_implementation (threadid=3063639296, signo=6, no_tid=<optimized out>) at pthread_kill.c:43
#5  0xb6b67322 in __GI_raise (sig=sig at entry=6) at ../sysdeps/posix/raise.c:26
#6  0xb6b580ac in __GI_abort () at abort.c:79
#7  0xb6d78d00 in log_assert_failed () from /usr/lib/arm-linux-gnueabihf/systemd/libsystemd-shared-252.so
#8  0xb6d8f85e in now () from /usr/lib/arm-linux-gnueabihf/systemd/libsystemd-shared-252.so
#9  0xb6d8f8d0 in triple_timestamp_get () from /usr/lib/arm-linux-gnueabihf/systemd/libsystemd-shared-252.so
#10 0xb6e08388 in sd_event_wait () from /usr/lib/arm-linux-gnueabihf/systemd/libsystemd-shared-252.so
#11 0xb6e0958a in sd_event_run () from /usr/lib/arm-linux-gnueabihf/systemd/libsystemd-shared-252.so
#12 0xb6f22e68 in manager_loop () from /usr/lib/arm-linux-gnueabihf/systemd/libsystemd-core-252.so
#13 0x0041bb6a in invoke_main_loop (ret_error_message=0xbe8e0a3c, ret_switch_root_init=<synthetic pointer>, ret_switch_root_dir=<synthetic pointer>, ret_fds=0xbe8e0a34, ret_shutdown_verb=<synthetic pointer>, ret_retval=<synthetic pointer>, saved_rlimit_memlock=0xbe8e0a50, saved_rlimit_nofile=0xbe8e0a60, m=<optimized out>) at ../src/core/main.c:1904
#14 main (argc=2, argv=0xbe8e0ed4) at ../src/core/main.c:2993
(gdb) 
------------------------------

the assert of now() failed at https://github.com/systemd/systemd/blob/e8dc52766e1fdb4f8c09c3ab654d1270e1090c8d/src/basic/time-util.c#L53
assert_se(clock_gettime(map_clock_id(clock_id), &ts) == 0); //clock_gettime() syscall should failed with EOVERFLOW which means the kernel time exceeds year 2038 at that time point



More information about the Pkg-systemd-maintainers mailing list