After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 520894 - rtpmanager rtcp thread shutdown deadlock
rtpmanager rtcp thread shutdown deadlock
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-07 01:31 UTC by Ole André Vadla Ravnås
Modified: 2008-03-11 11:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rtpmanager_rtcp_thread_shutdown_fix (1.13 KB, patch)
2008-03-07 01:35 UTC, Ole André Vadla Ravnås
none Details | Review

Description Ole André Vadla Ravnås 2008-03-07 01:31:00 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:
Comment 1 Ole André Vadla Ravnås 2008-03-07 01:35:16 UTC
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.
Comment 2 Wim Taymans 2008-03-07 16:44:29 UTC
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.
Comment 3 Ole André Vadla Ravnås 2008-03-07 17:03:38 UTC
Ahh, good point. Sounds like something that needs a bit of pondering / background processing.
Comment 4 Wim Taymans 2008-03-11 11:36:16 UTC
        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.