After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728345 - queue2: recent patch to avoid deadlock deadlocks
queue2: recent patch to avoid deadlock deadlocks
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-16 14:03 UTC by Vincent Penquerc'h
Modified: 2014-06-22 12:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A replacement patch that works in both cases (3.85 KB, patch)
2014-04-16 14:03 UTC, Vincent Penquerc'h
committed Details | Review

Description Vincent Penquerc'h 2014-04-16 14:03:20 UTC
Created attachment 274459 [details] [review]
A replacement patch that works in both cases

a6decb91ac2c035c381d59f1f1fabfeb2f869f95 causes a deadlock (1) in one particular test case. It was made to avoid a deadlock in another case (2)

I originally had a different patch to fix (2), and it happens to also work with (1). The current patch was done after discussing with wtay on IRC (no logs).

(1)
Using playbin on a local http server to a file with raw video in matroska

(2)
Using buffering, the pipeline is set to PAUSED, and then to PLAYING upon receiving a 100% buffering message. A deadlock happens *not always* after a couple buffering messages with small percentages.
Comment 1 Vincent Penquerc'h 2014-04-16 14:21:14 UTC
Approved by wtay on IRC.

commit f3dd7937a255461afd78fed8e7645d8976b559da
Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Date:   Wed Apr 16 15:17:04 2014 +0100

    queue2: fix event/preroll deadlock differently
    
    The qlock is released between popping a buffer from the queue
    and pushing it. When this buffer causes the sink to wait in
    preroll, this lets a query see that the queue is empty, and
    push the query then wait for it to be serviced. However, this
    will not be done till after peroll, and this will thus block.
    If upstream was waiting on buffering to reach 100% before
    switching to PLAYING, a deadlock would ensue.
    
    This had been fixed recently by failing queries when the
    queue2 was buffering, but this happens to break some other
    case (playbin on a local http server and matroska), while
    this patch works for both.
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=728345