GNOME Bugzilla – Bug 520894
rtpmanager rtcp thread shutdown deadlock
Last modified: 2008-03-11 11:36:16 UTC
Please describe the problem: As pointed out by a comment in the code there's a possible deadlock for the RTCP thread shutdown if the thread is blocked in a push. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 106742 [details] [review] rtpmanager_rtcp_thread_shutdown_fix Signal the RTCP thread to stop when going from PLAYING to PAUSED, wait for it to terminate when going from PAUSED to READY. Not sure if this is the correct fix.
it seems racy, a new thread could be started, which would clear the ->stop_thread flag and make the first thread continue as well. Not quite sure yet how to fix it.
Ahh, good point. Sounds like something that needs a bit of pondering / background processing.
Based on patch by: Ole André Vadla Ravnås <ole.andre.ravnas@tandberg.com> * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_init), (rtcp_thread), (start_rtcp_thread), (stop_rtcp_thread), (join_rtcp_thread), (gst_rtp_session_change_state): Avoid a deadlock when joining the RTCP thread in PAUSED because it might be blocked downstream. Also avoid spawning multiple rtcp threads. Fixes #520894.