pulseaudio sometimes pauses playback for 5 seconds

Bug #319118 reported by Martin Vysny
30
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Binary package hint: pulseaudio

Pulseaudio randomly pauses for about 5-6 seconds, then continues the playback normally. Sometimes, it simply dies. It seems that this happens more frequently on higher CPU/disk load. I have a fully upgraded jaunty x86-32, pulseaudio-0.9.13-2ubuntu6. This is the console:

$ pulseaudio
I: caps.c: Limited capabilities successfully to CAP_SYS_NICE.
I: caps.c: Dropping root priviliges.
I: caps.c: Limited capabilities successfully to CAP_SYS_NICE.
N: main.c: Called SUID root and real-time and/or high-priority scheduling was requested in the configuration. However, we lack the necessary privileges:
N: main.c: We are not in group 'pulse-rt', PolicyKit refuse to grant us the requested privileges and we have no increase RLIMIT_NICE/RLIMIT_RTPRIO resource limits.
N: main.c: For enabling real-time/high-priority scheduling please acquire the appropriate PolicyKit privileges, or become a member of 'pulse-rt', or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits for this user.
N: module-alsa-sink.c: Increasing wakeup watermark to 40.00 ms
N: module-alsa-sink.c: Increasing wakeup watermark to 80.00 ms
E: alsa-util.c: snd_pcm_avail_update() returned a value that is exceptionally large: 4227800280 bytes (7989040 ms) Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers.
N: module-alsa-sink.c: Increasing wakeup watermark to 120.34 ms
E: alsa-util.c: snd_pcm_avail_update() returned a value that is exceptionally large: 5017992 bytes (9482 ms) Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers.
E: alsa-util.c: snd_pcm_avail_update() returned a value that is exceptionally large: 4227794844 bytes (7989030 ms) Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers.
E: alsa-util.c: snd_pcm_avail_update() returned a value that is exceptionally large: 4989600 bytes (9428 ms) Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers.
Soft CPU time limit exhausted, terminating.
E: cpulimit.c: Recevied request to terminate due to CPU overload.

There is a thread discussing similar issue: http://forums.fedoraforum.org/showthread.php?t=208838 - perhaps it is related?
Thanks!

Revision history for this message
Daniel T Chen (crimsun) wrote :

