Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 193003 - media-libs/alsa causes apps to segfault
Summary: media-libs/alsa causes apps to segfault
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo ALSA team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-19 01:41 UTC by Doug Goldstein (RETIRED)
Modified: 2009-08-13 14:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Goldstein (RETIRED) gentoo-dev 2007-09-19 01:41:41 UTC
[ebuild   R   ] net-im/pidgin-2.2.0  USE="dbus gstreamer gtk ncurses perl spell -bonjour -debug -doc -eds -gadu -gnutls -groupwise -meanwhile -networkmanager -nls -prediction -qq -sasl -silc -tcl -tk -zephyr" 0 kB 

(gdb) bt
#0  0x00002b05568bf065 in *__GI_raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00002b05568c040e in *__GI_abort () at abort.c:88
#2  0x00002b05568b87df in *__GI___assert_fail (
    assertion=0x2aaab7094ff0 "plug->gen.slave == plug->req_slave", 
    file=0x2aaab7094fba "pcm_plug.c", line=67, 
    function=0x2aaab7095140 "snd_pcm_plug_close") at assert.c:78
#3  0x00002aaab706f944 in snd_pcm_plug_close (pcm=0xe4f3f0) at pcm_plug.c:67
#4  0x00002aaab7062d15 in snd_pcm_close (pcm=0xe4f3f0) at pcm.c:707
#5  0x00002aaab6df2eba in gst_alsasink_close (asink=0xe21170)
    at gstalsasink.c:724
#6  0x00002aaab5cdd825 in gst_audioringbuffer_close_device (
    buf=<value optimized out>) at gstaudiosink.c:338
#7  0x00002aaab5ce8160 in gst_ring_buffer_close_device (buf=0xe19340)
    at gstringbuffer.c:516
#8  0x00002aaab5ce2ce4 in gst_base_audio_sink_change_state (
    element=<value optimized out>, transition=GST_STATE_CHANGE_READY_TO_NULL)
    at gstbaseaudiosink.c:1352
#9  0x00002b05543120ae in gst_element_change_state (element=0xe21170, 
    transition=18719) at gstelement.c:2402
#10 0x00002b0554312527 in gst_element_set_state_func (element=0xe21170, 
    state=<value optimized out>) at gstelement.c:2352
#11 0x00002b05543063aa in gst_bin_change_state_func (element=0xe19080, 
    transition=GST_STATE_CHANGE_READY_TO_NULL) at gstbin.c:1868
#12 0x00002aaab6be6026 in gst_auto_audio_sink_change_state (element=0xe19080, 
    transition=GST_STATE_CHANGE_READY_TO_NULL) at gstautoaudiosink.c:327
#13 0x00002b05543120ae in gst_element_change_state (element=0xe19080, 
    transition=18719) at gstelement.c:2402
#14 0x00002b0554312527 in gst_element_set_state_func (element=0xe19080, 
    state=<value optimized out>) at gstelement.c:2352
#15 0x00002b05543063aa in gst_bin_change_state_func (element=0xe07150, 
    transition=GST_STATE_CHANGE_READY_TO_NULL) at gstbin.c:1868
#16 0x00002b05543120ae in gst_element_change_state (element=0xe07150, 
    transition=18719) at gstelement.c:2402
#17 0x00002b0554312527 in gst_element_set_state_func (element=0xe07150, 
    state=<value optimized out>) at gstelement.c:2352
#18 0x00002b05543063aa in gst_bin_change_state_func (element=0xd98030, 
    transition=GST_STATE_CHANGE_READY_TO_NULL) at gstbin.c:1868
#19 0x00002aaab4becd54 in gst_switch_sink_change_state (element=0xd98030, 
    transition=GST_STATE_CHANGE_READY_TO_NULL) at gstswitchsink.c:274
#20 0x00002aaab4bea467 in gst_gconf_audio_sink_change_state (element=0xd98030, 
    transition=GST_STATE_CHANGE_READY_TO_NULL) at gstgconfaudiosink.c:288
#21 0x00002b05543120ae in gst_element_change_state (element=0xd98030, 
    transition=18719) at gstelement.c:2402
#22 0x00002b0554312527 in gst_element_set_state_func (element=0xd98030, 
    state=<value optimized out>) at gstelement.c:2352
#23 0x00002b05543063aa in gst_bin_change_state_func (element=0xe07000, 
    transition=GST_STATE_CHANGE_READY_TO_NULL) at gstbin.c:1868
