Bug 36125

Summary: D-Bus drops messages during service activation
Product: dbus Reporter: Allison Lortie (desrt) <desrt>
Component: coreAssignee: Havoc Pennington <hp>
Status: RESOLVED DUPLICATE QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: medium CC: chengwei.yang.cn, robert.ancell
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Allison Lortie (desrt) 2011-04-11 00:21:06 UTC
(this bug is known by many people for a while and I can find many similar bugs reported, but I can't find this one, so I report it here)

D-Bus contains a "feature":

 - some service has an activation file and is not running

 - some client sends a message to this service and exits immediately

then it plays out like this:

 - D-Bus starts activating the service (which takes a little while)

 - the originating client exits

 - D-Bus notices the exit and drops the message (because the sender is now gone)


This makes sense for a couple of reasons:

 - if the sender is no longer existing, then they don't care about it anymore

 - it's weird for a service to receive a message from a non-existent sender


It's a really big problem though, in the case that the message has a side effect.  We have to go to quite some lengths in GSettings/dconf, for example, to ensure that we actually receive the reply when a write was made to dconf (to avoid losing settings because of this problem).  The result is that the application is essentially forced to stay around until it receives affirmative replies from dconf (which only happens after an fsync(), so it's quite slow).

It would be nice to revisit this design choice and possibly reverse it.
Comment 1 Chengwei Yang 2013-12-06 08:37:35 UTC
track at #bug52372 since there are more comments, sorry.

*** This bug has been marked as a duplicate of bug 52372 ***

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.