When a calendar timer with RandomizedOffsetSec and Persistent=true fires a catch-up activation, last_trigger is set to the current wall-clock time. This inherently already includes any randomized offset, because the trigger was that the activation time including the offset had passed. When computing the next elapse, calendar_spec_next_usec() finds the next calendar boundary after the base time, and then random_offset is added to the result. If the base time already includes the offset, the next calendar boundary is one period too far in the future, causing a scheduled activation to be skipped. Fix this by always subtracting random_offset from the base time before passing it to calendar_spec_next_usec(), matching what the fallback branches (using inactive_exit_timestamp or current time) already do. This puts the base into "pre-offset calendar space" so that the next calendar match and subsequent offset addition yield the correct next activation time. Fixes #42337.
System and Service Manager
Details
Most documentation is available on systemd's website.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list, join our IRC channel #systemd on libera.chat or Matrix channel
Stable branches with backported patches are available in the stable repo.
We have a security bug bounty program sponsored by the Sovereign Tech Fund hosted on YesWeHack
Repositories with distribution packages built from git main are available on OBS, and also repositories with packages built from the latest stable release
