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 708891 - check: adder test_flush_start_flush_stop racy
check: adder test_flush_start_flush_stop racy
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-27 06:57 UTC by Edward Hervey
Modified: 2016-09-25 15:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
collectpads: fix pad removal during active streaming (2.07 KB, patch)
2015-06-13 15:11 UTC, Tim-Philipp Müller
needs-work Details | Review

Description Edward Hervey 2013-09-27 06:57:55 UTC
CK_FORK=no GST_CHECKS=test_flush_start_flush_stop make elements/adder.forever
Running suite(s): adder


Unexpected critical/warning: gstpad.c:3685:gst_pad_chain_data_unchecked:<adder:sink_0> Got data flow before segment event


Unexpected critical/warning: gst_audio_buffer_clip: assertion `segment->format == GST_FORMAT_TIME || segment->format == GST_FORMAT_DEFAULT' failed


Unexpected critical/warning: gst_segment_to_stream_time: assertion `segment->format == format' failed
0%: Checks: 1, Failures: 1, Errors: 0
gstcheck.c:75:F:general:test_flush_start_flush_stop:0: Unexpected critical/warning: gstpad.c:3685:gst_pad_chain_data_unchecked:<adder:sink_0> Got data flow before segment event
Comment 1 Edward Hervey 2013-09-27 07:57:50 UTC
Note : This unit test sends flush start/stop from the main thread

The problem is a race in gst_pad_push_data between:
* (thread 1) the moment we check if sticky events should be carried over before pushing the buffer (this is the part that should take care of carrying over the stream-start and segment events).
* (thread 2) the peer pad being flushed
* (thread 1) gst_pad_chain_data_unchecked() being called on the peer pad
Comment 2 Edward Hervey 2014-02-02 10:43:50 UTC
Still fails ... but differently now

Running GST_CHECKS=test_flush_start_flush_stop make elements/adder.forever

Running suite(s): adder


Unexpected critical/warning: chain on pad adder:sink_1 but it has no chainfunction
0%: Checks: 1, Failures: 0, Errors: 1
gstcheck.c:75:E:general:test_flush_start_flush_stop:0: (after this point) Test timeout expired
Comment 3 Tim-Philipp Müller 2014-10-24 11:42:56 UTC
> Unexpected critical/warning: chain on pad adder:sink_1 but it has no
> chainfunction

Just got this as well once. No idea how that can even happen..
Comment 4 Olivier Crête 2015-06-12 03:55:28 UTC
This is still happening!
Comment 5 Tim-Philipp Müller 2015-06-13 15:11:04 UTC
Created attachment 305196 [details] [review]
collectpads: fix pad removal during active streaming

This fixes the no chain func issue for me, but then we're back at the two issues from the original report (progress!).
Comment 6 Tim-Philipp Müller 2015-06-14 20:49:37 UTC
Comment on attachment 305196 [details] [review]
collectpads: fix pad removal during active streaming

Leads to crashes in -good unit tests where the pads are removed from dispose and  GST_IS_PAD fails in gst_pad_set_active().
Comment 7 Tim-Philipp Müller 2016-09-25 10:40:22 UTC
I declare adder/collectpads unfixably broken. If no one has cared for 3 years, no one's going to fix this now and we should just disable this test.

It seems to work fine with audiomixer after all.
Comment 8 Tim-Philipp Müller 2016-09-25 15:24:41 UTC
commit 7c0ec13942bc59f6da75e432f6d3429b2dd5d9c1
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Sun Sep 25 16:22:16 2016 +0100

    tests: adder: disable racy flush_start_flush_stop test
    
    It's been broken for years, and it's unlikely it will ever
    be fixed for collectpads/adder now that there's audiomixer
    which works fine. So let's disable it, since all it does
    is that it creates noise that distracts from other failures.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708891