I was getting such hangs when I was repeatedly installing and uninstalling LXD. That was the reason I wrote the post.
The lessons I got from repeated installs and uninstalls, is that lxd init
performs an initialization that is not atomic. That is, if an lxd init
is interrupted by an error, whatever was done in the previous steps, stays there and does not get rolled back. You would need to do any clean-up. This is understandable and OK.
The other lesson is that when you uninstall, you are hitting on issues that may be bugs relating to systemd
as well. You get a hang at systemd-tty-ask
, https://www.freedesktop.org/software/systemd/man/systemd-tty-ask-password-agent.html That looks like it is waiting for a password (or it asks some question) but somehow you do not get the prompt to type it. When you kill a process that is hang, you end up having systemd ask for the password (or some prompt) for the next step (and so on).
Therefore, if you kill a process to get the uninstall to continue, you end up going into a more complicated state. It’s OK to kill the processes so that the uninstall gets completed and then you have the change to manually clean up any leftovers. If you want to diagnose the initial systemd-tty-ask
, you would need to look into cases that systemd displays a prompt but you do not get to view the prompt.