Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#8000 - quodlibet segfaults when playing a flac file

Attached to Project: Arch Linux
Opened by Pete (tam1138) - Wednesday, 12 September 2007, 06:23 GMT
Last edited by Aaron Griffin (phrakture) - Wednesday, 24 October 2007, 20:29 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Paul Mattal (paul)
Aaron Griffin (phrakture)
Architecture x86_64
Severity Low
Priority Normal
Reported Version 2007.08 Don't Panic
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

As the summary says: quodlibet segfaults when playing a flac file. It works on mp3s and oggs; I have no others to test it with. I have tried nuking ~/.quodlibet, ~/.gconf, ~/.gconfd, and ~/.gstreamer-0.10 to no avail.

I even have a backtrace, though it's fairly opaque without debugging symbols:

Program terminated with signal 11, Segmentation fault.
#0 0x00002aaaab3a3b4d in FLAC__lpc_restore_signal_wide ()
from /usr/lib/libFLAC.so.8
(gdb) bt
#0 0x00002aaaab3a3b4d in FLAC__lpc_restore_signal_wide ()
from /usr/lib/libFLAC.so.8
#1 0x00002aaaab3b7c6d in read_frame_ () from /usr/lib/libFLAC.so.8
#2 0x00002aaaab3b7dfc in FLAC__stream_decoder_process_single ()
from /usr/lib/libFLAC.so.8
#3 0x00002aaaab27019a in gst_flac_dec_loop ()
from /usr/lib/gstreamer-0.10/libgstflac.so
#4 0x00002b3ddf6124d9 in gst_task_func () from /usr/lib/libgstreamer-0.10.so.0
#5 0x00002b3ddb5d7fb7 in g_thread_pool_thread_proxy ()
from /usr/lib/libglib-2.0.so.0
#6 0x00002b3ddb5d6444 in g_thread_create_proxy ()
from /usr/lib/libglib-2.0.so.0
#7 0x00002b3dd9567fa7 in start_thread () from /lib/libpthread.so.0
#8 0x00002b3dd9ec4e3d in clone () from /lib/libc.so.6
#9 0x0000000000000000 in ?? ()

Additional info:
* package version(s)

quodlibet 1.0-2
python 2.5.1-1
gstreamer0.10-python 0.10.8-1
gstreamer0.10-flac 0.10.6-1
flac 1.2.0-1

Anything I'm missing?

* config and/or log files etc.

Nada.

Steps to reproduce:

Open quodlibet. Select a flac song. Play it. Watch quodlibet go boom.
This task depends upon

Closed by  Aaron Griffin (phrakture)
Wednesday, 24 October 2007, 20:29 GMT
Reason for closing:  Fixed
Additional comments about closing:  Mojo activated
Comment by Pete (tam1138) - Wednesday, 12 September 2007, 06:33 GMT
I whipped up a PKGBUILD for flac123-0.0.11 to try to narrow this down. It segfaults in the same way!

(gdb) bt
#0 0x00002ae1e3044b4d in FLAC__lpc_restore_signal_wide ()
from /usr/lib/libFLAC.so.8
#1 0x00002ae1e3058c6d in read_frame_ () from /usr/lib/libFLAC.so.8
#2 0x00002ae1e3058dfc in FLAC__stream_decoder_process_single ()
from /usr/lib/libFLAC.so.8
#3 0x000000000040216c in ?? ()
#4 0x00002ae1e39cdae4 in __libc_start_main () from /lib/libc.so.6
#5 0x0000000000401899 in ?? ()
#6 0x00007fffc7aac228 in ?? ()
#7 0x0000000000000000 in ?? ()

FURTHERMORE! /usr/bin/flac itself segfaults in the same way when told to decode a file to stdout (-dc options).

So it seems the summary of this bug should be changed to "flac doesn't work on Arch".
Comment by Pete (tam1138) - Wednesday, 12 September 2007, 06:43 GMT
flac123-0.0.11, built with the same PKGBUILD, successfully plays on i686.
Comment by Pete (tam1138) - Wednesday, 12 September 2007, 07:08 GMT
Audacious plays flacs fine on x86_64, but it doesn't link to libFLAC.
Comment by Eric Belanger (Snowman) - Wednesday, 12 September 2007, 15:11 GMT
Is your system up-to-date? Can quodlibet play flac files on i686? Did you tried playing different flac files?

quolibet plays flac files without any problem here on x86_64. 'flac -dc' also works.
Comment by Pete (tam1138) - Wednesday, 12 September 2007, 16:45 GMT
My system was up-to-date last night when I was testing, yes. I did not, in fact, try different flac files; I'll give that a shot tonight. I'll also try encoding with the version of flac I have installed currently; all the flac files I've got were encoded on a different machine running a different distribution. It shouldn't make a difference, I know, but.... you know. :)

