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 738216 - audiomixer: segfault with rtp and audiotestsrc mixing buffers
audiomixer: segfault with rtp and audiotestsrc mixing buffers
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-09 10:24 UTC by Matthew Waters (ystreet00)
Modified: 2018-11-03 11:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add gst_segment_are_equal (2.48 KB, patch)
2015-03-19 10:53 UTC, Vincent Penquerc'h
none Details | Review
use gst_segment_are_equal (2.64 KB, patch)
2015-03-19 10:53 UTC, Vincent Penquerc'h
none Details | Review
add gst_segment_are_equal (2.88 KB, patch)
2015-03-19 11:44 UTC, Vincent Penquerc'h
none Details | Review
add gst_segment_is_equal (3.20 KB, patch)
2015-03-19 12:11 UTC, Vincent Penquerc'h
committed Details | Review
use gst_segment_is_equal (3.20 KB, patch)
2015-03-19 12:12 UTC, Vincent Penquerc'h
needs-work Details | Review
use gst_segment_is_equal (2.64 KB, patch)
2015-04-03 11:00 UTC, Vincent Penquerc'h
committed Details | Review

Description Matthew Waters (ystreet00) 2014-10-09 10:24:04 UTC
git master of everything
orc enabled

To reproduce

Sending pipeline
gst-launch-1.0 -v audiotestsrc ! opusenc ! rtpopuspay ! udpsink host=127.0.0.1 port=9876

Receiving pipeline
gst-launch-1.0 udpsrc uri=udp://127.0.0.1:9876 caps="application/x-rtp, media=audio, clock-rate=48000, encoding-name=X-GST-OPUS-DRAFT-SPITTKA-00, payload=96" ! rtpopusdepay ! opusdec ! audioconvert ! audioresample ! audiomixer name=m ! alsasink audiotestsrc ! m.

Results in a nice,

(gdb) bt
  • #0 ??
  • #1 audiomixer_orc_add_s16
    at tmp-orc.c line 355
  • #2 gst_audio_mixer_mix_buffer
    at gstaudiomixer.c line 1223
  • #3 gst_audiomixer_aggregate
    at gstaudiomixer.c line 1447
  • #4 aggregate_func
    at gstaggregator.c line 483
  • #5 gst_task_func
    at gsttask.c line 317
  • #6 g_thread_pool_thread_proxy
    at gthreadpool.c line 307
  • #7 g_thread_proxy
    at gthread.c line 764
  • #8 start_thread
    from /usr/lib/libpthread.so.0
  • #9 clone
    from /usr/lib/libc.so.6

Comment 1 Tim-Philipp Müller 2014-11-09 12:08:26 UTC
I can't reproduce this any more. You?
Comment 2 Matthew Waters (ystreet00) 2014-11-10 00:31:32 UTC
I can if I add the timeout=100000000 property to audiomixer.
Comment 3 Vincent Penquerc'h 2015-03-19 10:52:55 UTC
I'm not seeing any crash, whether using this property or not.

I did find a seemingly unrelated invalid memory access though, for which I will attach patches just in case. It's possible that in some cases the comparison would throw the code onto a different (and unexpected) code path, which could conceivably cause the crash later, but I don't think that's too likely.

The sound is not very good though, I hear crackling from time to time (also without valgrind). I wonder if that might be related.
Comment 4 Vincent Penquerc'h 2015-03-19 10:53:32 UTC
Created attachment 299795 [details] [review]
add gst_segment_are_equal
Comment 5 Vincent Penquerc'h 2015-03-19 10:53:57 UTC
Created attachment 299796 [details] [review]
use gst_segment_are_equal
Comment 6 Vincent Penquerc'h 2015-03-19 11:44:56 UTC
Created attachment 299800 [details] [review]
add gst_segment_are_equal

make check found an issue with the docs, fixed.
Comment 7 Tim-Philipp Müller 2015-03-19 11:54:07 UTC
Comment on attachment 299800 [details] [review]
add gst_segment_are_equal

Ah yes, I noticed these too in the gst-plugins-base unit tests. This won't cause any crashes though.

For the patch:

 - should be called gst_segment_is_equal()

 - please just write out the comparisons instead of that macro

 - should be Since: 1.6

 - could also get the offset of  _gst_reserved and do memcmp up until that, but perhaps explicit compare is nicer.
Comment 8 Vincent Penquerc'h 2015-03-19 12:11:21 UTC
Created attachment 299802 [details] [review]
add gst_segment_is_equal
Comment 9 Vincent Penquerc'h 2015-03-19 12:12:18 UTC
Created attachment 299803 [details] [review]
use gst_segment_is_equal
Comment 10 Vincent Penquerc'h 2015-03-19 12:14:49 UTC
(In reply to Tim-Philipp Müller from comment #7)
> Ah yes, I noticed these too in the gst-plugins-base unit tests. This won't
> cause any crashes though.

Not directly, but maybe due to using a different code path down the line when the boolean gets branched on. That's all I could find testing, so...

>  - could also get the offset of  _gst_reserved and do memcmp up until that,
> but perhaps explicit compare is nicer.

That'd get caught in any padding the compiler adds (should it add any). I've left the comparisons as is.

The rest is changed as requested.
Comment 11 Tim-Philipp Müller 2015-04-03 10:52:02 UTC
Comment on attachment 299803 [details] [review]
use gst_segment_is_equal

I think you attached the wrong patch here?
Comment 12 Vincent Penquerc'h 2015-04-03 11:00:42 UTC
Created attachment 300880 [details] [review]
use gst_segment_is_equal

Indeed, here's the correct one. Hopefully.
Comment 13 Tim-Philipp Müller 2015-04-03 11:06:36 UTC
Comment on attachment 300880 [details] [review]
use gst_segment_is_equal

More importantly, fixes valgrind complaints in the -base unit tests :)
Comment 14 Vincent Penquerc'h 2015-04-03 11:33:05 UTC
Pushed, thanks.
Comment 15 Vincent Penquerc'h 2016-09-23 09:10:43 UTC
Still fine with current git (with and without timeout=100000000).
Comment 16 Matthew Waters (ystreet00) 2018-05-05 11:53:53 UTC
This now results in a floating point exception where bpf is 0 (so a division by 0)

  • #0 gst_audio_buffer_clip
    at audio.c line 128
  • #1 gst_audio_aggregator_do_clip
    at gstaudioaggregator.c line 1316
  • #2 gst_aggregator_pad_clip_buffer_unlocked
    at gstaggregator.c line 2853
  • #3 gst_aggregator_pad_peek_buffer
    at gstaggregator.c line 2936
  • #4 gst_audio_aggregator_aggregate
    at gstaudioaggregator.c line 1794
  • #5 gst_aggregator_aggregate_func
    at gstaggregator.c line 1127
  • #6 gst_task_func
    at gsttask.c line 332
  • #7 0x00007ffff6993463 in
  • #8 0x00007ffff6992a2a in
  • #9 start_thread
  • #10 clone

Comment 17 GStreamer system administrator 2018-11-03 11:31:32 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/134.