Package: chrony Version: 4.3.2+deb12u1 Severity: important In investigating an issue in which dhclient got killed prematurely shortly after boot, resulting in the loss of network connectivity one lease time later (this motivates the severity), I found that /etc/network/if-up.d/chrony doesn't guard against the possibility that "chronyc onoffline" might return non-zero.
This is indeed what happened in at least one instance, as shown by the following process accounting records: 000resolvconf |v3| 0.00| 0.00| 0.00| 0| 0| 2576.00| 0 .00| 1736| 1735| | 0|__ |Fri Jan 3 14:33:36 2025 chronyc |v3| 0.00| 0.00| 0.00| 0| 0| 4336.00| 0 .00| 1743| 1742|S | 1|__ |Fri Jan 3 14:33:36 2025 chrony |v3| 0.00| 0.00| 0.00| 0| 0| 2576.00| 0 .00| 1742| 1735|S | 1|__ |Fri Jan 3 14:33:36 2025 run-parts |v3| 0.00| 0.00| 0.00| 0| 0| 2468.00| 0 .00| 1735| 1733| | 1|__ |Fri Jan 3 14:33:36 2025 sh |v3| 0.00| 0.00| 0.00| 0| 0| 2576.00| 0 .00| 1733| 1553| | 1|__ |Fri Jan 3 14:33:36 2025 ifup |v3| 0.00| 0.00| 25.00| 0| 0| 2528.00| 0 .00| 1553| 1549| | 1|__ |Fri Jan 3 14:33:36 2025 sh |v3| 0.00| 0.00| 25.00| 0| 0| 2576.00| 0 .00| 1549| 1|S | 1|__ |Fri Jan 3 14:33:36 2025 dhclient |v3| 0.00| 0.00| 24.00| 0| 0| 5932.00| 0 .00| 1576| 1|SF X| 0|__ |Fri Jan 3 14:33:36 2025 On this machine, /etc/network/if-up.d/ contains 000resolvconf, chrony, ethtool, nslcd, postfix, resolved. Notice how run-parts exits after chrony. Also notice the exit code (1) of chronyc. I suspect this is due to /run/chrony/chronyd.pid being created before chronyd is actually ready to accept commands. I reported a similar bug in postfix a few years ago: #959684. Bug #772720 may also have been due to this kind of problem (although it's hard to be certain).

