Dependency loop via sockets.target
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dbus (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Impish |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
basic.target waits for dbus.socket (via sockets.target) AND dbus.socket waits for basic.target, too, delaying dbus-daemon startup. At some point a timeout happens, dbus is started and all queued services try to start registering to the bus at the same time.
All services registering at the same time, seems to be triggering bugs like this more often: https:/
This happens since Hirsute (dbus 1.12.20-1ubuntu3), where the following delta was added:
Index: dbus-1.
=======
--- dbus-1.
+++ dbus-1.
@@ -1,5 +1,9 @@
[Unit]
Description=D-Bus System Message Bus Socket
+# Do not stop on shutdown
+DefaultDepende
+Wants=
+After=
[Socket]
ListenStream=
It leads to deadlock situations like this:
09:23:59.276245 systemd[1]: basic.target: starting held back, waiting for: sockets.target
09:23:59.276438 systemd[1]: dbus.socket: starting held back, waiting for: basic.target
09:23:59.304393 systemd[1]: dbus.service: starting held back, waiting for: dbus.socket
Related branches
- Jeremy Bícha (community): Approve
- git-ubuntu import: Pending requested
-
Diff: 942 lines (+771/-7)7 files modifieddebian/changelog (+470/-3)
debian/control (+2/-1)
debian/dbus.postinst (+5/-0)
debian/patches/series (+2/-0)
debian/patches/ubuntu/aa-get-connection-apparmor-security-context.patch (+192/-0)
debian/patches/ubuntu/dont-stop-dbus.patch (+98/-0)
debian/rules (+2/-3)
- Simon Chopin (community): Approve
- git-ubuntu import: Pending requested
-
Diff: 914 lines (+745/-7) (has conflicts)7 files modifieddebian/changelog (+444/-3)
debian/control (+2/-1)
debian/dbus.postinst (+5/-0)
debian/patches/series (+2/-0)
debian/patches/ubuntu/aa-get-connection-apparmor-security-context.patch (+192/-0)
debian/patches/ubuntu/dont-stop-dbus.patch (+98/-0)
debian/rules (+2/-3)
- Steve Langasek (community): Approve
- Julian Andres Klode (community): Abstain
- git-ubuntu import: Pending requested
-
Diff: 905 lines (+709/-31)9 files modifieddebian/changelog (+412/-3)
debian/control (+2/-1)
debian/dbus.postinst (+5/-0)
debian/gbp.conf (+1/-1)
debian/patches/series (+2/-0)
debian/patches/ubuntu/aa-get-connection-apparmor-security-context.patch (+187/-0)
debian/patches/ubuntu/dont-stop-dbus.patch (+98/-0)
debian/rules (+2/-3)
dev/null (+0/-23)
tags: | added: rls-ii-incoming |
tags: | added: fr-1522 |
Changed in dbus (Ubuntu Impish): | |
milestone: | none → ubuntu-21.10 |
tags: | removed: rls-ii-incoming |
description: | updated |
What the patch was supposed to do is to list
Default Dependencies from https:/ /www.freedeskto p.org/software/ systemd/ man/systemd. socket. html#
But drop/negate shutdown related ones.
Thus it should have been
1) Before= dependency on sockets.target
2) After= and Wants= dependency on sysinit.target
Requires= sysinit. target is downgraded to Wants to prevent attempting to stop dbus.service on shutdown.