[Bug 766063] New: basesrc: deadlock between src_loop and set_playing

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri May 6 14:02:45 UTC 2016


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

            Bug ID: 766063
           Summary: basesrc: deadlock between src_loop and set_playing
    Classification: Platform
           Product: GStreamer
           Version: 1.8.2
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: mparisdiaz at gmail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

I have found a deadlock (with live_lock) in GstBaseSrc for NiceSrc instances.

We have 2 threads:
 thread_loop: where gst_base_src_loop task runs.
 thread_app: performs the state change of the pipeline.

The deadlock takes places with this race condition:
  1 - [thread_loop] gst_base_src_get_range is locked waiting for buffers in
bclass->create [1] (with live_lock locked [2]).
  2 - [thread_app] bclass->create is released in gst_base_src_set_playing by
bclass->unlock [3].
  3 - [thread_loop] locks live_lock again [2] and is blocked by bclass->create
[1].
  4 - [thread_app] tries to lock live_lock [4], but it is already locked by
[thread_loop].
  5 - thread_loop] bclass->create [1] never returns.

Refs
[1]
https://github.com/Kurento/gstreamer/blob/0fb3a083ce04551fbdba7a94f0ac5612515bda67/libs/gst/base/gstbasesrc.c#L2460
[2]
https://github.com/Kurento/gstreamer/blob/0fb3a083ce04551fbdba7a94f0ac5612515bda67/libs/gst/base/gstbasesrc.c#L2709
[3]
https://github.com/Kurento/gstreamer/blob/0fb3a083ce04551fbdba7a94f0ac5612515bda67/libs/gst/base/gstbasesrc.c#L3646
[4]
https://github.com/Kurento/gstreamer/blob/0fb3a083ce04551fbdba7a94f0ac5612515bda67/libs/gst/base/gstbasesrc.c#L3653

-- 
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