The Desktop Bus Death Rattle

The Desktop Bus Death Rattle is when, mysteriously, a whole bunch of seemingly unrelated server processes on one's system are sitting there all consuming CPU time, even though their services are not being used.

It is caused by the way that the Desktop Bus works.

When a server starts up and registers with the Desktop Bus broker, all of the other servers connected to the broker are sent a message indicating that a new "name" has appeared on the bus. Similarly, when a server unregisters or disconnects from the Desktop Bus broker, all of the other services are sent a message indicating that the "name" has vanished from the bus. These messages cause the server processes attached to the bus to wake up and consume a little CPU time, even if it is only to work out that they are not interested in the information.

A consequence of this design is that if you have a server that is being continually restarted, because it is starting then failing, causing a process supervisor to auto-restart it, all of the other servers processes attached to that bus vibrate in sympathy. The start/stop of the failing server is amplified by however many server processes are attached to the bus.

Some things may look like the Desktop Bus Death Rattle, but they actually are not. If it is only one server process consuming CPU time, then it's not the Death Rattle. The PolicyKit dæmon, for example, is known to poll incessantly for the presence of the ConsoleKit dæmon's runtime directory every few seconds. This is not the Death Rattle, merely bad server implementation, where it should be using kevent() or similar to wait without polling for the creation of the directory alongside the other events that it waits for.

© Copyright 2016 Jonathan de Boyne Pollard. "Moral" rights asserted.
Permission is hereby granted to copy and to distribute this web page in its original, unmodified form as long as its last modification datestamp is preserved.