Segmentation fault (core dumped) error

Bug #1481514 reported by Kollins
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SoundConverter
Invalid
Undecided
GautierPortet

Bug Description

There are some musics I'm trying to convert (from .flac to .ogg) and it's not working. It just freeze and close.

When I started in terminal using "soundconverter" command, and tried again, it happened the same, and the output was Segmentation fault (core dumped).

Revision history for this message
Jesse N. Richardson (richardson183) wrote :

Is the file names something weird? I've had issues in the past with SoundConverter doing weird things with bad filenames.

Revision history for this message
GautierPortet (kassoulet) wrote :

Can you retry with the "soundconverter --debug" command, and paste here the output please ?

Changed in soundconverter:
assignee: nobody → GautierPortet (kassoulet)
status: New → Incomplete
Revision history for this message
Kollins (kol-lins) wrote :

The file name is 01. All That She Wants.flac (complete path = /home/kollins/Music/Ace of Base/The Sign/01. All That She Wants.flac)

There are two directories on /home/kollins/Music/Ace of Base: The Sign and The Bridge. All songs in The Sign returns the same problem but songs in The Bridge are ok.

There aren't any difference in the file names, I mean, all songs has the same pattern ("number. name. flac"), in both directories.

The problem happens in some others cases, here is just one.

Here is the output using the "soundconverter --debug":

SoundConverter 2.1.5
** Message: pygobject_register_sinkfunc is deprecated (GstObject)
  using Gstreamer version: 0.10.36
  using 4 thread(s)
  using gio
Queue start: 1 tasks, 4 thread(s).
launching: 'giosrc location="file:///home/kollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.flac" ! typefind name=typefinder ! fakesink'
have_type: audio/x-flac 01. All That She Wants.flac
Queue done in 0.004s (1 tasks)
found_type 01.%20All%20That%20She%20Wants.flac
Queue start: 1 tasks, 4 thread(s).
launching: 'giosrc location="file:///home/kollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.flac" name=src ! decodebin name=decoder ! audiorate tolerance=10000000 ! audioconvert ! audioresample ! vorbisenc quality=1.0 ! oggmux ! giosink location="file:///home/kollins/ogg/01.%20All%20That%20She%20Wants.flac~879944~SC~"'
got file duration: 214
found_tags: 01. All That She Wants.flac
 album=The Sign (<type 'unicode'>)
 track-number=1 (<type 'int'>)
 artist=Ace of Base (<type 'unicode'>)
 title=All That She Wants (<type 'unicode'>)
 genre=Dance (<type 'unicode'>)
 track-count=12 (<type 'int'>)
 date=<GstDate: 1/1/1993> (<type 'gst.Date'>)
found_tags: 01. All That She Wants.flac
found_tags: 01. All That She Wants.flac
 album=The Sign (<type 'unicode'>)
 track-number=1 (<type 'int'>)
 artist=Ace of Base (<type 'unicode'>)
 title=All That She Wants (<type 'unicode'>)
 genre=Dance (<type 'unicode'>)
 track-count=12 (<type 'int'>)
 date=<GstDate: 1/1/1993> (<type 'gst.Date'>)
Segmentation fault (core dumped)

Revision history for this message
Kollins (kol-lins) wrote :

Just to complement. Here is the name of all songs:

The Bridge (conversion ok)
path: /home/kollins/Music/Ace of Base/The Bridge

01. Beautiful Life.flac
02. Never Gonna Say I'm Sorry.flac
03. Lucky Love.flac
10. My Déjà Vu.flac
17. Blooming 18.flac

The Sign (conversion fail in any song)
path: /home/kollins/Music/Ace of Base/The Sign

01. All That She Wants.flac
02. Don't Turn Around.flac
03. Young And Proud.flac
04. The Sign.flac
05. Living In Danger.flac
08. Waiting for Magic.flac
09. Happy Nation.flac
10. Voulez-Vous Danser.flac

Revision history for this message
Michael Schwendt (mschwendt) wrote :

> Segmentation fault (core dumped)

Considering that SoundConverter is written in Python, a low-level segmentation fault indicates that some backend library troubles you.

