Bug 26427 - Eavesdroppers don't receive method calls dispatched to just-activated services
Summary: Eavesdroppers don't receive method calls dispatched to just-activated services
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-02-04 08:32 UTC by Will Thompson
Modified: 2010-03-19 10:48 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
[PATCH 1/2] Move dispatching to destination to bus_dispatch_matches() (3.71 KB, patch)
2010-02-05 08:05 UTC, Will Thompson
Details | Splinter Review
[PATCH 2/2] Dispatch post-activation messages to anyone interested (2.51 KB, patch)
2010-02-05 08:06 UTC, Will Thompson
Details | Splinter Review

Description Will Thompson 2010-02-04 08:32:18 UTC
I was hunting for a bug involving the arguments passed to RequestConnection(), which is the method that generally activates the CM. Strangely, `dbus-monitor member='RequestConnection'` produced no output, and yet the connection was certainly being requested.

A bit of hair-tearing later, I discovered that if I started the CM by hand before trying to request a connection, the method call was delivered to the minotaur correctly. So I think this is a daemon bug.
Comment 1 Will Thompson 2010-02-05 08:05:12 UTC
Created attachment 33094 [details] [review]
[PATCH 1/2] Move dispatching to destination to bus_dispatch_matches()
Comment 2 Will Thompson 2010-02-05 08:06:00 UTC
Created attachment 33095 [details] [review]
[PATCH 2/2] Dispatch post-activation messages to anyone interested

Previously, if a method call activated a service, it would only be
delivered to that service, and not to other services with match rules
which should match. This patch replaces the improperly-duplicated
dispatch code in activation.c with a call back into the normal dispatch
code, fixing this bug (fd.o#26427).

(Additionally, were one to service-activate a service that doesn't
understand file descriptors with a message containing a file descriptor,
the previous code would send it anyway, and the service's dbus library
would blow up. This is also fixed here, since the normal dispatch code
checks this correctly.)
Comment 3 Will Thompson 2010-02-05 08:08:26 UTC
I've fixed this, but haven't written a regression test, I'm afraid.

Branch against master at <http://git.collabora.co.uk/?p=user/wjt/dbus.git;a=shortlog;h=refs/heads/where-did-my-method-calls-go> and backported to 1.2 at <http://git.collabora.co.uk/?p=user/wjt/dbus.git;a=shortlog;h=refs/heads/where-did-my-method-calls-go-1.2>.
Comment 4 Colin Walters 2010-02-19 09:55:48 UTC
Comment on attachment 33094 [details] [review]
[PATCH 1/2] Move dispatching to destination to bus_dispatch_matches()

After re-familiarizing myself with the dispatching logic, this first patch looks right to me.
Comment 5 Colin Walters 2010-02-19 10:00:57 UTC
Comment on attachment 33095 [details] [review]
[PATCH 2/2] Dispatch post-activation messages to anyone interested

Looks good, thanks!
Comment 6 Will Thompson 2010-03-19 10:48:34 UTC
Merged to master and dbus-1.2, thanks for the review!


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.