segv with multithread client-server usi dbus glib binding

Johan FISCHER linux at fischaz.com
Wed Jul 7 07:25:33 PDT 2004


Thx a lot !!!!!

So if i understand, the only messages which have to be unref are the message
created in my program by dbus_message_new...

The message passed in param by a filter function are freed by the dbus lib
itself right ?

Just to be sure, the return message of a
dbus_connection_send_with_reply_and_block can be unref or not ?

Thx a lot anyway.
Johan.



Quoting Olivier Andrieu <oliv__a at users.sourceforge.net>:

>  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



Johan.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the dbus mailing list