KDE 4.11 showstopper: KMix lockup for 20 seconds, and a concept for fixing it

Michael Pyne mpyne at kde.org
Thu Jul 11 02:12:40 BST 2013


On Thu, July 11, 2013 00:35:51 Christian Esken wrote:
> Here is some background information on what is happening:
> MPRIS2 is using DBUS. I finally I got the notion that doing DBUS
> requests is evil - at least ANY synchronous DBUS communication. I am
> pretty sure I am not the first with these problems, so if anybody has
> working code that shows how to do it I would be glad. Or review my
> concept code.

I can say (as the JuK dev ;) you're not the only one with the problem.

And you're right about the cause as well: sync calls going over the DBus 
causing deadlock (in JuK's case, deadlock with KStatusNotifierItem which uses 
DBus to communicate the other direction back to plasma-desktop).

MPRIS2 happens to be the proximate cause but this would happen again in any 
other situation where you have two processes sending sync messages to each 
other over DBus.

Unfortunately I have not been able to fix JuK's code fully yet to workaround 
the issue. The real fix is to use async design (and if at all possible do not 
block in your response to a DBus call, nor make a blocking call into the 
DBus). You can use Q_NOREPLY annotations for adapter objects, but solutions in 
general are much more difficult. And sometimes you can't control the code at 
all (e.g. KStatusNotifierItem).

Regards,
 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20130710/1ffe870c/attachment.sig>
-------------- next part --------------
_______________________________________________
kde-multimedia mailing list
kde-multimedia at kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia


More information about the kde-multimedia mailing list