summaryrefslogtreecommitdiffstats
path: root/src/systemctl/systemctl-service-watchdogs.c
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2022-02-18 10:06:24 +0100
committerLennart Poettering <lennart@poettering.net>2022-02-22 11:45:12 +0100
commitc972880640ee19e89ce9265d8eae1b3aae190332 (patch)
tree7b490d7c04e18716bc7be976b3b90bac43446ba5 /src/systemctl/systemctl-service-watchdogs.c
parentsystemctl: improve error messages related to halt failures (diff)
downloadsystemd-c972880640ee19e89ce9265d8eae1b3aae190332.tar.xz
systemd-c972880640ee19e89ce9265d8eae1b3aae190332.zip
core: really skip automatic restart when a JOB_STOP job is pending
It's not clear why we rescheduled a service auto restart while a stop job for the unit was pending. The comment claims that the unit shouldn't be restarted but the code did reschedule an auto restart meanwhile. In practice that was rarely an issue because the service waited for the next auto restart to be rescheduled, letting the queued stop job to be proceed and service_stop() to be called preventing the next restart to complete. However when RestartSec=0, the timer expired right away making PID1 to reschedule the unit again, making the timer expired right away... and so on. This busy loop prevented PID1 to handle any queued jobs (and hence giving no chance to the start rate limiting to trigger), which made the busy loop last forever. This patch breaks this loop by skipping the reschedule of the unit auto restart and hence not depending on the value of u->restart_usec anymore. Fixes: #13667
Diffstat (limited to 'src/systemctl/systemctl-service-watchdogs.c')
0 files changed, 0 insertions, 0 deletions