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 737631 - gst-rtsp-server deadlock while sending response over TCP
gst-rtsp-server deadlock while sending response over TCP
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
git master
Other All
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-29 23:34 UTC by Sebastian Rasmussen
Modified: 2014-09-30 11:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
P (4.48 KB, patch)
2014-09-29 23:38 UTC, Sebastian Rasmussen
committed Details | Review

Description Sebastian Rasmussen 2014-09-29 23:34:54 UTC
We have discovered another deadlock in gst-rtsp-server when streaming over TCP. The deadlock occurs when the backlog is full and the appsink element is attempting to send data resulting the streaming thread blocking while holding the send lock. At the same time the RTSP client thread is receving a request requring a response, which can not be sent successfully because the send lock is already taken. In this situation the backlog can never be emptied because it is the same thread receving RTSP requests that is already blocked sending the response (since both sources are attached to the same mainloop).

This has previously been discussed at #gstreamer with wtay.
Comment 1 Sebastian Rasmussen 2014-09-29 23:38:58 UTC
Created attachment 287408 [details] [review]
P
Comment 2 Wim Taymans 2014-09-30 11:05:38 UTC
commit 404a80e38a508c13a9e9b7f9b1da70f3ccb2a77b
Author: Sebastian Rasmussen <sebrn@axis.com>
Date:   Tue Sep 30 01:35:02 2014 +0200

    rtsp-client: Remove backlog limit while processings requests
    
    If the backlog limit is kept two cases of deadlocks may be
    encountered when streaming over TCP. Without the backlog
    limit this deadlocks can not happen, at the expence of
    memory usage.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=737631