Re: SIGTRAP when sending signal on closing dbus connection
Ignacio Casal Quinteiro <[email protected]> Tue, 16 Jun 2015 12:28:21 +0200
| Newsgroups | gmane.comp.gnome.devel,gmane.comp.gnome.gtk+.devel.general |
|---|---|
| Message-ID | <CAPtp-N_JXUahthydHnctF+6s9+05XNiHKTWdkSLgP2f13e98Rw@mail.gmail.com> |
--===============2243860814704172628== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============2243860814704172628== Content-Type: multipart/alternative; boundary=047d7beb98aa9202f90518a0082a --047d7beb98aa9202f90518a0082a Content-Type: text/plain; charset=UTF-8 Hi Jean-Pierre, you should not be using the same object from different threads, instead you should probably idle to the main thread and to the signal from there. Cheers. Adding you to the gtk mailing list btw. On Tue, Jun 16, 2015 at 12:14 PM, < [email protected]> wrote: > > > Hi *, > > in a multi threaded application we are receiving a SIGTRAP, while using > gdbus. > In short terms, the application is doing the following: > > Thread 1: g_object_unref(connection); > Thread 2: g_dbus_connection_emit_signal(connection); > > The SIGTRAP is raised when a "pthread_mutex_trylock" fails, in the > callstack of > "g_dbus_connection_emit_signal", because the mutex already is invalid. I > assumed > that gdbus is thread safe at this point. Is this assumption wrong or is > there really > a bug? > > In case more details are requried, please let me know. I can easily > reproduce the > issue at my place and already implemented a small test executable. > > Best regards > Jean-Pierre > _______________________________________________ > gnome-devel-list mailing list > [email protected] > https://mail.gnome.org/mailman/listinfo/gnome-devel-list > > -- Ignacio Casal Quinteiro --047d7beb98aa9202f90518a0082a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div><div><div>Hi Jean-Pierre,<br><br></div>you should not= be using the same object from different threads, instead you should probab= ly idle to the main thread and to the signal from there.<br><br></div>Cheer= s.<br><br></div>Adding you to the gtk mailing list btw.<br></div><div class= =3D"gmail_extra"><br><div class=3D"gmail_quote">On Tue, Jun 16, 2015 at 12:= 14 PM, <span dir=3D"ltr"><<a href=3D"mailto:Jean-Pierre.Bogler@continen= tal-corporation.com" target=3D"_blank">Jean-Pierre.Bogler@continental-corpo= ration.com</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style= =3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br> <br><tt><font size=3D"2">Hi *,</font></tt> <br> <br><tt><font size=3D"2">in a multi threaded application we are receiving a SIGTRAP, while using gdbus. </font></tt> <br><tt><font size=3D"2">In short terms, the application is doing the follo= wing:</font></tt> <br> <br><tt><font size=3D"2">Thread 1: g_object_unref(connection);</font></tt> <br><tt><font size=3D"2">Thread 2: g_dbus_connection_emit_signal(connection= );</font></tt> <br> <br><tt><font size=3D"2">The SIGTRAP is raised when a "pthread_mutex_t= rylock" fails, in the callstack of </font></tt> <br><tt><font size=3D"2">"g_dbus_connection_emit_signal", because the mutex already is invalid. I assumed </font></tt> <br><tt><font size=3D"2">that gdbus is thread safe at this point. Is this a= ssumption wrong or is there really </font></tt> <br><tt><font size=3D"2">a bug?</font></tt> <br> <br><tt><font size=3D"2">In case more details are requried, please let me k= now. I can easily reproduce the </font></tt> <br><tt><font size=3D"2">issue at my place and already implemented a small test executable.</font></tt> <br> <br><tt><font size=3D"2">Best regards</font></tt> <br><tt><font size=3D"2">Jean-Pierre</font></tt><br>_______________________= ________________________<br> gnome-devel-list mailing list<br> <a href=3D"mailto:[email protected]">[email protected]</a= ><br> <a href=3D"https://mail.gnome.org/mailman/listinfo/gnome-devel-list" rel=3D= "noreferrer" target=3D"_blank">https://mail.gnome.org/mailman/listinfo/gnom= e-devel-list</a><br> <br></blockquote></div><br><br clear=3D"all"><br>-- <br><div class=3D"gmail= _signature">Ignacio Casal Quinteiro</div> </div> --047d7beb98aa9202f90518a0082a-- --===============2243860814704172628== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ gnome-devel-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/gnome-devel-list --===============2243860814704172628==--