GNOME Bugzilla – Bug 692374
Unmanaged crash (SIGABRT) with libdbus 1.6.4 and gconf
Last modified: 2014-03-18 10:24:55 UTC
Hi Banshee crashes with libdbus >= 1.6.4. I've already reported this on Fedora's bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=867133 but I think here would get better attention. Sorry if this was already filed, couldn't find an appropiate duplicate. This seems to be related to this other bug with gconf: https://bugzilla.gnome.org/show_bug.cgi?id=683830 and this is also happening in other distros like arch: https://bugs.archlinux.org/task/32927 Ubuntu seems to have a patch but upstream (and debian) doesn't like it at all and they won't accept it. https://bugs.launchpad.net/ubuntu/+source/banshee/+bug/1048341 I can reproduce the crash almost always (check the fedora bugzilla bug report for a full stack trace). This bug makes banshee unusable and I personally don't like the idea of switching music player to something else. Thanks,
Created attachment 237463 [details] [review] banshee-avoid-dbus-race.patch According to reports, this patch fixes the problem in openSUSE. It needs a little work to be useful upstream - like a DllMap to not break it on Windows and MacOS. I'm not sure if I'm making the dbus_g_thread_init() call from the best place either.
*** Bug 695975 has been marked as a duplicate of this bug. ***
*** Bug 686141 has been marked as a duplicate of this bug. ***
Looks like the Banshee windows installer is shipping a libdbus-glib-1-2.dll which is what we should import in the code, and then use a dllmap to adjust it for other platforms. Attaching an updated patch.
Created attachment 240321 [details] [review] Avoid race when using GConf and DBus with threads GConf causes us to make indirect calls to libdbus from multiple threads, resulting in crashes if left uninitialized. As a workaround, we initialize dbus-glib for multithreading.
Comment on attachment 240321 [details] [review] Avoid race when using GConf and DBus with threads I've committed a modified version of that patch in git master and the stable-2.6 branch: https://git.gnome.org/browse/banshee/commit/?id=f9b90f3e The change is to only enable the workaround if dbus-glib is available, otherwise it would cause crashed on startup. Packagers: To have this fix enabled in distro packages, you should add a build dependency on dbus-glib (or rather its development package, if there is one).
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report. Please note the comment above: this fix requires dbus-glib to be enabled.
*** Bug 692920 has been marked as a duplicate of this bug. ***
*** Bug 688845 has been marked as a duplicate of this bug. ***
*** Bug 688034 has been marked as a duplicate of this bug. ***
*** Bug 688031 has been marked as a duplicate of this bug. ***
*** Bug 721582 has been marked as a duplicate of this bug. ***
(In reply to comment #6) > Packagers: > To have this fix enabled in distro packages, you should add a build dependency > on dbus-glib (or rather its development package, if there is one). Bertrand, given that some packagers have ignored this (i.e. openSUSE AFAIK, as my brother uses this distro and is telling me about crashes, and there's also other bug reports about this, AFAIR), how can we improve this situation? Cannot we "fail faster", throwing an exception at banshee startup if Banshee was not built properly with this dependency?
Created attachment 272022 [details] [review] Proposed subsequent patch (In reply to comment #13) > (In reply to comment #6) > > Packagers: > > To have this fix enabled in distro packages, you should add a build dependency > > on dbus-glib (or rather its development package, if there is one). > > Bertrand, given that some packagers have ignored this (i.e. openSUSE AFAIK, as > my brother uses this distro and is telling me about crashes, and there's also > other bug reports about this, AFAIR), how can we improve this situation? Cannot > we "fail faster", throwing an exception at banshee startup if Banshee was not > built properly with this dependency? I had not looked at Bertrand's patch before, so my question above was kind of dumb. Now that I looked at it, this is the proposed patch that would be equivalent to my suggestion. Ideally we would commit it to master just before the 2.9.1 release, then merge the gsettings work, and then revert this workaround altogether (backporting this patch to stable-2.6 would also be good in case we do a 2.6.3 in the future). Please let me know what you think! Thanks
Review of attachment 272022 [details] [review]: Thanks for the patch. Having a mandatory dbus-glib-1 dependency might be overkill for distros that have fixed the issue somewhere else in the stack, but I guess it won't be much of a problem for them. And looking at the number of duplicates, it looks like it would be worth it. So OK for me to commit it.
Comment on attachment 272022 [details] [review] Proposed subsequent patch Thanks Bertrand. This patch was lacking two things: - Removing another HAVE_DBUS_GLIB usage in configure.ac. - Detailing the new dependency on README and create-release-notes. So I addressed those two things above and committed. Now let's work on the 2.9.1 release \o/