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 589991 - [queue] limited error handling might cause pipeline appearing to hang
[queue] limited error handling might cause pipeline appearing to hang
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.25
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-28 10:57 UTC by Mark Nauwelaerts
Modified: 2009-08-06 11:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Unit test (4.74 KB, patch)
2009-07-28 11:00 UTC, Mark Nauwelaerts
committed Details | Review
Possible fix (1.50 KB, patch)
2009-07-28 11:01 UTC, Mark Nauwelaerts
accepted-commit_after_freeze Details | Review
Possible fix bis (1.60 KB, patch)
2009-08-05 12:28 UTC, Mark Nauwelaerts
committed Details | Review

Description Mark Nauwelaerts 2009-07-28 10:57:45 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.
Comment 1 Mark Nauwelaerts 2009-07-28 11:00:43 UTC
Created attachment 139370 [details] [review]
Unit test

Unit (pipeline) test to illustrate/demonstrate the issue.
Comment 2 Mark Nauwelaerts 2009-07-28 11:01:35 UTC
Created attachment 139371 [details] [review]
Possible fix

* Do some more error posting in certain circumstances.
Comment 3 Wim Taymans 2009-07-29 10:06:44 UTC
This makes a lot of sense to me.
Comment 4 Mark Nauwelaerts 2009-08-05 12:28:15 UTC
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]
Comment 5 Mark Nauwelaerts 2009-08-06 11:46:51 UTC
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.