Whenever I boot my gentoo laptop, openrc hangs forever in the "Caching service dependencies..." stage. This causes my computer to be unbootable unless I use a sysrq key to kill it and manually boot the system.
ps as a diagnostic tool, I found that the
cut programs (children of a script
gendepends.sh) were hanging, using 0% CPU. Killing these programs allowed the boot process to continue properly, after invoking
Anyway, I could use many methods to fudge around this problem, but I'd like to know the most likely cause and fix it properly.
Here's the relevant output of pstree when I try to resolve dependencies manually:
| | `-doas /lib/rc/bin/rc-depend -u | | `-rc-depend -u | | `-gendepends.sh /lib64/rc/sh/gendepends.sh | | `-gendepends.sh /lib64/rc/sh/gendepends.sh | | `-gendepends.sh /lib64/rc/sh/gendepends.sh | | |-cut -d = -f 2 | | |-grep pid | | |-tr -d \\" | | `-tr -d [:space:]
gendepends.sh, these commands are not mentioned anywhere, so I assume they are invoked from another script which was sourced by it.
EDIT: I've fixed the problem now. It turned out to be caused by an old init script with unresolvable dependencies which was still lying around in my initscripts directory for some reason. Deleting the script solved the problem. Thanks for the suggestions.