I have not tried quodlibet on i686, but the simpler test -- flac123 -- works on i686 and fails on my x86_64. Until flac123 works on x86_64, it's silly to drag quodlibet into it, no?

I also downloaded the PKGBUILD for flac and compiled it myself, which produced the same segfault.
Comment by Pete (tam1138) - Wednesday, 12 September 2007, 17:09 GMT
Note that the exact same flac file works on i686 and fails on x86_64; given that, it doesn't seem worth trying a bunch of different flac files on x86_64, does it?
Comment by Pete (tam1138) - Thursday, 13 September 2007, 04:18 GMT
Other flac files play fine on x86_64, using both flac123 and quodlibet. Now I just have to figure out what's wrong with the specific ones that are causing problems.
Comment by Pete (tam1138) - Thursday, 13 September 2007, 05:26 GMT
The attached file bombs on x86_64 and works on i686.
Comment by Pete (tam1138) - Thursday, 13 September 2007, 05:32 GMT
I downloaded the flac source in an attempt to get a better backtrace. I had to remove some of the compilation options in order to get something useful; namely, in src/libFLAC/Makefile, I set:

CFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -DNDEBUG -Wall -W -Winline -DFLaC__INLINE=__inline__ -g
CXXFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -DNDEBUG -Wall -W -Winline -DFLaC__INLINE=__inline__ -g

It still segfaulted on that file, but the backtrace is mo betta:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47682023795456 (LWP 28668)]
0x00002b5dd52485e3 in FLAC__lpc_restore_signal_wide (residual=0x86a870,
data_len=4598, qlp_coeff=0x8378dc, order=10, lp_quantization=13,
data=0x866088) at lpc.c:1156
1156 sum += qlp_coeff[9] * (FLAC__int64)data[i-10];
(gdb) bt
#0 0x00002b5dd52485e3 in FLAC__lpc_restore_signal_wide (residual=0x86a870,
data_len=4598, qlp_coeff=0x8378dc, order=10, lp_quantization=13,
data=0x866088) at lpc.c:1156
#1 0x00002b5dd525b174 in read_subframe_lpc_ (decoder=0x834f80, channel=1,
bps=17, order=10, do_full_decode=1) at stream_decoder.c:2675
#2 0x00002b5dd525a723 in read_subframe_ (decoder=0x834f80, channel=1, bps=17,
do_full_decode=1) at stream_decoder.c:2494
#3 0x00002b5dd52595fb in read_frame_ (decoder=0x834f80,
got_a_frame=0x7fffd5a9414c, do_full_decode=1) at stream_decoder.c:2039
#4 0x00002b5dd5256f03 in FLAC__stream_decoder_process_single (
decoder=0x834f80) at stream_decoder.c:1059
#5 0x000000000040216c in ?? ()
#6 0x00002b5dd5c33ae4 in __libc_start_main () from /lib/libc.so.6
#7 0x0000000000401899 in ?? ()
#8 0x00007fffd5a94248 in ?? ()
#9 0x0000000000000000 in ?? ()
(gdb) print i
$1 = 0

Core attached (bzip'd to fit under 2MB)
   core.bz2 (132.8 KiB)
Comment by Aaron Griffin (phrakture) - Thursday, 13 September 2007, 05:41 GMT
Oh nice. Do you know C at all? Would it be possible for you to print some of those values out? namely, at lpc.c:1156 print out... hmm, what you can...

For the record, I'm pretty sure this is an upstream problem now, so you might want to check their bug tracker - either way if we can solve this and submit the patch, more power to you!
Comment by Pete (tam1138) - Thursday, 13 September 2007, 05:58 GMT
Bingo:

http://lists.xiph.org/pipermail/flac-dev/2007-September/002309.html

Applying that patch makes goodness. Good call phrakture!
Comment by Pete (tam1138) - Thursday, 13 September 2007, 06:11 GMT
Attached a tarball containing an updated PKGBUILD and the patch.
Comment by Aaron Griffin (phrakture) - Thursday, 13 September 2007, 15:18 GMT
Hah, yeah, I was gonna say "printf("i=%d\n", i);" because I had a feeling that was the problem... looks like I was right. Yay!
Comment by Pete (tam1138) - Wednesday, 24 October 2007, 19:38 GMT
This bug has been fixed in the newest release of flac (1.2.1-1), but I lack the appropriate mojo to close it. =)

Loading...