Which Linux distribution is this with? Can you gather some details about FLAC related library versions? And also about Ogg Vorbis versions (since that's your target format)?

Revision history for this message
Kollins (kol-lins) wrote :

I'm using fedora 22 64-bits.

I don't really know how to get the information about FLAC related libraty and ogg.

I typed "flac -h" and "ogginfo -h" and I got this information:

---------------------------------------------------------------------
flac - Command-line FLAC encoder/decoder version 1.3.1
Copyright (C) 2000-2009 Josh Coalson
Copyright (C) 2011-2014 Xiph.Org Foundation
------------------------------------------------------------------------
ogginfo from vorbis-tools 1.4.0
by the Xiph.Org Foundation (http://www.xiph.org/)
(c) 2003-2005 Michael Smith <email address hidden>
--------------------------------------------------------------------

Does it help? If it doesn't, what should I do to get the information about flac and ogg library?

Revision history for this message
Michael Schwendt (mschwendt) wrote :

> fedora 22 64-bits

Odd. I'm still using that one too next to Rawhide (F24 development).

Did the ABRT tool intercept any crash information?

Can you run the following command in a terminal? (all on one line)

gst-launch-0.10 giosrc location=file:///home/kollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.flac name=src ! decodebin name=decoder ! audiorate tolerance=10000000 ! audioconvert ! audioresample ! vorbisenc quality=1.0 ! oggmux ! giosink location="file:///home/kollins/01.%20All%20That%20She%20Wants.ogg

It's the GStreamer pipeline that converts the .flac file to .ogg. What do you get?

Revision history for this message
Kollins (kol-lins) wrote :

I didn't get any crash information, it just freeze and close as I said.

Running the command, it gave me the same error:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Segmentation fault (core dumped)

Revision history for this message
Michael Schwendt (mschwendt) wrote :

> I didn't get any crash information

What Fedora 22 product do you use? GNOME Workstation? Or a different one?

Normally, the ABRT (Automatic Bug Reporting Tool) would intercept crashes and make it convenient to submit stacktraces in the Fedora bug tracker. Have you used ABRT before? Perhaps you use a product, where abrtd is not running?

What you've shown in comment 8 is that native GStreamer 0.10 is affected by the problem. That gst-launch command doesn't involve SoundConverter at all.

So, it's not a bug in SoundConverter. Something's bad about those FLAC files that manages to break your GStreamer version 0.10 decoder - or perhaps the Ogg Vorbis encoder.

Does running flac -t on the "All That She Wants" file turn up anything?

And what do you get for

  rpm -q gstreamer-plugins-good gstreamer-plugins-base
  rpm -V gstreamer-plugins-good gstreamer-plugins-base

...?

Does the following fail, too?

gst-launch-0.10 filesrc location=file:///home/kollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.flac ! typefind ! decodebin name=decoder ! audioconvert ! alsasink

Revision history for this message
Michael Schwendt (mschwendt) wrote :

It would also be possible to run the segfaulting command within gdb and create a backtrace that way. Provided that any needed -debuginfo packages are installed (via "dnf debuginfo-install …" for the relevant gstreamer packages).

Revision history for this message
Kollins (kol-lins) wrote :

> What Fedora 22 product do you use? GNOME Workstation? Or a different one?

Yes, I'm using Fedora 22 Workstation but I changed GNOME to MATE.

> Does running flac -t on the "All That She Wants" file turn up anything?

I got this:

---------------------------------------------------------------------------------
flac 1.3.1, Copyright (C) 2000-2009 Josh Coalson, 2011-2014 Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for details.

01. All That She Wants.flac: ok
---------------------------------------------------------------------------------

Running rpm -q gstreamer-plugins-good gstreamer-plugins-base:
-------------------------------------------------------------------------------
gstreamer-plugins-good-0.10.31-13.fc22.x86_64
gstreamer-plugins-base-0.10.36-12.fc22.x86_64
------------------------------------------------------------------------------

And rpm -V gstreamer-plugins-good gstreamer-plugins-base returns me nothing.

Finally running gst-launch-0.10 filesrc location=file:///home/kollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.flac ! typefind ! decodebin name=decoder ! audioconvert ! alsasink
----------------------------------------------------------------------------------------
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Resource not found.
Additional debug info:
gstfilesrc.c(1042): gst_file_src_start (): /GstPipeline:pipeline0/GstFileSrc:filesrc0:
No such file "file:///home/kollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.flac"
Setting pipeline to NULL ...
Freeing pipeline ...
----------------------------------------------------------------------------------------------------

Revision history for this message
Kollins (kol-lins) wrote :

> Have you used ABRT before?

Actually, no.

I opened it and I found something about SoundConverter that says:

Sound Converter quit unexpectedly
The application encountered a problem and could not continue.

In details, the the first line (reason) says:

python2.7 killed by SIGSEGV

I reported that.

Revision history for this message
Michael Schwendt (mschwendt) wrote :

> No such file "file:///home/kollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.flac"

Sorry. "filsrc" doesn't understand URIs. Try this one, please:

gst-launch-0.10 giosrc location=file:///home/kollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.flac ! typefind ! decodebin name=decoder ! audioconvert ! alsasink

The invocation with "filesrc" would take a plain path to the file instead. Probably copying the file to a much simpler name would help for testing. It would look like:

gst-launch-0.10 filesrc location="/home/kollins/Music/Ace of Base/The Sign/01. All That She Wants.flac" ! typefind ! decodebin name=decoder ! audioconvert ! alsasink

Both commands should play back the file. Assuming it will cause a segfault as well, the next step could be to run the command in gdb and fetch a stacktrace. Provided you're still interested.

Anyway, it's a bug in GStreamer 0.10.x (or a library used by GStreamer).

Perhaps music players based on GStreamer 0.10.x, such as "guayadeque", will also crash. It could also be interesting to test the same FLAC files in programs based on GStreamer 1.0 (which is included in Fedora 22, too), such as gnome-music, snappy-player or rhythmbox.

Revision history for this message
Michael Schwendt (mschwendt) wrote :

An even simpler pipeline seems to me this one:

gst-launch-0.10 playbin uri=file:///home/kollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.flac

Normally, Fedora ABRT would intercept any segfault caused by that command. Not sure about the Mate spin.

Revision history for this message
Kollins (kol-lins) wrote :

All the tree commands worked the same way, playing the file with no problem:

-----------------------------------------------------------------------
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstAudioSinkClock
Got EOS from element "pipeline0".
Execution ended after 214535132855 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
-------------------------------------------------------------------------

Revision history for this message
Michael Schwendt (mschwendt) wrote :

Interesting. Then the FLAC decoding in GStreamer works and some other plugin is broken.

In case you want to try creating a backtrace, this would be one way:

  dnf install gdb
  dnf debuginfo-install gstreamer-plugins-good gstreamer-plugins-base

Then run gdb:

  gdb gst-launch-0.10

In gdb enter:

  set logging on

  run giosrc location=file:///home/kollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.flac name=src ! decodebin name=decoder ! audiorate tolerance=10000000 ! audioconvert ! audioresample ! vorbisenc quality=1.0 ! oggmux ! giosink location="file:///home/kollins/01.%20All%20That%20She%20Wants.ogg

  thread apply all bt

Maybe that will give some insight in the output file gdb.txt. Letting ABRT do that automatically would be the more convenient way, but I don't know why ABRT is not working (well) on your machine.

Revision history for this message
Kollins (kol-lins) wrote :

> Maybe that will give some insight in the output file gdb.txt

The output now was:
--------------------------------------------------------------------------
Starting program: /usr/bin/gst-launch-0.10 giosrc location=file:///home/kollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.flac name=src ! decodebin name=decoder ! audiorate tolerance=10000000 ! audioconvert ! audioresample ! vorbisenc quality=1.0 ! oggmux ! giosink location="file:///home/kollins/01.%20All%20That%20She%20Wants.ogg
/bin/bash: -c: line 0: unexpected EOF while looking for matching `"'
/bin/bash: -c: line 1: syntax error: unexpected end of file
During startup program exited with code 1.
----------------------------------------------------------------------------

I also looked at ABRT and there is nothing there.

Revision history for this message
Michael Schwendt (mschwendt) wrote :

> /bin/bash: -c: line 0: unexpected EOF while looking for matching `"'

Then run it in gdb without '"' quote characters in the file:// uris. All space characters (%20) are escaped already, so quotes are not necessary:

run giosrc location=file:///home/kollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.flac name=src ! decodebin name=decoder ! audiorate tolerance=10000000 ! audioconvert ! audioresample ! vorbisenc quality=1.0 ! oggmux ! giosink location=file:///home/kollins/01.%20All%20That%20She%20Wants.ogg

Revision history for this message
Kollins (kol-lins) wrote :

Now I got this:

---------------------------------------------------------------------------
Starting program: /usr/bin/gst-launch-0.10 giosrc location=file:///home/k
ollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.fl
ac name=src ! decodebin name=decoder ! audiorate tolerance=10000000 ! aud
ioconvert ! audioresample ! vorbisenc quality=1.0 ! oggmux ! giosink loca
tion=file:///home/kollins/01.%20All%20That%20She%20Wants.ogg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe93c1700 (LWP 8702)]
[New Thread 0x7fffec6e4700 (LWP 8123)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe93c1700 (LWP 8702)]
0x00007fffea2fffbf in strcpy (
    __src=0x7fffdc866be0 "METADATA_BLOCK_PICTURE",
    __dest=0x7fffe89537c0 <error: Cannot access memory at address 0x7fffe
89537c0>) at /usr/include/bits/string3.h:104
warning: Source file is more recent than executable.
104 }
Missing separate debuginfos, use: dnf debuginfo-install gvfs-1.24.1-2.fc2
2.x86_64 libbluray-0.7.0-1.fc22.x86_64
-------------------------------------------------------------------------------------------

Revision history for this message
Michael Schwendt (mschwendt) wrote :

> Missing separate debuginfos, use: dnf debuginfo-install gvfs-1.24.1-2.fc22.x86_64 libbluray-0.7.0-1.fc22.x86_64

(!)

First of all, installing them would be recommended.

And is that all you've got within gdb? Or have you not entered the command from comment 16 to create a full backtrace in file gdb.txt? The detailed output would include specific source files and line numbers.

A crash in strcpy() and a mention of "METADATA_BLOCK_PICTURE", hmm, I've searched a bit in GStreamer plugions source code:

$ cd gstreamer-plugins-base/
$ grep METADATA_BLOCK_PICTURE * -R
gst-plugins-base-0.10.36/NEWS: * vorbistag: Add support for METADATA_BLOCK_PICTURE tags
gst-plugins-base-0.10.36/NEWS: * vorbistag: Write GST_TAG_IMAGE and GST_TAG_PREVIEW_IMAGE as METADATA_BLOCK_PICTURE
gst-plugins-base-0.10.36/NEWS: * 635669 : [vorbistag] Support METADATA_BLOCK_PICTURE for Vorbis cover art
gst-plugins-base-0.10.36/ChangeLog: vorbistag: Write GST_TAG_IMAGE and GST_TAG_PREVIEW_IMAGE as METADATA_BLOCK_PICTURE
gst-plugins-base-0.10.36/ChangeLog: vorbistag: Add support for METADATA_BLOCK_PICTURE tags
gst-plugins-base-0.10.36/gst-libs/gst/tag/gstvorbistag.c: * http://wiki.xiph.org/VorbisComment#METADATA_BLOCK_PICTURE
gst-plugins-base-0.10.36/gst-libs/gst/tag/gstvorbistag.c: ("Couldn't extract image or image type from METADATA_BLOCK_PICTURE tag");
gst-plugins-base-0.10.36/gst-libs/gst/tag/gstvorbistag.c: GST_WARNING ("Failed to decode Base64 data from METADATA_BLOCK_PICTURE tag");
gst-plugins-base-0.10.36/gst-libs/gst/tag/gstvorbistag.c: } else if (g_ascii_strcasecmp (cur, "METADATA_BLOCK_PICTURE") == 0) {
gst-plugins-base-0.10.36/gst-libs/gst/tag/gstvorbistag.c: data_result = g_strdup_printf ("METADATA_BLOCK_PICTURE=%s", comment_data);

So far, it looks like it crashes in gst_tag_to_metadata_block_picture().

Revision history for this message
Kollins (kol-lins) wrote :

I installed the missing programs and tried again, now this was the output:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Starting program: /usr/bin/gst-launch-0.10 giosrc location=file:///home/kollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.flac n
ame=src ! decodebin name=decoder ! audiorate tolerance=10000000 ! audioconvert ! audioresample ! vorbisenc quality=1.0 ! oggmux ! giosink location=fil
e:///home/kollins/01.%20All%20That%20She%20Wants.ogg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe93c1700 (LWP 8702)]
[New Thread 0x7fffec6e4700 (LWP 8123)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe93c1700 (LWP 8702)]
0x00007fffea2fffbf in strcpy (
    __src=0x7fffdc866be0 "METADATA_BLOCK_PICTURE",
    __dest=0x7fffe89537c0 <error: Cannot access memory at address 0x7fffe89537c0>) at /usr/include/bits/string3.h:104
warning: Source file is more recent than executable.
104 }
Missing separate debuginfos, use: dnf debuginfo-install gvfs-1.24.1-2.fc22.x86_64 libbluray-0.7.0-1.fc22.x86_64
Starting program: /usr/bin/gst-launch-0.10 giosrc location=file:///home/kollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.flac n
ame=src ! decodebin name=decoder ! audiorate tolerance=10000000 ! audioconvert ! audioresample ! vorbisenc quality=1.0 ! oggmux ! giosink location=fil
e:///home/kollins/01.%20All%20That%20She%20Wants.ogg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe93c1700 (LWP 25699)]
[New Thread 0x7fffec6e4700 (LWP 25698)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe93c1700 (LWP 25699)]
0x00007fffea2fffbf in strcpy (__src=0x7fffdc867430 "METADATA_BLOCK_PICTURE",
    __dest=0x7fffe89537c0 <error: Cannot access memory at address 0x7fffe89537c0>) at /usr/include/bits/string3.h:104
