[gstreamer-bugs] [Bug 574293] New: [decodebin2] deadlock on shutdown

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Thu Mar 5 10:32:25 PST 2009


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=574293

  GStreamer | gst-plugins-base | Ver: git
           Summary: [decodebin2] deadlock on shutdown
           Product: GStreamer
           Version: git
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: manauw at skynet.be
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


Consider a decodebin2 (e.g. in playbin2 pipeline) that is set to PAUSED, and
(about) immediately upon return from set_state set to READY, then a race occurs
between the (mainloop) thread trying to shutdown to READY, and streaming thread
callbacks building the bin, which may result in a deadlock.

Specifically, consider decodebin2 plugging a typical demuxer that exposes 1
video and 1 audio pad.  Streaming thread(s) plug more elements, set up a
decodegroup, decodepads, and pad blocks on (unexposed) ghostpads.  Consider
streaming has reached the stage where 1 pad has blocked.

At this point, the mainloop (performing a shutdown to READY) sets the most
downstream element whose corresponding src pad has not yet blocked to READY.
Then it sets the other most downstream element to READY, and tries to grab the
STREAM_LOCK.  This blocks, as this thread in question is in a pad block.  Since
the other downstream element is now flushing, the other ghostpad will never
block, so the decodegroup will not be exposed (part of which unblocks the
pads).

Since the blocked pads are ghostpads, core will not unblock them either as part
of any element's state change.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=574293.




More information about the Gstreamer-bugs mailing list