GNOME Bugzilla – Bug 775687
tagdemux: Crash if getrange/shutdown happen at the same time
Last modified: 2016-12-07 09:22:09 UTC
I think this is something new/recent. Using debian sid with 1.10.2 I can easily reproduce and happened multiple times today. Thread 10 "mpegaudioparse1" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffbe560700 (LWP 26649)] g_str_hash (v=0x0) at ././glib/ghash.c:1876
+ Trace 236927
Thread 10 (Thread 0x7fffbe560700 (LWP 26649))
How can we reproduce this, can you provide a file where this happens?
It looks like the taglist (or the tag being added by id3demux) has NULL has name
Created attachment 341454 [details] python crasher I hope you don't mind the Python script, I can rewrite in C if needed. python2/3 gst-crash.py some.mp3 It crashes after a second here.
Runs just fine here. It might be related to the files you're trying it on. Can you share one?
Ah, got it now.
Created attachment 341460 [details] example mp3 sure
Reminds me of this old stacktrace: https://bugzilla.gnome.org/show_bug.cgi?id=700342#c19 Maybe I'm unlucky today, or the original issue surfaced again.
My C version also crashes.
Found the problem
commit 7c1a32e28b9d145ee25e3d3141dee7821ba8a7e2 Author: Sebastian Dröge <sebastian@centricular.com> Date: Tue Dec 6 16:29:23 2016 +0200 tagdemux: Fix crash when shutting down element during getrange() Ensure that nothing is in any of the streaming thread functions anymore when going from PAUSED to READY. While the parent's state change function has deactivated all pads, there is nothing preventing downstream from activating our srcpad again and calling the getrange() function. Although we're in READY! https://bugzilla.gnome.org/show_bug.cgi?id=775687
I can confirm that the patch on top of 1.10.2 fixes the issue. Thanks!
Ok, going to backport in a bit. This is not a new problem btw, it was broken like that since a long time
*** Bug 755123 has been marked as a duplicate of this bug. ***
It might actually make sense to move (part of) the cleanup to pad deactivation. I'll check that tomorrow.