UI deadlock when the fsrtp conference is freeed while in preroll
Submitted by Fabrice Bellet
I encounter sometimes a deadlock in the UI when the fs rtp session is freeed, when executing call_state_changed_cb() with TP_CALL_STATE_ENDED state. This happens when the pipeline is in preroll state, and one sink is waiting on the preroll condition.
when the tp_clear_object() function is invoked in this state, the fs_rtp_stream_dispose() function deadlocks on the stream_lock mutex of a pad previously locked on the path leading to the sink waiting on preroll. I attach a gdb trace showing this case.
The preroll condition should be signaled later when the whole pipeline is set to GST_STATE_NULL in empathy_call_window_reset_pipeline(), this is what happens in the second gdb trace provided. This second trace shows a working situation.
Setting stopping the pipeline earlier in on_call_state_changed_cb() seems to workaround the locking issue.