GNOME Bugzilla – Bug 738216
audiomixer: segfault with rtp and audiotestsrc mixing buffers
Last modified: 2018-11-03 11:31:32 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
+ Trace 234201
I can't reproduce this any more. You?
I can if I add the timeout=100000000 property to audiomixer.
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.
Created attachment 299795 [details] [review] add gst_segment_are_equal
Created attachment 299796 [details] [review] use gst_segment_are_equal
Created attachment 299800 [details] [review] add gst_segment_are_equal make check found an issue with the docs, fixed.
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.
Created attachment 299802 [details] [review] add gst_segment_is_equal
Created attachment 299803 [details] [review] use gst_segment_is_equal
(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 on attachment 299803 [details] [review] use gst_segment_is_equal I think you attached the wrong patch here?
Created attachment 300880 [details] [review] use gst_segment_is_equal Indeed, here's the correct one. Hopefully.
Comment on attachment 300880 [details] [review] use gst_segment_is_equal More importantly, fixes valgrind complaints in the -base unit tests :)
Pushed, thanks.
Still fine with current git (with and without timeout=100000000).
This now results in a floating point exception where bpf is 0 (so a division by 0)
+ Trace 238601
-- 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.