Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 289563 - X server crashes bringing system down when streaming audio-video content over internet
Summary: X server crashes bringing system down when streaming audio-video content over...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High critical (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-18 10:26 UTC by Mikayel Grigoryan
Modified: 2010-03-08 11:30 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 Mikayel Grigoryan 2009-10-18 10:26:17 UTC
This issue seems to be ever-lasting on my laptop hp compaq nx6125. For few year I experienced system crashes when listening to audio. Symptoms vary but here is how I understand it:
1. It almost always happens when I listen to audio over internet or video over internet using USB headphones (Plantronics DSP 300).
 a. sometimes it crashes when I listen to mp3, flac files but that happens quite rarely. Different programs were used for playback, mostly mplayer but also amarok.
 b. Previously system stood more or less alive after crash. Before xorg-server 1.6 just playback stopped and syslog outputs were:
 "N URBS still active" where N could be 2 4 6 or 8. Then system failed to shut down cleanly, with hard disk running recovery after reboot, although processes were shut down and system were brought down with routine shutdown procedures. Other symptoms of crash were, that I could not stop alsasound process it was hanging making active shell unusable. Sometimes "ps" command would fail. I were not able to remove "snd_usb_audio module", message would say that module is still in use.
 c. Now, with xorg-server 1.6 this bug became even worse, system just hangs and all I can do is simply bring it down keeping power-off button long enough to switch-off the laptop. Overall performance of X server is improved with xorg-server 1.6 but this bug became really impossible to bear.
2. Now, I can't say how much this is related to what I specified in 1, but system hangs sometimes when browsing some AJAX-ised pages with Opera and FF browsers. Again all I can do is to hard-switch-off laptop.

having said that all I suspect that wither ALSA is buggy or my networking driver or relevant kernel code.

Please, help me get rid of this issue. I see that problem specification is too vague. I would appreciate recommendations on how to trace, debug the issue to bring more solid evidence.

Reproducible: Always

Steps to Reproduce:
1. mplayer http://mp3.nashe.ru/nashe-192
2. wait 30 minutes max.
3.

Actual Results:  
Total system hang, only power-off is possible.

Expected Results:  
keep or audio-video streaming ordinarily.

This happens for already 4 years with kernels starting 2.6.20 to 2.6.31. Similarly it happened on "HP nc 6220" based no intel chipset running "Debian Linux 5.x." again USB headphones were Plantronics DSP 300.
Surprisingly it never happens under liveCD, I tested few times keeping audio-streaming for 1 hour and nothing crashed.
Comment 1 Mikayel Grigoryan 2009-10-18 10:26:35 UTC
Portage 2.1.6.13 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.30.9 x86_64)
=================================================================
System uname: Linux-2.6.30.9-x86_64-AMD_Turion-tm-_64_Mobile_ML-34-with-gentoo-1.12.11.1
Timestamp of tree: Sat, 17 Oct 2009 06:30:01 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1"
LINGUAS="ru"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt dbus dri dts dvd dvdr eds emboss encode evo fam firefox flac fortran gdbm gif gnome gpm gstreamer gtk hal iconv isdnlog jpeg kde libnotify mad mikmod mmx modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd thunar tiff truetype unicode usb vorbis x264 xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" USERLAND="GNU" VIDEO_CARDS="radeon fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 2 Mikayel Grigoryan 2009-10-18 11:07:42 UTC
Portage 2.1.6.13 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.30.9 x86_64)
=================================================================
System uname: Linux-2.6.30.9-x86_64-AMD_Turion-tm-_64_Mobile_ML-34-with-gentoo-1.12.11.1
Timestamp of tree: Sat, 17 Oct 2009 06:30:01 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1"
LINGUAS="ru"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt dbus dri dts dvd dvdr eds emboss encode evo fam firefox flac fortran gdbm gif gnome gpm gstreamer gtk hal iconv isdnlog jpeg kde libnotify mad mikmod mmx modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd thunar tiff truetype unicode usb vorbis x264 xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" USERLAND="GNU" VIDEO_CARDS="radeon fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 Wormo (RETIRED) gentoo-dev 2009-10-26 01:55:34 UTC
This sounds like the sound driver's fault, and your X server is just an innocent victim. X server handling of devices has been changing, so that might explain why it happens to be more affected by the kernel corruption. Symptoms of kernel corruption can be very complex, and it is better to try to get rid of it than try to figure out why it acts differently when you change other conditions (such as a different X server).

