GNOME Bugzilla – Bug 589991
[queue] limited error handling might cause pipeline appearing to hang
Last modified: 2009-08-06 11:46:51 UTC
If a downstream element returns an error while upstream has already put all data into queue (including EOS), queue will simply pause without raising an error message and not send EOS downstream either. Since upstream will no longer call chain function, it will be unaware of any error and not perform any EOS or error posting logic either. So, application receives neither EOS nor any error message although streaming has stopped (making it typically appear to "hang"). Note that there may be downstream fatal errors (e.g. negotiation) that do not warrant an error message already having been posted (by downstream). Also note that the same issue affects queue2 as well.
Created attachment 139370 [details] [review] Unit test Unit (pipeline) test to illustrate/demonstrate the issue.
Created attachment 139371 [details] [review] Possible fix * Do some more error posting in certain circumstances.
This makes a lot of sense to me.
Created attachment 139937 [details] [review] Possible fix bis Same patch/fix as before, but now it also posts in case of NOT_LINKED (as is the case with the usual pause logic). [So I am assuming this makes just as much sense unless otherwise objected to]
commit 3f0e4bd6f69067907bed6d3b07f41bb64b9c146f Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Tue Jul 28 12:03:36 2009 +0200 queue: add unit test Make a downstream element return an error after upstream has already put all data into queue (including EOS). As such, upstream will not be around to pick up the error, so it is up to queue to act appropriately. See #589991. Note there may be downstream fatal errors (e.g. negotiation) that do not warrant an error message already having been posted. commit 3352c5d97042b21850439df2ca475c46c39a164b Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Thu Aug 6 13:29:29 2009 +0200 queue: post error message when pausing task If downstream returns error and upstream has already delivered everything (including EOS) and will no longer be around to find out that we paused (and why), post error message. Fixes #589991. And btw also for queue2 in -base: commit ff998f24dbba934abd6402dafbe809cdf9dea466 Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Thu Aug 6 12:18:36 2009 +0200 queue2: post error message when pausing task if so appropriate If a downstream element returns an error while upstream has already put all data into queue2 (including EOS), upstream will no longer chain into queue2, so it is up to queue2 to perform some EOS handling / message posting in such cases. See #589991.