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 758340 - tests: funnel test is racy
tests: funnel test is racy
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal normal
: 1.7.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-11-19 14:04 UTC by Thiago Sousa Santos
Modified: 2015-12-04 22:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests: funnel: remove state change from stress tests (2.13 KB, patch)
2015-11-19 18:35 UTC, Thiago Sousa Santos
committed Details | Review

Description Thiago Sousa Santos 2015-11-19 14:04:09 UTC
Just run the funnel tests forever and it will fail at some point:

Unexpected critical/warning: gstpad.c:4074:gst_pad_chain_data_unchecked:<funnel0:sink_0> Got data flow before stream-start event
0%: Checks: 1, Failures: 1, Errors: 0
gstcheck.c:79:F:funnel simple:test_funnel_stress:0: Unexpected critical/warning: gstpad.c:4074:gst_pad_chain_data_unchecked:<funnel0:sink_0> Got data flow before stream-start event

The reason is that this test has a few threads doing different stuff. The 2 relevants here are the thread that does state changes and one that is pushing buffers.

Pushing a buffer has (among others) the following steps:
1) Check sticky events
2) Send any missing sticky events if needed
3) call the chain function of the downstream sink pad

If the state change thread does a change to null and back while the pushing of a buffer is between 2 and 3, you get the error above.
Comment 1 Thiago Sousa Santos 2015-11-19 18:35:43 UTC
Created attachment 315919 [details] [review]
tests: funnel: remove state change from stress tests

Changing states up and down while buffers are being pushed is not
a valid use case. If a pad is deactivated and reactivated during
a buffer push it is racy with the check of pushed sticky events
and the actual chainfunction call. As it might call the chain
without noticing the peer pad lost its previous sticky events.
Comment 2 Thiago Sousa Santos 2015-11-19 18:38:19 UTC
The remaining of the test will have 2 pads getting buffer pushes while a 3rd thread requests and releases pads that are not used.

Not sure how useful that is but it was like this before, except that the state was being changed as well.
Comment 3 Thiago Sousa Santos 2015-12-04 22:22:49 UTC
commit 17518358381bf587731c61b2210dad8c26cc63a1
Author: Thiago Santos <thiagoss@osg.samsung.com>
Date:   Thu Nov 19 15:33:06 2015 -0300

    tests: funnel: remove state change from stress tests
    
    Changing states up and down while buffers are being pushed is not
    a valid use case. If a pad is deactivated and reactivated during
    a buffer push it is racy with the check of pushed sticky events
    and the actual chainfunction call. As it might call the chain
    without noticing the peer pad lost its previous sticky events.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758340