GNOME Bugzilla – Bug 640210
Segfaults with Gst.Discoverer/Gst.TagList
Last modified: 2012-01-03 15:19:40 UTC
I am having some trouble with GstDiscoverer. In Vala, I am using Gst.Discoverer to get the Gst.TagList for a music file. I am doing this for every music file in a directory (i.e. a large collection). However (randomly) I will get segfaults before the whole process finishes, or sometimes it will finish without a segfault. Attached is the Vala code and produced C code and two backtraces when I run it with: G_DEBUG=fatal_criticals gdb
Created attachment 178985 [details] Generated C Code
Created attachment 178989 [details] Generated C Code I managed to isolate it so it happens when I only use one file (though it is not specific to the file)
Created attachment 178990 [details] Vala Code
Created attachment 178991 [details] Back Trace
Created attachment 178992 [details] Output of Valgrind when it crashes
Just in case it helps, here is the file which it crashed on, however remember it is not specific to the file, it happens randomly on different files http://www.2shared.com/audio/82v1_gSV/Andrea_Bocelli_-_Cieli_di_Tosc.html
What's your version of gst-plugins-base / gstreamer-pbutils-0.10 ? I've run the generated C code against 0.10.32/git in a loop for ages with and without valgrind, and couldn't reproduce the problem (with your audio file).
I tested with the version currently in the Gstreamer Team PPA and also the latest Git at that time.
> I tested with the version currently in the Gstreamer Team PPA Which is? Please tell us exactly what version you have installed according to dpkg -l. > and also the latest Git at that time. Which was what commit ID? (Sorry, just making sure. I have no other idea what might be wrong other than you using an older version than expected.)
Sorry for not getting back to you quicker: Version in Gstreamer PPA (gst-plugins-base) - 0.10.32-1~maverick1 Commit ID of GIT version (gst-plugins-base) - 46f3e7c6fd9148677e97e01c5a29f07f59a132b3 One idea I did have was whether you could give me a minimal case in C (i.e. the same that I have in Vala), so we can isolate the problem (i.e. that is is/is not to do with vala).
Ok just tried it with gst-discoverer-1.0 and it also segfaults (I am unable to get a stacktrace or valgrind output as it happens so rarely it is nearly impossible to catch it)
Created attachment 181683 [details] Valgrind Output Ignore what I just said :) Here is a valgrind output for when it segfaults
For me git HEAD version dos not crash nor is valgrind complaining about uninitialized values or invalid reads. Can you run valgrind like this: G_SLICE=always-malloc G_DEBUG=gc-friendly GLIBCPP_FORCE_NEW=1 GLIBCXX_FORCE_NEW=1 valgrind --tool=memcheck --leak-check=full --leak-resolution=high --trace-children=yes --num-callers=25 -v
rugby471, did you able to get valgrind trace as requested in comment#13 ?
Sorry just spent about an hour trying to get valgrind to make it crash but it didn't work. I know it still crashes as when I use gst-discoverer-0.1 by itself, eventually (1 time out of 1000) it crashes.
So have you managed to make it crash using the above mentioned valgrind command? Please reopen if you do.
The reason that it is not crashing with valgrind is probably this: http://valgrind.org/docs/manual/faq.html#faq.crashes.