#24 0x00002b05543120ae in gst_element_change_state (element=0xe07000, 
    transition=18719) at gstelement.c:2402
#25 0x00002b0554312527 in gst_element_set_state_func (element=0xe07000, 
    state=<value optimized out>) at gstelement.c:2352
#26 0x00002aaab505ca52 in remove_sinks (play_bin=0xda2230) at gstplaybin.c:1303
#27 0x00002aaab505f458 in gst_play_bin_change_state (
    element=<value optimized out>, transition=GST_STATE_CHANGE_PAUSED_TO_READY)
    at gstplaybin.c:1836
#28 0x00002b05543120ae in gst_element_change_state (element=0xda2230, 
    transition=18719) at gstelement.c:2402
#29 0x00002b0554312527 in gst_element_set_state_func (element=0xda2230, 
    state=<value optimized out>) at gstelement.c:2352
#30 0x000000000048c4f2 in bus_call (bus=<value optimized out>, msg=0xe1e9e0, 
    data=0xda2230) at gtksound.c:373
#31 0x00002b05543091bf in gst_bus_source_dispatch (source=0xdebaf0, 
    callback=0x48c470 <bus_call>, user_data=0xda2230) at gstbus.c:701
#32 0x00002b05561fabd3 in IA__g_main_context_dispatch (context=0x6f5460)
    at gmain.c:2061
#33 0x00002b05561fdead in g_main_context_iterate (context=0x6f5460, block=1, 
    dispatch=1, self=<value optimized out>) at gmain.c:2694
#34 0x00002b05561fe189 in IA__g_main_loop_run (loop=0xaf1c60) at gmain.c:2898
#35 0x00002b05552116e2 in IA__gtk_main () at gtkmain.c:1144
#36 0x0000000000472573 in main (argc=1, argv=0x7fff568e8a98) at gtkmain.c:853

$ emerge --info
Portage 2.1.3.9 (default-linux/amd64/2007.0/desktop, gcc-4.2.0, glibc-2.6.1-r0, 2.6.21-gentoo x86_64)
=================================================================
System uname: 2.6.21-gentoo x86_64 AMD Athlon(tm) 64 Processor 3000+
Timestamp of tree: Tue, 18 Sep 2007 21:50:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0_rc4-r1
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18
sys-devel/gcc-config: 1.4.0-r2
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -ggdb -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -O2 -pipe -ggdb -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache distlocks metadata-transfer sandbox sfperms sign splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="C"
LDFLAGS="-Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /home/cardoe/workspace/gentopia /home/cardoe/workspace/gnome"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow X acpi alsa amd64 bash-completion bitmap-fonts branding cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread emboss encode evo fam flac gdbm gif glitz gnome gstreamer gtk hal iconv ipv6 isdnlog jpeg libnotify mad midi mikmod mmx mp3 mpeg mudflap ncurses nptl nptlonly ogg opengl oss pam pcre pdf perl png pppd python qt3support quicktime readline reflection sdl session spell spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode vim-syntax vorbis xcb xml xorg xulrunner xv zlib" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Olivier Crete (RETIRED) gentoo-dev 2007-09-19 05:37:46 UTC
this is clearly not a pidgin problem.. seems like something is wrong with you alsa installation.. or maybe you want to upgrade you alsa-libs
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2007-09-19 13:22:40 UTC
Fresh emerge --sync && emerge -uDNv world show I have nothing to upgrade.
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2007-09-19 14:05:43 UTC
Additionally, all other apps work fine with ALSA sound. I've successfully used sound-juicer, GNOME CD player, Wine (ALSA & OSS), mplayer, Flash Player plugin in Firefox. All tested and work fine. The only app that gives any kind of issue is pidgin. Which leads me to believe it's setting something up wrong or it's receiving a return value back from a function that it's not checking properly or checking at all and proceeding which results in the crash.
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2007-10-02 19:41:51 UTC
Comment #3 applies to Cardoe Machine #2. However, Cardoe Machine #3, nothing works. All crash like this.

Using mplayer results in:

[AO_ALSA] Unable to set hw-parameters: Invalid argument
Could not open/initialize audio device -> no sound.

on both #2 and #3.

Machine #1 refs 194448.

