[libnice] multithread g_main_loop_quit ad remove agent

Emanuele Bizzarri emabiz76 at gmail.com
Sun Jul 13 23:42:21 PDT 2014

Hi all,
thank you for your responses.
I've made some tests and a stress tool in order to understand where the
problem is.
I've followed your suggestions but the crash still happens.
It is not simple produce a backtrace. I'm searching a way to get more logs.

Now I'm using the revision c2ccb1634542f7d9c2a87aa46af027e6df386dd8,
because it seems the more stable on windows os (I've opened another
thread about this).
I've compared the code with version 0.1.7. I see that the code is
similar but different.
In both cases the receive callback is not protected by the mutex.
/* Unlock the agent before calling the callback */
      callback (agent, sid, cid, len, buf, data);

Why do you make this choice?
In my case I have to destroy user_data (the last param of the callback)
from my thread (T2), while the callback is running by a dedicated thread T1.
But it seems technically possible that data can be destroyed when T1 is
inside the callback.
Is it possible to keep agent locked during the callback, or it can
produce deadlock or other undesired effect?

Thank you,


More information about the nice mailing list