GNOME Bugzilla – Bug 728345
queue2: recent patch to avoid deadlock deadlocks
Last modified: 2014-06-22 12:15:59 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.
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