[Bug 761912] New: gstpad: Fix race between gst_element_remove_pad and state change

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Feb 12 10:24:15 UTC 2016


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

            Bug ID: 761912
           Summary: gstpad: Fix race between gst_element_remove_pad and
                    state change
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: All
            Status: NEW
          Severity: critical
          Priority: Normal
         Component: gstreamer (core)
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: havard.graff at gmail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
                CC: gstreamer at pexip.com
     GNOME version: ---

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

When going from READY to NULL all element pads are deactivated. If
simultaneously the pad is being removed from the element with
gst_element_remove_pad() and the pad is unparented, there is a race
where the deactivation will assert (g_critical) if the parent is lost at
the wrong time.

The proposed fix will check parent only once and retain it to avoid the
race.

The patch does not have a separate test, as the existing funnel-stress test
will provoke this eventually, specially if a sleep is added in the code before
getting the parent. It is in other words a very rare unlikely race, but a real
one nevertheless.

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