Odi's astoundingly incomplete notes

New entries | Code

On Gentoo sshd is killed after udev is triggered

After running some updates I noticed that sshd (including active sessions) were somehow killed sometimes. After much debugging I found the reason: udev and cgroups. It looks like udev can send kill signals to all members of its cgroup if it thinks that it's a systemd system. But on OpenRC systems that just does a lot of harm.

That udev triggering happens for example during: The problem occurs after restarting udev with: /etc/init.d/udev -D restart. The culplrit being the -D flag. The flag causes cgroups to be not set. So udev ends up in the main cgroup!

Note the absent udev directory under /sys/fs/cgroup/openrc

This also explains why the problem is fixed by a reboot.

I have filed a bug against OpenRC.

posted on 2019-04-08 08:37 UTC in Code | 0 comments | permalink