max_outgoing_bytes: What if a D-Bus peer is too slow to read?
Alban Crequy
alban.crequy at collabora.co.uk
Thu Sep 30 11:49:45 PDT 2010
Hi,
What happens when a process does not read its incoming D-Bus messages on
the socket and other D-Bus peers keep sending messages to it?
With the default configuration on the session bus, dbus-daemon's memory
usage is growing and the limit is really high:
<limit name="max_incoming_bytes">1000000000</limit>
<limit name="max_outgoing_bytes">1000000000</limit>
I tried to reduce the limit to a small value, and then I notice that
dbus-daemon's memory usage does not grow anymore, and it seems to drop
the messages. When I strace dbus-daemon, it reads the messages from the
peers but does not send the messages to the recipient.
dbus/dbus-transport.c:
DBusDispatchStatus
_dbus_transport_get_dispatch_status (DBusTransport *transport)
{
if (_dbus_counter_get_size_value (transport->live_messages) >= transport->max_live_messages_size ||
_dbus_counter_get_unix_fd_value (transport->live_messages) >= transport->max_live_messages_unix_fds)
return DBUS_DISPATCH_COMPLETE; /* complete for now */
Is it the function where the messages are dropped?
Alban
More information about the dbus
mailing list