dbus deadlock

Thiago Macieira thiago at kde.org
Mon Jan 15 10:48:13 PST 2007


frederic heem wrote:
>Hi,
>An application using QtDbus stopped working today, it prints the
> following message and hangs
>QMutex::lock: Deadlock detected in thread -1208973632
>At the stage of initializing D-Bus, the application doesn't use thread
> so what a surprise to see a thread related bug in a single thread
> application Actually, the qt message seems to be wrong, it is not a
> dead lock but an error related a non recursive mutex that is lock 2
> times by the same thread. 

Technically speaking, it is a deadlock, since the thread is waiting for an 
unlock that will never happen.

But that's beside the point.

From your backtrace:

>#6  0x00f33666 in _dbus_mutex_lock (mutex=0x9702dc8) at
> dbus-threads.c:150 #7  0x00f13794 in
> _dbus_bus_notify_shared_connection_disconnected_unlocked
> (connection=0x96c5420) at dbus-bus.c:353
>#8  0x00f18628 in _dbus_connection_get_dispatch_status_unlocked
>(connection=0x96c5420) at dbus-connection.c:3788
>#9  0x00f19fb8 in _dbus_connection_flush_unlocked (connection=0x96c5420)
> at dbus-connection.c:3239
[snip]
>#14 0x00f13cfc in internal_bus_get (type=DBUS_BUS_SYSTEM, private=1,
>error=0x96a6bac) at dbus-bus.c:445

This seems that the socket closed while trying to connect. Is there 
anything specific we can do to try and reproduce the problem?

QtDBus, as released, has a thread problem: it calls dbus_init_threads 
without recursive mutex functions, but at the same time says it has all 
functions (DBUS_THREAD_FUNCTIONS_ALL_MASK). In my development version, I 
have already corrected the issue, so I'd like to test your circumstances.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20070115/c880bf05/attachment.pgp


More information about the dbus mailing list