After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 721089 - Only dbus policy prevents gdm from deadlocking
Only dbus policy prevents gdm from deadlocking
Status: RESOLVED DUPLICATE of bug 701758
Product: gdm
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2013-12-26 16:12 UTC by Lennart Poettering
Modified: 2014-01-06 19:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Lennart Poettering 2013-12-26 16:12:57 UTC
The bus protocol spoken between the gdm display object the gdm slave works like this:

after start-up the slave will synchronously call back into the display with the SetSlaveBusName() call. The display will then create a proxy object for some object on the slave and immediately invoke the org.freedesktop.DBus.Properties.GetAll() call on it by doing that (gdbus think's that the right thing to do) -- also synchronously! The slave hence waits for the display to respond which makes the display wait on the slave to wait, which however won't reply since it's still synchronously waiting for the display to respond. Deadlock! Or so one would think. Turns out that on most machines the dbus policy avoids this deadlock, since the GetAll() will actually be denied by the bus and return quickly with an error code, and gdbus ignores these errors. Yikes!

We have now made the Fedora userspace work on kdbus, which means that the old dbus-daemon is not around anymore, but instead a dbus compatbility proxy that forwards old traffic into kdbus. THis is pretty much complete, however lacks one thing still: the enforcement of the legacy XML policy. Instead all traffic is allowed curerntly. This works fine for the entire system of curse (even though being quite insecure), with the exception of one thing: if gdm runs without policy, then the GetAll() will make gdm hang.

Of course, this is also a bug on dbus1, if people decide to losen the XML policy a bit.

Anyway, this design is really broken in gdm I am pretty sure. One shalt not be synchronous client and server to the same other services. gdm breaks that rule. gdm bad!

Bah, guys, I just lost two days of my life on debugging this. :-(
Comment 1 Lennart Poettering 2013-12-27 16:29:55 UTC

*** This bug has been marked as a duplicate of bug 701758 ***
Comment 2 Ray Strode [halfline] 2014-01-06 19:03:34 UTC
sorry !