Sound cuts out in some specific applications

Bug #605827 reported by Alistair Buxton
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

After a program which makes sound has been running for minutes to hours, the pulse sound sink eventually stops accepting new data. The problem only affects a specific set of applications: wine, virtualbox, and very rarely flash (which I rarely run long enough for it to be affected.)

The symptoms seen vary depending on the application. Applications running in Wine will completely stop outputting sound. The do not just stop producing sound from the speakers, they stop producing any sound at all because the sink is blocking. The sound sink still shows up in sound preferences and is not muted, but will not accept further audio.

When the problem happens with virtualbox it seems that virtualbox itself recovers but passes the error through to it's virtual soundcard. All applications inside virtualbox will now stop producing audio and crash or otherwise behave strangely. Restarting the apps *inside* virtualbox (but not virtualbox itself) and they will start making sound again.

When the problem happens, pulseaudio daemon does not output any debugging information at all. (even with --log-level=debug) It does not even log that the sink changed state in any way. It does not log an underrun or that the sink was closed.

The problem usually only affects one application at a time. Other applications are able to continue playing sound. After pulseaudio has just been restarted the error will not show up for a few hours but after pulse has been running for a few days, all affected applications will freeze after playing one buffer worth of sound data every single time, no matter how many times you restart that particular app. When that happens I have to restart pulseaudio in order for these apps to make more than 0.2 seconds of sound again.

This problem does not happen with vanilla kernels, both older and newer than affected Lucid (and Karmic) kernels. The problem seems to either happen under high CPU load conditions, or itself causes a CPU load spike. It happens both with and without the cpu-limit = no option to pulse. Another clue is that virtualbox, wine, flash etc are all running 32 bit and I have a 64 bit system, so that could be involved somehow. Also all the affected programs use ALSA plug in.

Advice on how to debug this would be appreciated, since I can't get anything useful from any of the involved programs regarding why they can no longer write to the sink.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: linux-image-2.6.32-23-generic 2.6.32-23.37
Regression: Yes
Reproducible: No
ProcVersionSignature: Ubuntu 2.6.32-23.37-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-23-generic x86_64
NonfreeKernelModules: nvidia
AlsaVersion:
 Advanced Linux Sound Architecture Driver Version 1.0.23.
 Compiled on Jun 14 2010 for kernel 2.6.32-23-generic (SMP).
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: SB [HDA ATI SB], device 0: VT1708S Analog [VT1708S Analog]
   Subdevices: 1/2
   Subdevice #0: subdevice #0
   Subdevice #1: subdevice #1
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'SB'/'HDA ATI SB at 0xf9ff4000 irq 16'
   Mixer name : 'VIA VT1708S'
   Components : 'HDA:11060397,1043836c,00100000'
   Controls : 38
   Simple ctrls : 22
Card1.Amixer.info:
 Card hw:1 'NVidia'/'HDA NVidia at 0xfbcfc000 irq 19'
   Mixer name : 'Nvidia GT240 HDMI'
   Components : 'HDA:10de000d,10de0101,00100100'
   Controls : 16
   Simple ctrls : 4
Date: Thu Jul 15 11:06:32 2010
Frequency: Once a day.
HibernationDevice: RESUME=UUID=bdef25ff-56b0-4e0a-abf9-2cf62176f3d4
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
MachineType: System manufacturer System Product Name
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-23-generic root=UUID=22e9f849-0bd5-4f9f-9021-f69e2b3433ae ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_GB.utf8
 SHELL=/bin/bash
RelatedPackageVersions: linux-firmware 1.34.1
RfKill:
 0: hci0: Bluetooth
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
WifiSyslog:
 Jul 15 08:32:02 al-desktop kernel: [645189.857411] device eth0 entered promiscuous mode
 Jul 15 09:14:25 al-desktop kernel: [647733.327747] npviewer.bin[4239]: segfault at 30 ip 00000000f5eef00d sp 00000000ff843a40 error 4 in libflashplayer.so[f5e96000+b04000]
 Jul 15 09:24:26 al-desktop kernel: [648334.401257] device eth0 left promiscuous mode
dmi.bios.date: 11/25/2009
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0704
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: M4A79XTD EVO
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev X.0X
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0704:bd11/25/2009:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnM4A79XTDEVO:rvrRevX.0X:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Attaching logs. They don't seem to show much of interest. Generated with pulseaudio log-level=debug and WINEDEBUG=warn+all

Revision history for this message
salimfadhley (salimfadhley) wrote :

Did you ever get a solution for this? This identically matches my own observed symptoms. VIA VT1708S on Karmic 64bit.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

This is still happening. I have recently noticed something new though: Sound cuts out in WIne apps when pidgin makes a sound. It does not happen every time. It seems to happen if Pidgin has not made a sound for a while. It's noteworthy because Pidgin does not hold the PA device open but opens it on demand and closes after the sound finishes playing. I also still see cut outs when changing volume (but again not always) and during CPU/IO load spikes (loading up programs, starting a large compile etc).

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Still happening. There seems to be a pattern related to USB activity: doing a large transfer to USB disk can cause the error. My onboard, HDA, sound card shares an interrupt with the USB controller. So I suspect that heavy USB activity can cause some kind of under- or overrun, or other error involving IRQs, and these buggy programs are not able to correctly recover.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Here is an example program which demonstrates the bug. To compile, install mingw32 package and build like this:

i586-mingw32msvc-gcc -o soundtest.exe soundtest.c -lwinmm

You need to supply a test.wav too, in the same directory.

When this program is run it plays test.wav on a loop. I have never got past 28 plays before PlaySound() hangs.

Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
penalvch (penalvch) wrote :

Alistair Buxton, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? Can you try with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/ .

If it remains an issue, could you run the following command in the development release from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux <replace-with-bug-number>

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.

Please let us know your results. Thanks in advance.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.