Connection drops

Havoc Pennington hp at pobox.com
Sat Jul 26 07:35:56 PDT 2008


Hi,

On Sat, Jul 26, 2008 at 9:01 AM, João Valverde <backup95 at netcabo.pt> wrote:
> I'm getting random disconnects from D-Bus. What I mean is my process
> works fine broadcasting signals but after a while (some hours usually),
> with increasing likelihood, it gets silently dropped from the daemon for
> no apparent reason.

Most likely you are sending not-well-formed data; the most common
reason is sending invalid UTF-8 as a DBUS_TYPE_STRING. Another
possible problem is invalid object paths or interface names.

See:
https://bugs.freedesktop.org/show_bug.cgi?id=16338#c1
http://lists.freedesktop.org/archives/dbus/2007-November/008975.html

The fix described in the list archives above would be good, also more
_dbus_return_if_fail() could be added to try to catch this stuff.
Though UTF-8 validating all strings is expensive, it could be worth
it.

> Is this normal or a bug in my code? Should I expect rock solid
> connectivity or just try work around any (inevitable?) errors and
> reconnect to dbus-daemon?

For a local (non-TCP / unix domain socket) dbus connection, there is
no reason the connection should ever drop unless there is a bug in
something. In fact most apps just exit if the dbus connection drops.

Havoc


More information about the dbus mailing list