[Bug 773532] New: The segfault happens when many clients work with rtsp server with GST_RTSP_LOWER_TRANS_TCP option on.

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Oct 26 11:28:29 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=773532

            Bug ID: 773532
           Summary: The segfault happens when many clients work with rtsp
                    server with GST_RTSP_LOWER_TRANS_TCP option on.
    Classification: Platform
           Product: GStreamer
           Version: 1.8.2
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-rtsp-server
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: vasilchukkseniia at gmail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Created attachment 338506
  --> https://bugzilla.gnome.org/attachment.cgi?id=338506&action=edit
stacktrace

I've added a stacktrace of segfault in attachment. 
As you can see from it, the segfault happens inside "do_send_data" function
mutex lock, and "do_send_data" function calls from
"gst_rtsp_stream_transport_send_rtp" function.

So the reason of segfault is that GstRTSPClient finalizing happens before or in
the time of "do_send_data" work. So "do_send_data" uses already destroyed
client mutex.

I've made a patch to fix that problem. Please review it.

P.S. To reproduce this bug I took rtsp server from examples (test-readme.c) and
add next line to it:
 gst_rtsp_media_factory_set_protocols (factory, GST_RTSP_LOWER_TRANS_TCP);
Then I used many clients that were connected/disconnected simultaneously. Also
I added sleep(1) inside "gst_rtsp_stream_transport_send_rtp" to reproduce it
more often.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list