Re: systemd times out stopping dhcpcd
Roy Marples
Tue Jun 02 20:13:02 2020
On 02/06/2020 19:08, frederik@xxxxxxx wrote:
Dear dhcpcd people,
Yesterday I reported the following issue to Systemd:
https://github.com/systemd/systemd/issues/16036
The problem is that sometimes when executing the Systemd command to stop dhcpcd,
it takes 20 seconds to complete:
sudo systemctl stop dhcpcd@en0.service
Apparently this command invokes `dhcpcd -x en0` and waits for all the dhcpcd
processes to exit. After 20 seconds, a timeout occurs and Systemd sends SIGTERM
instead.
I haven't been able to learn more about the issue, I just wanted to report it
and move on. It makes restarting my computer very slow. However, Lennart
Poettering is sure that it's a Dhcpcd problem and not a Systemd problem, so I
had to resubmit the bug here. I pointed out to him that when I run `dhcpcd -x
en0` on the command line then it always causes the daemon to exit immediately,
it is only the `systemctl stop` command which doesn't work properly.
For the record, here is the reply I posted to the above issue:
This seems to be an Arch + systemd only issue.
Someone kindly tested the same dhcpcd setup on Gentoo where it worked without issue.
dhcpcd reacts just fine to SIGTERM as any well behaved process should across all
versions.
In a nutshell, for dhcpcd-9.0 there is a chroot setup script which mount --bind
/dev, /dev/rlog, /run, /proc and /sys in the chroot so that the chrooted process
could access the necessary.
For dhcpcd-9.1, this has been changed so that these are accessed from the chroot
via IPC so no mounting is necessary.
I have no explanation as to why this is an issue at all - AFAIK it only affects
systemd on Arch.
systemd on Gentoo worked fine according to @floppym . It also worked fine using
other init systems.
Roy
Archive administrator: postmaster@marples.name