Subject: bug#76401: ntpd segfaults when started too early

From: Ludovic Courtès <[email-masked]>
Date: Tue, 18 Feb 2025 23:18:21 +0100

Ludovic Courtès <[email-masked]> skribis:

>   Latest exits:
>     - 2025-02-18 19:19:58  Process terminated with signal 11.
>     - 2025-02-18 19:19:58  Process terminated with signal 11.
>     - 2025-02-18 19:19:58  Process terminated with signal 11.
>     - 2025-02-18 19:19:57  Process terminated with signal 11.
>     - 2025-02-18 19:19:57  Process terminated with signal 11.

The /var/log/ntpd.log excerpt corresponding to one of these:

--8<---------------cut here---------------start------------->8---
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: ntpd [email-masked] Thu Jan  1 00:00:01 UTC 1970 (1): Starting
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: Command line: /gnu/store/hzsra0k8jcz4473c6clh5m5xfq29s0a0-ntp-4.2.8p18/bin/ntpd -n -c /gnu/store/7ac2i2c6dp2f9006llg3m5vkrna7pjbf-ntpd.conf -u ntpd -g
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: ----------------------------------------------------
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: ntp-4 is maintained by Network Time Foundation,
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: Inc. (NTF), a non-profit 501(c)(3) public-benefit
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: corporation.  Support and training for ntp-4 are
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: available at https://www.nwtime.org/support
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: ----------------------------------------------------
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: DEBUG behavior is enabled - a violation of any diagnostic assertion will cause ntpd to abort
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: proto: precision = 0.285 usec (-22)
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: baseday_set_day: invalid day (25556), UNIX epoch substituted
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: basedate set to 1970-01-01
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: gps base set to 1980-01-06 (week 0)
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: Listen and drop on 0 v6wildcard [::]:123
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: Listen and drop on 1 v4wildcard 0.0.0.0:123
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: Listen normally on 2 lo 127.0.0.1:123
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: Listen normally on 3 ens9 185.233.100.57:123
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: Listen normally on 4 ens10 185.233.100.56:123
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: Listen normally on 5 lo [::1]:123
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: bind(22) AF_INET6 [fe80::22cf:30ff:fe50:29fe%2]:123 flags 0x811 failed: Cannot assign requested address
2025-02-18 19:19:58 18 Feb 19:19:58 ntpd[1074]: unable to create socket on ens9 (6) for [fe80::22cf:30ff:fe50:29fe%2]:123
--8<---------------cut here---------------end--------------->8---

Ludo’.