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 766835 - [bin] race condition when a NON_PREROLL child also sends ASYNC_START
[bin] race condition when a NON_PREROLL child also sends ASYNC_START
Status: RESOLVED DUPLICATE of bug 760532
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-24 11:31 UTC by Julien MOUTTE
Modified: 2016-05-24 12:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case demonstrating race (2.71 KB, text/x-csrc)
2016-05-24 11:31 UTC, Julien MOUTTE
Details

Description Julien MOUTTE 2016-05-24 11:31:50 UTC
Created attachment 328431 [details]
Test case demonstrating race

While changing the state of a child, we might receive ASYNC_START messages which we will store for future matching.

If that child state change returns NO_PREROLL we will ignore the ASYNC messages and successfully change the state of the child, BUT the stored ASYNC_START message is still there.

As the state was changed the child might not have a pending state when the ASYNC_DONE message is sent by it's internal elements. If that happens the ASYNC_DONE message is not propagated to the parent bin and the stored ASYNC_START message is orphaned preventing the parent bin to complete its own state change.

I am providing a test case demonstrating that race which has been tested with 1.6.2, 1.6.4 and 1.8.1

The test cases uses a sample JPEG file which is being opened by 2 different bins using uridecodebin (both of them generating ASYNC_* messages) but one of the bins also has identity with sync=TRUE which triggers a NO_PREROLL. If there's a slight delay between changing states from PAUSED to PLAYING the no_preroll_bin will eat the ASYNC_DONE message leaving the pipeline in a transitioning state.

My proposed fix for this bug would be to delete stored ASYNC_START messages from child in the parent bin when child returns NO_PREROLL (attached patch).
Comment 1 Sebastian Dröge (slomo) 2016-05-24 12:06:22 UTC
See https://bugzilla.gnome.org/show_bug.cgi?id=760532#c23

*** This bug has been marked as a duplicate of bug 760532 ***