Bug in dbus daemon signal routing
Nick Jones
nick.jones at network-box.com
Fri Dec 30 00:48:07 PST 2011
We have experienced this strange behaviour:
- Server registers a method and waits for clients
The method records the name of the last caller and will periodically
send a signal ('Wakeup') directed only to that name owner, if a
new client calls the method, the Wakeup signal will go to the new
client
- Client with name :1 connects to dbus and invokes the method,
connects to Wakeup signal
- Server sends Wakeup signal to :1
- Client :1 receives Wakeup signal directed to :1
- Previous two steps repeated periodically
- Client with name :2 connects to dbus and invokes the method,
connects to Wakeup signal
- Server sends Wakeup signal to :2
- Client :2 receives Wakeup signal directed to :2
- Client :1 receives Wakeup signal directed to :2 - unexpected
- Previous three steps repeated periodically
- Client :2 disconnects
- Server sends Wakeup signal to :2, (true... it should detect nameowner
change from :2 to "", but following behaviour observed)
- Client :1 no longer receives signals directed to :2
This implies that dbus daemon is correctly handling disconnection of a
nameowner and not broadcasting more signals directed to that nameowner,
but in the earlier case where a signal changes its target, dbus is not
respecting the value of the new target nameid.
Or it implies we have used the dbus api incorrectly or made wrong
assumptions about the behaviour of the dbus daemon.
Tested in environments:
Rhel6:
dbus-1.4.6-3.nb5.0.4.x86_64 (upgraded from standard v1.2.24),
perl-Net-DBus-0.33.6-8.nb5.0.2.x86_64 (from EPEL6)
Fedora16:
dbus-1.4.10-3.fc16.x86_64,
perl-Net-DBus-0.33.6-10.fc16.x86_64
Tests scripts are attached.
Thanks
--
Nick Jones nick.jones at network-box.com
Senior Manager Core Development Team
Network Box Corporation Ltd
16th Floor, Metro Loft,
38 Kwai Hei Street, Tel: +852 2736 2083
Kwai Chung, Kowloon, Fax: +852 2736 2778
Hong Kong S.A.R. www.network-box.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example-signal-server.pl
Type: application/x-perl
Size: 1865 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20111230/a4e5d37f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example-signal-receiver.pl
Type: application/x-perl
Size: 660 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20111230/a4e5d37f/attachment-0001.bin>
More information about the dbus
mailing list