Troubleshooting suggestion:

* Get hold of a different USB sound device, and see if it can stream reliably

If everything is ok with different USB sound hardware, then the problem is with either the USB sound driver not being able to cope with some quirk in the plantronics headphone, or your specific hardware is flaky (I'm assuming you only have one plantronics headphone which has been involved in all the crashes). Alsa devs might be able to help you track down this problem.

Supposing you still managed to crash with the other USB sound device, then perhaps there is something else compiled into your kernel that interacts badly with alsa; it would then be worth running longer with the liveCD to see if it really behaves properly. If the liveCD works really well, you could build a kernel that matches its config and see if that works too.
Comment 4 Mikayel Grigoryan 2009-11-14 09:59:01 UTC
(In reply to comment #3)
> This sounds like the sound driver's fault, and your X server is just an
> innocent victim. X server handling of devices has been changing, so that might
> explain why it happens to be more affected by the kernel corruption. Symptoms
> of kernel corruption can be very complex, and it is better to try to get rid of
> it than try to figure out why it acts differently when you change other
> conditions (such as a different X server).
> 
> Troubleshooting suggestion:
> 
> * Get hold of a different USB sound device, and see if it can stream reliably
> 
> If everything is ok with different USB sound hardware, then the problem is with
> either the USB sound driver not being able to cope with some quirk in the
> plantronics headphone, or your specific hardware is flaky (I'm assuming you
> only have one plantronics headphone which has been involved in all the
> crashes). Alsa devs might be able to help you track down this problem.
> 
> Supposing you still managed to crash with the other USB sound device, then
> perhaps there is something else compiled into your kernel that interacts badly
> with alsa; it would then be worth running longer with the liveCD to see if it
> really behaves properly. If the liveCD works really well, you could build a
> kernel that matches its config and see if that works too.
> 

I can confirm that it crashes on different Plantronics DSP 300 handsets, I tested 2-3 of them and they all break system. At the moment I do not have other sound usb devices at hand for testing, but I recall that it also crashes when I streamed audio WITHOUT starting X server, just tuning internet radio over mplayer.
Hmm... that's the hard part to make my settings like those of LiveCD. Firstl, I have to find liveCD with my kernel and alsa version.
Comment 5 Wormo (RETIRED) gentoo-dev 2009-11-24 08:02:00 UTC
Actually, I would go about it the other way around -- give the version of kernel and alsa on your working liveCD a try, even if it is a bit older than your current system. After you get a stable .config, you should be able to copy it to your newer kernel and update it with 'make oldconfig'.
Comment 6 Patrick Lauer gentoo-dev 2010-01-10 01:25:29 UTC
Not much we can do - reopen if you have a reproducable testcase.
Comment 7 Patrick Lauer gentoo-dev 2010-01-10 01:25:51 UTC
uff, wanted to RESO TEST-REQUEST
Comment 8 Mikayel Grigoryan 2010-01-10 09:37:17 UTC
(In reply to comment #7)
> uff, wanted to RESO TEST-REQUEST
> 

I shall try to collect more such data using liveCD, then copy that config to my Gentoo kernel setup and see if that still crashes.
When I have more such evidences we can re-open it later.
Thanks.
Comment 9 Mikayel Grigoryan 2010-03-08 11:30:35 UTC
Since I switched to XAA in xorg.conf crashes stopped. Watched many hours of video content and it was working without errors.

Option "AccelMethod" "XAA"
before it was
Option "AccelMethod" "EXA".