Bug 77005 - bus-driverd racing external requests
Summary: bus-driverd racing external requests
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
: 77004 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-04-03 13:51 UTC by David Herrmann
Modified: 2014-04-14 01:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description David Herrmann 2014-04-03 13:51:17 UTC
Ryan just made me aware of this. The following sequence works reliably with dbus1, but not with kdbus + bus-driverd:

ADD_MATCH to=org.freedesktop.DBus
METHOD_CALL to=someone.else

If both calls are async, with dbus1, the ADD_MATCH is guaranteed to be finished before METHOD_CALL is forwarded to someone.else. With bus-driverd, there's no such guarantee.

I'm not really sure how to fix it. Some ideas:
 * make any org.freedesktop.DBus call synchronous in the kernel (ugh, ugly!)
 * support org.freedesktop.DBus only when called through bus-proxyd and make it synchronous inside of bus-proxyd (hm, still ugly?)
 * make sd-bus inspect any outgoing messages and make them synchronous if they're targeted as org.freedesktop.DBus
 * document it, but it ignore it and make people wait for ADD_MATCH to actually finish

With "synchronous" I obviously mean just delaying any other outgoing message until we got the response. That "waiting" can still be async.. (like HELO)

I'm actually not sure whether _any_ of the bus-driverd calls is still needed with kdbus, but if it is, we probably need to review the other ones, too.
Comment 1 David Herrmann 2014-04-14 01:35:49 UTC
*** Bug 77004 has been marked as a duplicate of this bug. ***
Comment 2 David Herrmann 2014-04-14 01:39:00 UTC
Fixed in:

commit 2a0abe5b6d4997baaeb3353eee8685d92b2060e9
Author: Lennart Poettering <lennart@poettering.net>
Date:   Sun Apr 13 18:25:10 2014 -0700

    bus: process AddMatch/RemoveMatch driver call in proxy


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.