Bug 142823 - gstreamer gets a floating point exception when outputting to alsasink
Summary: gstreamer gets a floating point exception when outputting to alsasink
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gstreamer
Version: 3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: John (J5) Palmieri
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-12-14 15:11 UTC by Matt Rose
Modified: 2013-03-13 04:47 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-20 03:46:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Backtrace with all relevant debuginfo packages. (3.48 KB, text/plain)
2005-01-29 21:39 UTC, Brandon
no flags Details

Description Matt Rose 2004-12-14 15:11:02 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041020
Firefox/0.10.1

Description of problem:
I can play sounds through alsa using the alsaplayer utility as well as
through xmms, however when I try to play through rhythmbox, I get a
crash.  I inspected this further and I traced it down to a problem in
the underlying gstreamer utilities that rhythmbox uses.

[mrose@host-175 Constantines]$ gst-launch filesrc location=STYOU.ogg !
vorbisdec ! alsasink
RUNNING pipeline ...
Floating point exception (core dumped)

I'm just using the stock rpm, so I don't have any debug symbols
compiled in, but this is

[mrose@host-175 Constantines]$ gdb "/usr/bin/gst-launch filesrc
location=STYOU.ogg ! vorbisdec ! alsasink" core.28446
GNU gdb Red Hat Linux (6.1post-1.20040607.41rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as
"i386-redhat-linux-gnu".../usr/bin/gst-launch filesrc
location=STYOU.ogg ! vorbisdec ! alsasink: No such file or directory.

Core was generated by `/usr/bin/gst-launch-0.8 filesrc
location=STYOU.ogg ! vorbisdec ! alsasink'.
Program terminated with signal 8, Arithmetic exception.
#0  0x049ef51a in ?? ()


Version-Release number of selected component (if applicable):
gstreamer-0.8.7-3

How reproducible:
Always

Comment 1 Sitsofe Wheeler 2004-12-14 17:43:00 UTC
You can install the debug symbols seperately (e.g. install
ftp://mirror.ac.uk/sites/fedora.redhat.com/3/i386/debug/gstreamer-debuginfo-0.8.7-3.i386.rpm
)

Comment 2 Matt Rose 2004-12-15 20:07:56 UTC
here's gdb output, with a backtrace.

[mrose@host-175 bin]$ gdb -s /usr/lib/debug/usr/bin/gst-launch-0.8.debug -e /usr
/bin/gst-launch-0.8
GNU gdb Red Hat Linux (6.1post-1.20040607.41rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db lib
rary "/lib/tls/libthread_db.so.1".

(gdb) filesrc location=/home/users/mrose/mp3/Constantines/Constantines/STYOU.ogg
 ! vorbisdec ! alsasink
Undefined command: "filesrc".  Try "help".
(gdb) set args filesrc location=/home/users/mrose/mp3/Constantines/Constantines/
STYOU.ogg ! vorbisdec ! alsasink
(gdb) run
Starting program: /usr/bin/gst-launch-0.8 filesrc location=/home/users/mrose/mp3
/Constantines/Constantines/STYOU.ogg ! vorbisdec ! alsasink
[Thread debugging using libthread_db enabled]
[New Thread -151079232 (LWP 28214)]
RUNNING pipeline ...

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread -151079232 (LWP 28214)]
0xf6cdf4ea in _snd_pcm_adpcm_open () from /lib/libasound.so.2

(gdb) bt
#0  0xf6cdf4ea in _snd_pcm_adpcm_open () from /lib/libasound.so.2
#1  0xf6cd1c27 in snd_pcm_hw_refine_slave () from /lib/libasound.so.2
#2  0xf6cdf62b in _snd_pcm_adpcm_open () from /lib/libasound.so.2
#3  0xf6cce07c in snd_pcm_hw_refine () from /lib/libasound.so.2
#4  0xf6cd1dd3 in snd_pcm_hw_params_slave () from /lib/libasound.so.2
#5  0xf6ce3a07 in _snd_pcm_rate_open () from /lib/libasound.so.2
#6  0xf6cd1f80 in snd_pcm_hw_params_slave () from /lib/libasound.so.2
#7  0xf6cc4bf9 in snd_pcm_hw_params () from /lib/libasound.so.2
#8  0xf6d4c8cc in gst_alsa_hw_params_dump ()
   from /usr/lib/gstreamer-0.8/libgstalsa.so
#9  0xf6d4d352 in gst_alsa_hw_params_dump ()
   from /usr/lib/gstreamer-0.8/libgstalsa.so
#10 0xf6d4eeb8 in gst_alsa_link () from /usr/lib/gstreamer-0.8/libgstalsa.so
#11 0xf6d53aab in gst_alsa_mixer_get_type ()
   from /usr/lib/gstreamer-0.8/libgstalsa.so
#12 0xf6d51f4b in gst_alsa_sink_get_type ()
   from /usr/lib/gstreamer-0.8/libgstalsa.so
#13 0x04e42cfb in gst_element_set_state_func (element=0x994ac60,
    state=GST_STATE_PAUSED) at gstelement.c:2796
#14 0x04e42268 in gst_element_set_state (element=0x994ac60,
    state=GST_STATE_PAUSED) at gstelement.c:2739
#15 0x04e33631 in set_kid_state_func (bin=0x99225a8, child=0x994ac60,
    user_data=0xfee2a8d0) at gstbin.c:796

Comment 3 Matt Rose 2004-12-15 20:15:00 UTC
sorry, more bt output

#16 0x04e33511 in gst_bin_foreach (bin=0x99225a8,
    func=0x4e335b2 <set_kid_state_func>, data=0xfee2a8d0) at gstbin.c:760
#17 0x04e339c0 in gst_bin_change_state (element=0x99225a8) at gstbin.c:851
#18 0x04e5afe9 in gst_pipeline_change_state (element=0x99225a8)
    at gstpipeline.c:174
#19 0x04e42cfb in gst_element_set_state_func (element=0x99225a8,
    state=GST_STATE_PLAYING) at gstelement.c:2796
#20 0x04e33bb8 in gst_bin_set_state (element=0x99225a8,
    state=GST_STATE_PLAYING) at gstbin.c:890
#21 0x04e42268 in gst_element_set_state (element=0x99225a8,
    state=GST_STATE_PLAYING) at gstelement.c:2739
#22 0x0804a3ac in main (argc=7, argv=0xfee2ad84) at gst-launch.c:531
(gdb)


Comment 4 Brandon 2005-01-29 02:51:52 UTC
I'm getting the same problem on x86_64.  Works fine if i replace
alsasink with osssink.  alsaplayer and xmms w/alsa also work fine.

[brandon@hegeman-64 Blink_182-Blink_182-2003-FNT]# gdb -s
/usr/lib/debug/usr/bin/gst-launch-x86_64-0.8.debug -e
/usr/bin/gst-launch-0.8
GNU gdb Red Hat Linux (6.1post-1.20040607.43rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "x86_64-redhat-linux-gnu"...Using host
libthread_db library "/lib64/tls/libthread_db.so.1".

(gdb) run filesrc location=10-blink_182-always-fnt.mp3 ! mad ! alsasink
Starting program: /usr/bin/gst-launch-0.8 filesrc
location=10-blink_182-always-fnt.mp3 ! mad ! alsasink[Thread debugging
using libthread_db enabled]
[New Thread 182894130592 (LWP 2869)]
RUNNING pipeline ...

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 182894130592 (LWP 2869)]
0x0000003c8ce5b78d in _snd_pcm_adpcm_open () from /lib64/libasound.so.2
(gdb) bt
#0  0x0000003c8ce5b78d in _snd_pcm_adpcm_open () from
/lib64/libasound.so.2
#1  0x0000003c8ce4efbf in snd_pcm_hw_refine_slave () from
/lib64/libasound.so.2
#2  0x0000003c8ce5b850 in _snd_pcm_adpcm_open () from
/lib64/libasound.so.2
#3  0x0000003c8ce4f144 in snd_pcm_hw_params_slave () from
/lib64/libasound.so.2
#4  0x0000003c8ce5f4de in _snd_pcm_rate_open () from /lib64/libasound.so.2
#5  0x0000003c8ce4f25d in snd_pcm_hw_params_slave () from
/lib64/libasound.so.2
#6  0x0000003c8ce4445b in snd_pcm_hw_params () from /lib64/libasound.so.2
#7  0x0000002a981d52c9 in gst_alsa_hw_params_dump () from
/usr/lib64/gstreamer-0.8/libgstalsa.so
#8  0x0000002a981d5ca5 in gst_alsa_hw_params_dump () from
/usr/lib64/gstreamer-0.8/libgstalsa.so
#9  0x0000002a981d7588 in gst_alsa_link () from
/usr/lib64/gstreamer-0.8/libgstalsa.so
#10 0x0000002a981db788 in gst_alsa_mixer_get_type () from
/usr/lib64/gstreamer-0.8/libgstalsa.so
#11 0x0000003c8fb31cf9 in gst_element_set_state_func
(element=0x5d4f00, state=GST_STATE_PAUSED)
    at gstelement.c:2796
#12 0x0000003c8fb31367 in gst_element_set_state (element=0x5d4f00,
state=GST_STATE_PAUSED)
    at gstelement.c:2739
#13 0x0000003c8fb23291 in set_kid_state_func (bin=0x559980,
child=0x5d4f00, user_data=0x0)
    at gstbin.c:796
#14 0x0000003c8fb23128 in gst_bin_foreach (bin=0x559980,
func=0x3c8fb231f0 <set_kid_state_func>,
    data=0x7fbffff1c0) at gstbin.c:760
#15 0x0000003c8fb235e3 in gst_bin_change_state (element=0x559980) at
gstbin.c:851
#16 0x0000003c8fb31cf9 in gst_element_set_state_func
(element=0x559980, state=GST_STATE_PLAYING)
    at gstelement.c:2796
#17 0x0000003c8fb237bc in gst_bin_set_state (element=0x559980,
state=GST_STATE_PLAYING)
    at gstbin.c:890
#18 0x0000003c8fb31367 in gst_element_set_state (element=0x559980,
state=GST_STATE_PLAYING)
    at gstelement.c:2739
#19 0x0000000000402969 in main (argc=7, argv=0x7fbffff788) at
gst-launch.c:531
(gdb)


Comment 5 Brandon 2005-01-29 21:39:30 UTC
Created attachment 110398 [details]
Backtrace with all relevant debuginfo packages.

The error seems to occur because gstreamer is calling snd_pcm_hw_params before
setting the period size.  

gst_alsa_set_hw_params only sets the period size if this->format is defined. 
It sets the period size to this->period_size which seems to have a valid value
so it seems a possibile fix would be to always set the period_size, not only if
this->format is not NULL.  

Another solution that seems like it would probably work as well would be simply
to check the value of period_size->min in snd_pcm_rate_hw_refine_cchange from
alsa-libs and only use it as a divisor if it != 0

Comment 6 John Thacker 2006-04-30 13:40:46 UTC
FC3 is now the responsibility of Fedora Legacy, and this does not look
like a security bug.  Can you duplicate this on FC4 or FC5, which have
a lot of updates to gstreamer and its plugins?

Comment 7 John Thacker 2007-01-20 03:46:22 UTC
Closing per lack of response to previous request for information.
This bug was originally filed against a much earlier version of Fedora
Core, and significant changes have taken place since the last version
for which this bug is confirmed.

Note that FC3 and FC4 are supported by Fedora Legacy for security
fixes only.  Please install a still supported version and retest.  If
it still occurs on FC5 or FC6, please reopen and assign to the correct
version.  Otherwise, if this a security issue, please change the
product to Fedora Legacy.  Thanks, and we are sorry that we did not
get to this bug earlier.


Note You need to log in before you can comment on or make changes to this bug.