[Bug 785124] New: basesrc: Deadlock on EOS since 523de1a9dc7b7f79c78120bed15c364336f067cb

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Jul 19 13:17:21 UTC 2017


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

            Bug ID: 785124
           Summary: basesrc: Deadlock on EOS since
                    523de1a9dc7b7f79c78120bed15c364336f067cb
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: vivia at ahiru.eu
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

I get the following backtrace on EOS:

Thread 4 (Thread 0x7fee2a68f700 (LWP 14167)):
#0  0x00007fee31dc8f5c in __lll_lock_wait () at
../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1  0x00007fee31dc2c06 in __GI___pthread_mutex_lock (mutex=0x7fee24053800) at
../nptl/pthread_mutex_lock.c:115
#2  0x00007fee345e60b1 in gst_base_src_send_event (element=<optimized out>,
event=0x7feda4003a00)
    at gstbasesrc.c:1852
#3  0x00007fee34cd0069 in gst_element_send_event
(element=element at entry=0x7fee24091900 [GstPulseSrc],
event=event at entry=0x7feda4003a00) at gstelement.c:1656
#4  0x00007fee34caf2a4 in gst_bin_send_event (element=0x7fee2403a430 [],
event=0x7feda4003a00)
    at gstbin.c:3141
#5  0x00007fee34cd0069 in gst_element_send_event (element=0x7fee2403a430 [],
event=0x7feda4003a00)
    at gstelement.c:1656
#6  0x000055abfb9f4e3e in _send_eos (self=0x7fee2403a430 [])

523de1a9dc7b7f79c78120bed15c364336f067cb is the first bad commit
commit 523de1a9dc7b7f79c78120bed15c364336f067cb
Author: Nicolas Dufresne <nicolas.dufresne at collabora.com>
Date:   Thu Jun 1 10:36:26 2017 -0400

    basesrc: Don't hold LIVE_LOCK in create/alloc/fill

    Holding this lock on live source prevents the source from changing
    the caps in ::create() without risking a deadlock. This has consequences
    as the LIVE_LOCK was replacing the STREAM_LOCK in many situation. As a
    side effect:

    - We no longer need to unlock when doing play/pause as the LIVE_LOCK
      isn't held. We then let the create() call finish, but will block if
      the state have changed meanwhile. This has the benefit that
      wait_preroll() calls in subclass is no longer needed.
    - We no longer need to change the state to unlock, simplifying the
      set_flushing() interface
    - We need different handling for EOS depending if we are in push or pull
      mode.

    This patch also document the locking of each private class member and
    the locking order.

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

Reverting commits 523de1a9dc7b7f79c78120bed15c364336f067cb ,
2be51ba60ce718b6febf5c1bd40ca761c17bfb80 and
dd5905c31a3b385cd4ee51141fccb072e04e8239 fixes the issue.

Haven't yet found a way to reproduce it with upstream-only stuff - if something
turns up I'll let you know!

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