D-Bus replies exceeded

Simon McVittie smcv at collabora.com
Mon Apr 4 18:48:52 UTC 2022


On Mon, 04 Apr 2022 at 16:43:05 +0000, Foss, Neil wrote:
> If an application misbehaves and fails to send an expected D-Bus reply to a
> message then eventually the dbus-daemon returns the following error to requests
> 
> org.freedesktop.DBus.Error.LimitsExceeded "The maximum number of pending
> replies per connection has been reached"
> 
> There's a bug in the receiving application but how can I make the caller
> tolerant of not receiving a reply?

You can make the caller recognise the
org.freedesktop.DBus.Error.LimitsExceeded error name as not necessarily
being not its fault, and stop trying to communicate with that recipient?

Or, if you don't want a reply and don't care whether the recipient is
receiving your messages or not, you can set the "no reply expected"
flag on the messages you send. The way you do that varies between
implementations. In libdbus (the low-level reference implementation),
use dbus_message_set_no_reply(), and send the message with
dbus_connection_send() instead of one of the functions that expects a
reply. In GDBus, use an async call function like g_dbus_connection_call(),
g_dbus_proxy_call() or my_generated_code_call_foobar(), and pass in
a NULL GAsyncReadyCallback. Other high-quality D-Bus client libraries
should have some vaguely equivalent mechanism, but the exact details will
differ.

    smcv


More information about the dbus mailing list