<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - bus-driverd racing external requests"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=77005">77005</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>bus-driverd racing external requests
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dh.herrmann@gmail.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>systemd
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>