Does changing the load-module line in /etc/pulse/default.pa as follows alleviate the symptom? (You'll need to log out and back in.)

load-module module-hal-detect tsched=0

Changed in pulseaudio:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Martin Vysny (vyzivus) wrote :

I would say that the behavior changes. When I try to play a 6-channel video the sound becomes choppy (not a CPU issue as the CPU is used for about 80%) and pulseaudio prints the following error messages:

E: module-alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write! Most likely this is an ALSA driver bug. Please report this issue to the ALSA developers. We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail_update() returned 0.

When I remove the "tsched=0" thing the messages disappear and the sound is back to normal. However, this problem does not manifest when simply playing a simple stereo mp3 file. I am unable to reproduce the original bug, either with or without the "tsched=0" setting.

Daniel T Chen (crimsun)
Changed in pulseaudio:
status: Incomplete → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 0.9.14-0ubuntu6

---------------
pulseaudio (0.9.14-0ubuntu6) jaunty; urgency=low

  * 0004_disable_autospawn.patch: Disable this patch. Doing so
    allows the daemon to spawn if not already running, which
    works around LP: #191027, #204272
  * 0012_clarify_driver_error_redirect_to_alsa_devs.patch:
    - Only log POLL* being set if tsched is used so that syslog
      isn't filled with innocuous messages when we set tsched=0
      (see 0030 below) (LP: #323712),
    - Hint 'linux' source package instead of 'alsa-driver' for
      Launchpad bug reports,
    - The debug-specific portion is only applicable to 0.9.14;
      0.9.15 enables a rate limiting module by default to work
      around this (and other) issues
  * 0029_fix_suspend_on_idle_null_race.patch: Handle sink case,
    too
  * 0030_set_tsched0.patch: Work around a shedload of (driver)
    bugs by falling back to interrupt-based buffer semantics
    (LP: #190754, #292880, #295519, #298494, #301755, #302964,
     LP: #319118, #323976, #324103, #326205, #326864)
  * Backport fixes from git HEAD:
    - 0031_fix_6chan_map.patch,
    - 0032_reinit_proplist.patch,
    - 0033_fix_pa-gcc-packedmalloc.patch,
    - 0034_bt_fixes.patch
  * Make invoking the stop target in the initscript not fail an
    upgrade (LP: #317921)
  * Previous upload (0.9.14-0ubuntu3) fixed LP: #321357
  * 01PulseAudio: use sudo -H to ensure that $HOME is, in fact,
    the user's when invoking pacmd for suspend/resume

 -- Daniel T Chen <email address hidden> Sun, 15 Feb 2009 02:35:26 -0500

Changed in pulseaudio:
status: Fix Committed → Fix Released
Revision history for this message
Wade Menard (wade-ezri) wrote :

This appears to still be an issue. With or without tsched=0 pulseaudio dies or stalls consistently for me, though not always with the same files.

E: alsa-util.c: snd_pcm_avail_update() returned a value that is exceptionally large: 13835058055282160256 bytes (418293516391 ms) Most likely this is a Linux bug. Please report this issue to the ALSA developers.
I: module-alsa-sink.c: Underrun!
Soft CPU time limit exhausted, terminating.
Hard CPU time limit exhausted, terminating forcibly.
Aborted

That /is/ an amusing large value... This actually just started happening within the last week or two (jaunty updated daily)

00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)

Changed in pulseaudio:
status: Fix Released → In Progress
Wade Menard (wade-ezri)
Changed in pulseaudio:
status: In Progress → Confirmed
Revision history for this message
billy shears (billy-shears) wrote :

I'm affected too by this bug, the updates did not solve it, and I can confirm that it started to happen about a couple of weeks ago.

VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)

Revision history for this message
Ivan Stetsenko (stetzen) wrote :

I'm affected too with

 pulseaudio 0.9.14-0ubuntu7

and

 Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)

Revision history for this message
Hew (hew) wrote :

Pulseaudio uses 100% CPU at the time of the freeze, and all sound applications (rhythmbox, totem, firefox with flash, etc) become unresponsive.

pulseaudio 0.9.14-0ubuntu8

alsa-util.c: snd_pcm_avail_update() returned a value that is exceptionally large: 13835058055282162564 bytes (418293516404 ms) Most likely this is a Linux bug. Please report this issue to the ALSA developers.
main.c: Called SUID root and real-time and/or high-priority scheduling was requested in the configuration. However, we lack the necessary privileges:
main.c: We are not in group 'pulse-rt', PolicyKit refuse to grant us the requested privileges and we have no increase RLIMIT_NICE/RLIMIT_RTPRIO resource limits.
main.c: For enabling real-time/high-priority scheduling please acquire the appropriate PolicyKit privileges, or become a member of 'pulse-rt', or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits for this user.
pid.c: Stale PID file, overwriting.

Changed in pulseaudio:
importance: Low → Medium
Revision history for this message
stricte (stricte) wrote :

the same bug.

jaunty - last updates

pulseaudio 0.9.14-0ubuntu9
alsa-base 1.0.18.dfsg-1ubuntu3

system freeze during this sth about 5-8 seconds behaviour

Revision history for this message
Wormhole (fabio-iannone) wrote :

Could be firestarter the cause of this problem?

I haven't tried it yet, but this one could be a possible solution, because If you have firestarter installed, it *WILL* stop PulseAudio from properly communicating over Zeroconf/Avahi's port 5353.

How to Fix:

gksudo gedit /etc/firestarter/user-pre

In the file, add the following lines:

$IPT -A INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
$IPT -A OUTPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT

Then, save and close the file, and then type:

/etc/init.d/avahi-daemon restart

what do you about it? am i dreamer? :-D

PS: i have found this solution here https://wiki.ubuntu.com/PulseAudio

Revision history for this message
Anton Lindström (hlewagastir) wrote :

I got this as well. Pulseaudio uses 100% CPU for a few seconds and all sound playback stops.

I don't have firestarter installed, so unfortunately that can't be the solution...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.