thread locking

Joe Shaw joeshaw at novell.com
Mon Feb 14 14:38:58 PST 2005


Hi,

On Sun, 2005-02-13 at 15:31 -0500, Havoc Pennington wrote:
> I've been trying to make threaded usage really work; I'm not an expert
> here, but I think it's a little bit better.

I am running into a deadlock.  The log (with a little more debug info)
is:

25104: dbus_connection_dispatch
25104:   LOCK: dbus_connection_dispatch
25104:   UNLOCK: _dbus_connection_acquire_dispatch
25104: _dbus_connection_acquire_dispatch locking dispatch_mutex
25104: _dbus_connection_acquire_dispatch unlocking dispatch_mutex
25104:   LOCK: _dbus_connection_acquire_dispatch
25104: Message 0xa75dc10 (4 /com/novell/BeagleIndexHelper/Index/FileSystemIndex com.novell.BeagleIndexHelper.Indexer FlushCompleteEvent '') removed from incoming queue 0x843bde8, 0 incoming
25104:  dispatching message 0xa75dc10 (4 com.novell.BeagleIndexHelper.Indexer FlushCompleteEvent '')
25104:   UNLOCK: dbus_connection_dispatch
25104:   running filter on message 0xa75dc10
25104:   finished running filter
25104:   running filter on message 0xa75dc10
25104:   LOCK: dbus_connection_send
[ ... ]
25104:   LOCK: _dbus_connection_block_for_reply
25104: dbus_connection_send_with_reply_and_block(): will block 25000 milliseconds for reply serial 13 from 1108420288 sec 882279 usec to 1108420313 sec 882279 usec
25104:   UNLOCK: _dbus_connection_acquire_dispatch
25104: _dbus_connection_acquire_dispatch locking dispatch_mutex
25104: _dbus_connection_acquire_dispatch waiting for dispatch to be acquirable

Evidently the callback from one of the filters on this message is
sending its own message.  This is causing
_dbus_connection_acquire_dispatch() to be called again later without
having released the lock earlier.

Joe



More information about the dbus mailing list