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 640210 - Segfaults with Gst.Discoverer/Gst.TagList
Segfaults with Gst.Discoverer/Gst.TagList
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-21 17:59 UTC by rugby471
Modified: 2012-01-03 15:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Generated C Code (5.68 KB, text/x-csrc)
2011-01-21 18:17 UTC, rugby471
Details
Generated C Code (3.02 KB, text/x-csrc)
2011-01-21 19:12 UTC, rugby471
Details
Vala Code (743 bytes, text/x-vala)
2011-01-21 19:13 UTC, rugby471
Details
Back Trace (2.57 KB, application/octet-stream)
2011-01-21 19:14 UTC, rugby471
Details
Output of Valgrind when it crashes (2.64 KB, application/octet-stream)
2011-01-21 19:16 UTC, rugby471
Details
Valgrind Output (11.67 KB, text/plain)
2011-02-23 11:50 UTC, rugby471
Details

Description rugby471 2011-01-21 17:59:36 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
Comment 1 rugby471 2011-01-21 18:17:46 UTC
Created attachment 178985 [details]
Generated C Code
Comment 2 rugby471 2011-01-21 19:12:58 UTC
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)
Comment 3 rugby471 2011-01-21 19:13:18 UTC
Created attachment 178990 [details]
Vala Code
Comment 4 rugby471 2011-01-21 19:14:44 UTC
Created attachment 178991 [details]
Back Trace
Comment 5 rugby471 2011-01-21 19:16:17 UTC
Created attachment 178992 [details]
Output of Valgrind when it crashes
Comment 6 rugby471 2011-01-21 19:17:21 UTC
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
Comment 7 Tim-Philipp Müller 2011-01-28 00:10:49 UTC
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).
Comment 8 rugby471 2011-01-28 07:39:38 UTC
I tested with the version currently in the Gstreamer Team PPA and also the latest Git at that time.
Comment 9 Tim-Philipp Müller 2011-01-28 10:22:55 UTC
> 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.)
Comment 10 rugby471 2011-02-14 18:13:20 UTC
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).
Comment 11 rugby471 2011-02-23 11:48:52 UTC
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)
Comment 12 rugby471 2011-02-23 11:50:53 UTC
Created attachment 181683 [details]
Valgrind Output

Ignore what I just said :)

Here is a valgrind output for when it segfaults
Comment 13 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-01 13:59:33 UTC
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
Comment 14 Akhil Laddha 2011-04-13 10:30:10 UTC
rugby471, did you able to get valgrind trace as requested in comment#13 ?
Comment 15 rugby471 2011-04-14 09:15:25 UTC
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.
Comment 16 Tobias Mueller 2011-08-01 08:53:42 UTC
So have you managed to make it crash using the above mentioned valgrind command? Please reopen if you do.
Comment 17 sgringwe 2012-01-03 15:19:40 UTC
The reason that it is not crashing with valgrind is probably this: http://valgrind.org/docs/manual/faq.html#faq.crashes.