[Bug 65296] New: Gabble should initialize libdbus for thread-safety

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jun 3 04:55:34 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=65296

          Priority: medium
            Bug ID: 65296
          Keywords: patch
          Assignee: simon.mcvittie at collabora.co.uk
           Summary: Gabble should initialize libdbus for thread-safety
        QA Contact: telepathy-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: simon.mcvittie at collabora.co.uk
          Hardware: Other
            Status: ASSIGNED
           Version: unspecified
         Component: gabble
           Product: Telepathy

Created attachment 80220
  --> https://bugs.freedesktop.org/attachment.cgi?id=80220&action=edit
[Gabble] Initialize libdbus for thread-safety

libdbus is not thread-safe by default. This is a long-standing design
flaw (<https://bugs.freedesktop.org/show_bug.cgi?id=54972>).

We call into GIO, which calls into glib-networking, which can
(at least in recent versions) invoke libproxy in a thread. libproxy
apparently has a Network-Manager plugin, which uses libdbus in that
thread; meanwhile, we use libdbus in the main thread and everything
goes badly for us.

(It's possible that this crash is only reproducible with broken
connectivity: I wrote this patch on a train, with intermittent
mobile broadband coverage.)

In libdbus < 1.7.4, libraries cannot safely initialize libdbus for
multi-threading, because that initialization is not itself
thread-safe (!); in particular, glib-networking cannot safely initialize
libdbus. So, we have to do it.

I have written patches to make libdbus thread-safe-by-default, but
they haven't all been reviewed and merged yet, and in any case they
won't be in a stable libdbus until 1.8. Until then, each application
has to discover and fix this bug individually.

---

The rest of the CMs should do this too - either they use GIO now, or they
should eventually.

One day, Bug #54972 will make this silly dance unnecessary. Reviews over there
would be extremely welcome.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the telepathy-bugs mailing list