Machine #2 & #3 use the same sound card driver. And Machine #1 uses a different one.
Comment 5 Doug Goldstein (RETIRED) gentoo-dev 2007-10-03 14:29:22 UTC
Let me clean up the bugs because I think I crossed over wayyy too much.



*** This bug has been marked as a duplicate of bug 194448 ***
Comment 6 Doug Goldstein (RETIRED) gentoo-dev 2007-10-03 14:31:14 UTC
cleaning up. ignore comments #1 through #5
Comment 7 Doug Goldstein (RETIRED) gentoo-dev 2007-10-03 14:38:28 UTC
The simple test case is the following:

gst-launch-0.10 audiotestsrc ! alsasink device=plughw:0,0

with alsa-lib-1.0.14_rc3, it works.
with alsa-lib-1.0.14a and higher, it segfaults. mplayer spits out [AO_ALSA] Unable to set hw-parameters: Invalid argument

I didn't test the ebuilds in between those two versions since they're all masked in package.mask
Comment 8 Doug Goldstein (RETIRED) gentoo-dev 2007-10-03 15:12:17 UTC
additionally I switched to alsa-driver-1.0.14 to make this all work
Comment 9 Daniel Drake (RETIRED) gentoo-dev 2007-10-03 15:23:31 UTC
OK. So, at least in one configuration, you've demonstrated an alsa-lib regression: alsa-lib-1.0.14_rc3 works, alsa-lib-1.0.14a fails.

Apologies if you have done this already, but it's good to be clear: please now ensure that your make.conf doesn't do anything with ALSA_PCM_PLUGINS, reinstall alsa-lib-1.0.14a, confirm that the bug still exists (maybe even posting the segfault again if thats not too much to ask) and then post the contents of /var/db/pkg/media-libs/alsa-lib-1.0.14a/USE to this bug

Thanks!
Comment 10 Doug Goldstein (RETIRED) gentoo-dev 2007-10-03 15:29:25 UTC
alsa-driver 1.0.14 + alsa-lib-1.0.14a-r1 built with ALL the plugins = works
alsa-driver 1.0.14 + alsa-lib-1.0.15_rc2 built with ALL the plugins = works
in-kernel + alsa-lib-1.0.15_rc2 built with ALL the plugins = segfault
alsa-driver 1.0.14 + alsa-lib-1.0.15_rc2 with only default plugins
(ALSA_PCM_PLUGINS="") = segfault
Comment 11 Daniel Drake (RETIRED) gentoo-dev 2007-10-03 15:34:43 UTC
Please just clarify my understanding here:

In comment #7, you started off with in-kernel drivers and alsa-lib-1.0.14a. You got the segfault.

You then downgraded to alsa-lib-1.0.14_rc3 *AND* switched to alsa-driver drivers (rather than using the kernel ones), and then the segfault went away.

Correct?

The above is a little inconclusive as you changed 2 factors between the broken and working configurations. But your tests in comment #10 confirm that the one factor that matters is alsa-driver vs in-kernel, and the alsa-lib version doesn't really seem to matter. Is my understanding correct here as well?
Comment 12 Doug Goldstein (RETIRED) gentoo-dev 2007-10-03 15:40:11 UTC
in-kernel + alsa-lib-1.0.14_rc3 = works

better? I just didn't add that note. That's all. So your conclusion in comment #11 is wrong.
Comment 13 Doug Goldstein (RETIRED) gentoo-dev 2007-10-03 15:44:45 UTC
ok. 2.6.22 alsa drivers are fine. If using 2.6.18, you need to use alsa-driver-1.0.14
Comment 14 Doug Goldstein (RETIRED) gentoo-dev 2007-10-03 15:57:43 UTC
amd64 + gentoo-sources-2.6.22-r8 + in-kernel + alsa-lib-1.0.15_rc2 (all pcm plugins) + snd_intel8x0 = works

amd64 + gentoo-sources-2.6.22-r8 + in-kernel + alsa-lib-1.0.15_rc2 (phreak's default pcm plugins, ALSA_PCM_PLUGINS="") + snd_intel8x0 = segfaults

amd64 + gentoo-sources-2.6.22-r8 + in-kernel + alsa-lib-1.0.15_rc2 (override ebuild remove all pcm plugins) + snd_intel8x0 = graceful exit
Comment 15 Samuli Suominen (RETIRED) gentoo-dev 2009-08-01 07:38:13 UTC
Is this bug even remotely valid anymore... ?