warning: Source file is more recent than executable.
104 }
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Revision history for this message
Michael Schwendt (mschwendt) wrote :

Where is the file gdb.txt? Are you really following my instructions? Once you've got the file, you could attach it (instead of copying from the screen).

I cannot spend time on this anymore.

I've opened https://bugzilla.redhat.com/show_bug.cgi?id=1257892 but without the FLAC file and without a backtrace, I have doubts that it will lead to anything.

Revision history for this message
Kollins (kol-lins) wrote :

Here it is. I did the samething, but now I got a different output.

Revision history for this message
Michael Schwendt (mschwendt) wrote :

Again, the "thread apply all bt" command at the (gdb) prompt is missing. See comment 16. You will likely get two or more screen of stacktrace output, which will be logged in file gdb.txt.

Revision history for this message
Michael Schwendt (mschwendt) wrote :

Session likely will look like this:

$ gdb gst-launch-0.10
(gdb) set logging on
(gdb) run giosrc location=file:///home/kollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.flac name=src ! decodebin name=decoder ! audiorate tolerance=10000000 ! audioconvert ! audioresample ! vorbisenc quality=1.0 ! oggmux ! giosink location="file:///home/kollins/01.%20All%20That%20She%20Wants.ogg
(gdb) thread apply all bt
RETURN, RETURN, RETURN a few times probably
(gdb) quit

Revision history for this message
Michael Schwendt (mschwendt) wrote :

And in there is the wrong " as a typo I've made previously when constructing those file paths I don't have here. ;-)

Revision history for this message
Kollins (kol-lins) wrote :

> Again, the "thread apply all bt" command at the (gdb) prompt is missing.

Oh, I'm sorry, I forgot that. Now I think I did it right.

Revision history for this message
Michael Schwendt (mschwendt) wrote :

Thanks!

Whatever is done with that METADATA_BLOCK_PICTURE tag stuff is managing to crash libvorbis. Seems it's passing unexpectedly huge data to it: https://bugzilla.redhat.com/show_bug.cgi?id=1257892#c2

Revision history for this message
GautierPortet (kassoulet) wrote :

Good catch.

Very good work from both of you, thank you very much for your help.

Merking as invalid as it's in GStreamer.

Changed in soundconverter:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.