Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
pid1: stopping service freezes when ExecStop= runs "systemctl reload" on dependecy #7324
systemd version the issue has been seen with
In case of bug report: Expected behaviour you didn't see
Successfully stop a service.
In case of bug report: Unexpected behaviour you saw
In case of bug report: Steps to reproduce the problem
# /usr/lib/systemd/system/base.service [Service] ExecStart=/bin/sleep 5566 ExecReload=/bin/true
# /usr/lib/systemd/system/app.service [Unit] Requires=base.service After=base.service [Service] Type=oneshot ExecStart=/bin/systemctl reload base.service ExecStop=/bin/systemctl reload base.service RemainAfterExit=yes
I would like to point out that if I remove
I don't really know. I think there is a sort of interlocking in systemd which makes systemctl never receive the message that the reload is done, and that it can return.
--no-block makes systemctl return immediately instead of waiting for the action to complete, but it will take a real systemd dev to explain exactly what's going on here...
It is very clear why. You have a stop job in queue, but trigger a reload job for it. You have After=bar.service, hence the reload job waits on your stop job. Once your stop job is complete (however goes to fail due to timeout that was hit), it then schedules the reload job, which will complete.
Ordering of JOB_RELOAD is treated like JOB_START.