D-Bus threading issues

There are some annoying issues and crashes in KDE 4 (and particularly in KRunner and Nepomuk) that are related to the thread-safety (or, rather, thread-non-safety) of libdbus-1.  kde-core-devel has seen some discussion about this recently.

There is a patch that fixes the issue, but it won’t make it into D-Bus before dbus-1.4, due to the fact that it changes the library behaviour and could potentially break bindings.  Thiago has confirmed that the change doesn’t break the Qt bindings, and (from the bug report), no-one has found any other bindings it breaks.

This is all just background on why, if you are running Arch Linux, you might want to check out the dbus-core-mt package on the AUR.  It’s dbus-core-1.2.24, as found in core, but with the afformentioned patch applied.  Note, however, that you use it at your own risk – it should improve KDE, but it may well break other stuff.


11 Responses to “D-Bus threading issues”

  1. Tomaz Says:

    thank you. I’m trying Qt 4.7 + KDE 4.5 and all the breakage was getting on my nerves =)

  2. Alejandro Nova Says:

    The inclusion of this fix in EVERY DISTRO is vital to the success of KDE 4.5. Without this, all those crashes with KRunner, Konqueror, Amarok, and a lot of KDE software will continue to leave a bad taste in people’s mouths until the introduction of DBus 1.4, that could be well past 2011. So it’s time for campaign and pressure. The things that could break, from the preliminar sight given by the upstream bug, are almost nil, and the damage that KDE is experiencing NOW from this bug is great.

  3. Seli Says:

    So is this relevant only for 4.5 or also for 4.4?

  4. randomguy3 Says:

    @Seli: any KDE version, although 4.5 seems particularly badly affected.

  5. Alejandro Nova Says:

    Thanks to Rex Dieter, as always ;), I could test this, and this patch has a lot of side effects indeed… of the desired kind :).

    Without it, dbus-daemon spiked up to 61% of CPU usage when I wanted to use Nepomuk features. Now, it is always in a solid 1%. Because of this, Nepomuk usage is A LOT FASTER on my laptop. Thank you, everyone involved! Now, let’s get this one into every distro!

    • Alejandro Nova Says:

      Reply to myself. Can anybody check Phonon? Phonon seems to be, in my system, what’s suffering a lot of pain coming from this update. With every backend out there, 2 different machines, and this DBus update installed, sound stutters like hell. The final outcome depends on the stutter-resistance of the backend (phonon-vlc is the most resistant, phonon-gstreamer loses timing badly). This is Phonon-only, GNOME apps (Totem and the like) are not affected.

      • randomguy3 Says:

        Interesting. I have no problems with audio, but Phonon also claims not be using any backend at all (and says that there are no backends available), which can’t be right. I don’t have phonon-vlc at all, so I’m either using phonon-xine or phonon-gstreamer.

  6. Alejandro Nova Says:

    Where can I send my backtraces in case something crashes? I can’t report crashes to main BTSs, because they will be closed as invalid because of this experimental patch.

    • randomguy3 Says:

      Well, if the backtrace doesn’t involve libdbus at all, then it should be fine, because whatever caused the crash probably isn’t affected by the patch at all.

      If the backtrace appears to be caused by the patch, you should leave a comment on the DBus bug I linked to, since it’s relevant to that.

      If you want help figuring out whether a particular crash is related to the patch, you probably want to grab someone knowledgeable on IRC.

  7. KDE: Week 23 « My KDE week Says:

    […] SC 4.4.3 will not be patched to fix a dbus issue that makes nepomuk crash because 4.4 is supposedly not affected that much and nepomuk is off by […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: