Insufficient debug output to check thread locking
In order to verify the implementation and relationship of locks to each other in the dbus source code, it is necessary to be able to see the locking and unlocking of mutex in all places.
The dbus source code includes support for debugging thread related locks, but currently either
- does not capture all calls to lock and unlock a mutex (e.g.: dbus/dbus-connection.c, dbus/dbus-pending-call.c)
- has no uniquely identifiable output (dbus/dbus-connection.c, dbus/dbus-server.c) or
- does not generate any output at all (dbus/dbus-resources.c)
In this context, it is also a problem that the debug output must be activated in several independent places, which can easily be overlooked, thus producing incomplete debug output that obscures the true context and wastes unnecessary time in finding thread-related problems.