Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 64803 - gstreamer and alsa resampling cause applications to crash
Summary: gstreamer and alsa resampling cause applications to crash
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-20 15:40 UTC by gad.kadosh
Modified: 2004-10-18 11:33 UTC (History)
3 users (show)

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 gad.kadosh 2004-09-20 15:40:41 UTC
 
Comment 1 gad.kadosh 2004-09-20 15:45:52 UTC
When I use alsasink in gstreamer, audio apps (rhythmbox and muine) work fine only when dmix is set to rate 44100. If I set to 48000 or 96000 those apps (and the gstreamer applet too) crash a second after I start playing a sound.
Totem with gstreamer backend, won't play videos at all. If it's set to 44100 in /etc/asound.conf it won't crash, but the video seems to play in 1 frame per second or something like that (I'm not sure that's related to alsa though, or generally to gstreamer).
All my packages are the ~x86 from portage.
Comment 2 Marien Zwart (RETIRED) gentoo-dev 2004-09-22 18:04:50 UTC
I think I've hit the same bug. If I do "gst-inspect-0.8 audioscale" I get:

** (process:4360): CRITICAL **: how to remove plugins?

(process:4360): GStreamer-CRITICAL **: Factory for `audioscale' has no type. This probably means the plugin wasn't found because the registry is broken. The plugin GStreamer was looking for is named 'audioscale' and is expected in file '/usr/lib/gstreamer-0.8/libgstaudioscale.so'. The registry for this plugin is located at '/var/lib/cache/gstreamer-0.8/registry.xml'
couldn't construct element for some reason
Plugin Details:
  Name:         audioscale
  Description:  Resamples audio
  Filename:     /usr/lib/gstreamer-0.8/libgstaudioscale.so
  Version:      0.8.3
  License:      LGPL
  Package:      GStreamer Plugins
  Origin URL:   http://gstreamer.net/

  audioscale: Audio scaler

  1 features:
  +-- 1 elements

Rhythmbox complains about audioscale too before crashing. This is with ~x86 gstreamer and gst-plugins. I've tried the "stupid approach" of remerging both gstreamer and gst-plugins but this didn't seem to help. When I merge gst-plugins I do see audioscale getting registered at the end. Emerge info, which doesn't seem to show my gcc is hardened:

Portage 2.0.51_rc1 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.3.20040420-r1, 2.6.8-gentoo-r3 i686)
=================================================================
System uname: 2.6.8-gentoo-r3 i686 AMD Athlon(tm) XP 2600+
Gentoo Base System version 1.5.3
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.14.90.0.8-r1
Headers:  sys-kernel/linux-headers-2.4.21-r1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="3dnow 3dnowex X alsa bitmap-fonts cdr crypt dga dlloader edl emacs encode esd faad fam fbcon gif gnome gstreamer gtk2 imap javascript jikes jit jpeg libcaca lufsusermount maildir md5sum mmx mmx2 mng mozdevelop mozsvg mpeg msn ncurses network nls nntp nptl oggvorbis opengl pam png python quicktime readline rtc softmmu spell sse ssl svg tcpd tetex truetype unicode usb x86 xml xml2 xv zlib"

Comment 3 foser (RETIRED) gentoo-dev 2004-09-23 02:43:56 UTC
is the initial reports machine also hardened ?
Comment 4 Marien Zwart (RETIRED) gentoo-dev 2004-09-23 02:58:59 UTC
I'm beginning to suspect hardened is causing this. I've been playing around with it a bit. gst-inspect-0.8 gave the same critical error on other stuff from gst-plugins, but worked for something like gst-plugins-mad, which was an older version I merged from before hardened gcc. I then upgraded gst-plugins-mad to latest ~x86 version, and it started failing in the same way. It might be the upgrade of course, but I somehow doubt it. I'd like to avoid a gcc recompile, but if nothing turns up soon I'll do that (have had other issues with it).
Comment 5 gad.kadosh 2004-09-23 22:04:49 UTC
as far as i know the problems of gstreamer with alsa are related to alsa bugs, but i'm not sure, since alsa works perfectly with all other native alsa apps or oss apps with emulation on my machine. so i don't know if the problem is related to gstreamer of alsa, and if gentoo bugs is the place to report it at all. 
i see varying behaviours with gstreamer+alsa. sometimes it works ok, sometimes resampling in dmix breaks it, sometimes it starts playing and then crashes, sometimes it crashes right away, sometimes it segfaults etc...
i have had hard time to see some logic in the bugginess of it, so i thought of sharing with others, since i don't if i'm the only one to get such a behaviour.
Comment 6 gad.kadosh 2004-09-23 22:07:05 UTC
by the way, if this is related to alsa, then i'm using alsa's atiixp driver. if any of you has the same chip it might help tracing the problem. my alsa driver version is from cvs.
Comment 7 Jeremy Huddleston (RETIRED) gentoo-dev 2004-09-23 23:29:18 UTC
FWIW, I've never gotten gstreamer to work right with ALSA, and I've given up on trying...
Comment 8 Marien Zwart (RETIRED) gentoo-dev 2004-09-24 04:17:15 UTC
I think not all people commenting here are seeing the same bug. My symptoms: "gst-inspect-0.8 audioscale" (or anything else) fails with a GStreamer-CRITICAL error. Gstreamer doesn't work at all, alsa works fine. My problem is not alsa-related, since parts of gstreamer that don't use alsa fail. If other people here have gstreamer mostly working except for alsa sound output (gst-inspect and perhaps video output work fine) then it's not the same bug. If other people do get the gst-inspect errors, I'd like to know if they compiled gcc with hardened in USE.
Comment 9 gad.kadosh 2004-09-24 06:02:35 UTC
well, video with gstreamer never worked for me, so the only gstreamer stuff that i could run were rhythmbox and muine and nautilis sound preview. those did work for some time with alsasink, but now they don't. they do work with osssink (through emulation). alsasink might start working here again some day...
Comment 10 Marien Zwart (RETIRED) gentoo-dev 2004-09-24 16:13:13 UTC
I can confirm the issue I was seeing was caused by hardened gcc. I just remerged gcc with USE=-hardened and then remerged gst-plugins, and the gst-inspect-0.8 audioscale now works. I haven't tried an actual app yet, but I'm pretty sure this solves my problem.
Comment 11 foser (RETIRED) gentoo-dev 2004-09-25 00:17:02 UTC
@ Marien : can you get a backtrace with debugging info of such a crash ?

@ initial reporter : like the gst-plugins-alsa ebuild notes, alsa support is known broken on some hardware. Afaik at this point it's only usable for sound-only applications, not video. It's best to use is alsa trough oss emulation via gst-plugins-oss atm.
Comment 12 Marien Zwart (RETIRED) gentoo-dev 2004-09-26 10:46:26 UTC
I don't really have the time to investigate this fully at the moment, especially since it'll involve some gcc juggling (I don't know of a way to have a hardened and non-hardened gcc simultaneously installed, so I'll have to quickpkg the gcc's or somehow use my server's hardened gcc. Figuring out this setup will take me a bit more time than I have available right now). I hope to get to it in about a week.

gst-inspect-0.8 didn't crash, it just "failed critically". I think the crashes in actual apps were caused by those apps not recovering gracefully from the failing instantiation of a plugin, or something like that. I doubt backtraces from that are very useful. I'll try to figure out what turns out differently for a hardened gst-plugins compile as soon as possible.
Comment 13 gad.kadosh 2004-09-26 16:49:11 UTC
guys, i have never used hardened gcc and don't intend to, so my problem is not related to that. it's a general gstreamer fault on a really regular system... alsa does not work well with gstreamer. i have to use osssink to get it right without crashing my apps. also almost no video files play right with gstreamer (through totem). actually i only found till this day one video file that played right and well, but it didn't work when trying full-screen and resizing. 
i would just like to know if anyone else has the same results with gstreamer + totem, and also with rhythmbox. 
Comment 14 foser (RETIRED) gentoo-dev 2004-10-18 11:33:31 UTC
giving this up, general gst issues

@ comment 13 : current versions in portage are known not to work well, that is why gstreamer is not the default backend for totem.