How to restart systemd after it crash? systemd currently crash during VirtualBox installation. Problem is already tracked by this issue#10716. I'm using Ubuntu 18.10.

sudo dpkg -i virtualbox-5.2_5.2.20-125813_Ubuntu_bionic_amd64.deb
Setting up virtualbox-5.2 (5.2.20-125813~Ubuntu~bionic) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
Failed to enable unit: Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)

sudo journalctl --no-pager -b -0 -p 0..4
dec 08 20:20:55 machine kernel: systemd[1]: segfault at 40000 ip 00007fe8fdcb9116 sp 00007ffd6f134918 error 4 in libc-2.28.so[7fe8fdc2e000+171000]
dec 08 20:20:55 machine systemd[1]: Caught <SEGV>, dumped core as pid 6345.
dec 08 20:20:55 machine systemd[1]: Freezing execution.

I tried to execute following commands, but without success. The only solution that I came up is to hard restart my machine.

sudo systemctl restart org.freedesktop.systemd1
Failed to restart org.freedesktop.systemd1.service: Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)

# This finish without errors, but "list-units" still doesn't show anything
sudo systemctl daemon-reexec

sudo systemctl list-units --no-pager
Failed to list units: Connection timed out

sudo systemctl daemon-reload
Failed to reload daemon: Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
  • You restarted your machine and systemd won’t start? – justinnoor.io Dec 8 '18 at 20:34
  • @justinnoor.io Yes it restart, but it would be nice to have some runtime solution for that. If you don't rely on any particular service, linux is pretty much operational. Hard reset looks like overkill – NiegodziwyBeru Dec 8 '18 at 22:09
  • Rebooting your machine is not overkill if it crashes :) – justinnoor.io Dec 8 '18 at 22:32

You cannot.

Once systemd has reached this state, there is no way out. It is an infinite loop in the systemd program.

You will have to wait for the actual bugs (one in Oracle's barmy VirtualBox post-installation procedures, q.v., and one in systemd when daemon-reexec is called often) to be fixed.

Oracle's barmy post-installation procedure is not only calling daemon-reexec instead of daemon-reload several times in quick succession, it is duplicating with its own mechanisms, written in shell script, work that systemd-sysv-generator already does. (So, too, does the Debian replacement mechanism, sad to say.) As seems to be so often the case, one major cause of problems is Oracle's shell script layers on top of stuff.

Further reading

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.