2 race conditions in dbus-glib in multi-thread environment.

Colin Walters walters at verbum.org
Mon Jul 6 08:53:43 PDT 2009


On Sun, Jun 28, 2009 at 4:23 AM, Wu, Jackie<jackie.wu at intel.com> wrote:
> Hi, Everyone:
>
> I recently played with dbus-glib in multi-thread environment and found
> following 2 race conditions in dbus-glib. I didn't find them in dbus mailing
> list archives so put here for you review and hope get some suggestions to
> solve them.
> I'm new in dbus, glib and dbus-glib programming so please correct me in case
> any misunderstanding. Thanks!

Well, I see two layers to this problem.  First, we need to make sure
libdbus is threadsafe.  This is:
https://bugs.freedesktop.org/show_bug.cgi?id=857

We can't really design thread safety in dbus-glib until libdbus is
thread safe, because I'm pretty sure that we'll have to declare some
functions such as dbus_connection_send_with_reply unsafe for use by
non-mainloop threads, and that impacts what parts of the dbus-glib
wrapping API are thread safe.


More information about the dbus mailing list