[systemd-devel] dbus-1/kdbus - question about 'queued owners'
Lennart Poettering
lennart at poettering.net
Fri Apr 10 08:35:35 PDT 2015
On Fri, 10.04.15 16:20, Lukasz Skalski (l.skalski at samsung.com) wrote:
> I think that code comments explain scenario of this test quite well. In
> this testcase I create two D-Bus client connections. Both connections
> request the same well-known name on bus. 'connection_a' becomes primary
> owner of the name. Because name replacement is not possible,
> 'connection_b' is appended to the queue. Next, 'connection_b' once again
> tries to own the same name and once again we have 'IN_QUEUE' as a return
> code. After this, 'connection_a' releases previously owned name. Now
> primary owner of "org.my.busname" name is 'connection_b'. First
> 'ReleaseName' returns RELEASED as it was expected. Inconsistency between
> dbus-daemon and kdbus has place when 'connection_b' once again tries to
> release "org.my.busname" name. After last 'ReleaseName' dbus-daemon
> returns NON_EXISTENT. In case of kdbus/bus-proxyd, we have RELEASED
> return code (if we add next/third 'ReleaseName' call for 'connection_b'
> it will return NON_EXISTENT) - it causes problems with last assert().
>
> The main source of above problem is difference how dbus-daemon and kdbus
> handles placing the same connection in queue two times for the same
> well-know name.
>
> Which solution, kdbus or dbus-daemon, do it correctly?
I think dbus-daemon is right, and kdbus/bus-proxy is wrong here.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list