After Lubuntu 18.04 installation, the system didn't boot, so I started root shell in recovery mode. I've observed that all systemd commands (e.g. systemctl list-sockets
) are very slow or time out. My attempts to debug this:
Looking at the output of
strace -p 1
I've observed that systemd PID 1 is waiting in a ppoll(2) system call to receive data on the dbus socket, but that data never arrives.Output of
ps ax | grep dbus
contains919 ? Zs 0:0 [dbus-daemon] <defunct>
, and the PID changes every few minutes.systemctl list-jobs
is very slow (or times out), it displays1950 dbus.service start waiting
.journalctl -u dbus.service -b -f
dispays a few instances ofStarted D-Bus System Message Bus
; 90 seconds later:dbus.service: Main process exited, code=exited, status=1/FAILURE
. It doesn't show any other messages (e.g. the error message bydbus-daemon
).
I suspect that the root cause of systemctl ...
timeouts is that dbus.service
crashes shortly after it starts. How do I debug this further? Where can I see the logs (+ stdout + stderr) of dbus.service
?
I'm new to systemd and dbus. I have some Linux debugging skills from the pre-systemd times.
journalctl -xe
to see the systemd logs. But also you can manually start the dbus service to see what happens. The exact command-line arguments are in theExecStart
option of the/lib/systemd/system/dbus.service
file which is the actual service. For example mine is :/usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only