Products › lamco-dbus-tools › Interfaces

org.freedesktop.DBus.Debug.Stats: A D-Bus bus's own counters

org.freedesktop.DBus.Debug.Stats gives a D-Bus bus's own counters, GetStats and GetConnectionStats, which lamco-dbus-tools polls for a stopped reader.

D-Bus interface org.freedesktop.DBus.Debug.Stats

org.freedesktop.DBus.Debug.Stats is an optional interface of the bus itself that reports the bus's own counters: How many connections and match rules it holds, and for each connection how many messages and bytes are queued to it and from it. It's the one place the bus says a program has stopped reading what's sent to it, before that program makes its senders stall or get cut off. lamco-dbus-tools polls it and turns a queue that keeps growing into a finding.

What it is

The specification defines the interface on /org/freedesktop/DBus with three methods:

  • GetStats returns a dictionary about the bus itself: ActiveConnections, IncompleteConnections, MatchRules and PeakMatchRules, BusNames and PeakBusNames, and the per-connection peaks. Other keys are the implementation's own.
  • GetConnectionStats takes a unique or well-known name and returns that connection's counters: IncomingMessages, IncomingBytes and IncomingFDs for what the bus has received from it and not yet dispatched, OutgoingMessages, OutgoingBytes and OutgoingFDs for what the bus holds waiting to be delivered to it, and peaks of each.
  • GetAllMatchRules lists every connection's match rules, keyed by unique name.

In dbus-daemon the interface is chosen at build time. The specification says that on the system bus, or any bus serving more than one user, access should normally be kept to administrators, though configuration can open it.

The two implementations answer it differently, as the repository's measurements found. dbus-daemon answers GetConnectionStats one connection at a time, and gives a lifetime peak for each. dbus-broker refuses GetConnectionStats as unimplemented, and its GetStats lists every peer's accounting in one answer instead. dbus-daemon answers GetAllMatchRules, and dbus-broker refuses it. A bus can refuse the whole interface, and the toolkit records the refusal by its error name.

A growing outgoing queue is the signal. A program that stops reading makes the bus hold what's sent to it, and past the bus's limit for one connection, the bus stalls the program's senders or cuts them off. A monitor gives up its unique name, so the counters can't name one.

How lamco-dbus-tools reads it

dbussee stats polls the counters and shows, for each connection, the bytes the bus held for it to read: The most at any poll, at the last, and on dbus-daemon the most ever since it joined. dbussee record --stats polls them during a recording, on the snapshot's connection. dbussee bus asks for the statistics once and records a refusal with its error name. dbusdo doesn't touch the interface. dbustell findings raises NAME-005 when a connection held 1 MiB or more at a poll, or 64 KiB or more and growing at every poll over three or more. The lifetime peak dbus-daemon counts isn't used for it.

dbussee stats                                      # one poll: What each connection has waiting
dbussee stats --count 10 --every 0.5 --out q.json  # ten polls, half a second apart, kept as a capture
dbussee record --all --stats 1 --duration 60 --out rec.json   # poll every second while recording
dbustell findings rec.json                         # NAME-005 for a connection that isn't reading

Where it has been run

The README's run record lists a stopped reader found as NAME-005 on private buses with dbus-daemon 1.16.2 and dbus-broker 37, part of the run of service starts and the activation lens on 2026-11-29 and 2026-11-30. The dbussee check runs on real desktops of 2026-11-28 asked each bus for its statistics among their questions, on dbus-daemon 1.16.2 and 1.14.10 and on dbus-broker 37. Other releases aren't recorded either way.

Findings

  • NAME-005: A connection isn't reading what's sent to it.

Related