dbus.service does not recover dbus-daemon after spurious SIGTERM

Zizka, Jan (Nokia - CZ/Prague) jan.zizka at nokia.com
Tue Apr 5 11:02:48 UTC 2016


Hi,

I have been running some provocative tests on a systemd based OS with Clould99 and I have found
out that dbus-daemon would not recover after killing it with SIGTERM. There is no recovery action
configured in default dbus.service.

Is that service configured that way on purpose or it was just not considered that dbus-daemon
is not needed to be restarted on failure or successfull exit? Or could following patch be accepted upstream
to allow dbus-daemon recovery on systemd based systems by default?

diff --git a/bus/dbus.service.in b/bus/dbus.service.in
index 3bc4726..e78ac6b 100644
--- a/bus/dbus.service.in
+++ b/bus/dbus.service.in
@@ -4,6 +4,7 @@ Documentation=man:dbus-daemon(1)
 Requires=dbus.socket
 
 [Service]
+Restart=always
 ExecStart=@EXPANDED_BINDIR@/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
 ExecReload=@EXPANDED_BINDIR@/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
 OOMScoreAdjust=-900
diff --git a/bus/systemd-user/dbus.service.in b/bus/systemd-user/dbus.service.in
index 4355d72..329cdfe 100644
--- a/bus/systemd-user/dbus.service.in
+++ b/bus/systemd-user/dbus.service.in
@@ -4,5 +4,6 @@ Documentation=man:dbus-daemon(1)
 Requires=dbus.socket
 
 [Service]
+Restart=always
 ExecStart=@EXPANDED_BINDIR@/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
 ExecReload=@EXPANDED_BINDIR@/dbus-send --print-reply --session --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig

Jan


More information about the dbus mailing list