segv with multithread client-server usi dbus glib binding

Olivier Andrieu oliv__a at users.sourceforge.net
Wed Jul 7 06:25:24 PDT 2004


 Johan FISCHER [Wed,  7 Jul 2004]:
 > Hi,
 > 
 > 
 > I'm still not sure about development progress of the Dbus lib with the
 > multithread (anyway, the segv even occurs if I disable the multithread calls).
 > 
 > so my questions are in this order:
 > - Is the dbus library working with multi-thread enable and the glib binding ?
 > - Could you have a quick look at the source codes (server.c and client.c) and
 > tell me if there is an obvious error I didn't see ?
 > - Could you have a quick look at the dbus output (output of the server binary
 > with DBUS_VERBOSE=1) and the gdb output (Two different files with the same
 > script).

The gdb stackstrace shows the segv occurs in malloc: that can happen
in case of a double free, eg when you do an _unref on some object that
already has reached zero refcount. Indeed in server.c:74, you're
unreffing the message in the message handler, you shouldn't do that.

-- 
   Olivier



More information about the dbus mailing list