GNOME Bugzilla – Bug 758340
tests: funnel test is racy
Last modified: 2015-12-04 22:23:05 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.
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.
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.
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