pa_stream_writable_size() failed: Connection terminated errors not caught by apport

Bug #532586 reported by David Nielsen
158
This bug affects 32 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Confirmed
Undecided
Unassigned
pulseaudio (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: pulseaudio

I have a 100% reproducable situation where in opening and playing an .avi file in totem causes a "pa_stream_writable_size() failed: Connection terminated" error. However this is not caught by apport and thus is hard to report correctly. It would be nice if future enhancements included apport hooks for such problems.

ProblemType: Bug
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.21.
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: david 6688 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'NVidia'/'HDA NVidia at 0xfae78000 irq 20'
   Mixer name : 'Nvidia MCP7A HDMI'
   Components : 'HDA:10ec0662,10250222,00100101 HDA:10de0007,10de0101,00100100'
   Controls : 23
   Simple ctrls : 11
Card1.Amixer.info:
 Card hw:1 'U0x41e0x4058'/'Creative Labs USB Device 0x41e:0x4058 at usb-0000:00:04.1-3, high speed'
   Mixer name : 'USB Mixer'
   Components : 'USB041e:4058'
   Controls : 3
   Simple ctrls : 2
Date: Fri Mar 5 13:06:09 2010
DistroRelease: Ubuntu 10.04
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
NonfreeKernelModules: nvidia
Package: pulseaudio 1:0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu11 [modified: usr/bin/pulseaudio usr/lib/libpulsecore-0.9.21.so]
ProcEnviron:
 LANG=da_DK.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
SourcePackage: pulseaudio
Uname: Linux 2.6.32-15-generic x86_64

Revision history for this message
David Nielsen (davidnielsen-deactivatedaccount) wrote :
Revision history for this message
Daniel T Chen (crimsun) wrote :

Please attach both valgrind and massif outputs.

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
Revision history for this message
David Nielsen (davidnielsen-deactivatedaccount) wrote :

I would love some instructions on how to get the correct output.

Revision history for this message
A. Tombol (atombol) wrote :

i get this error all the time with exaile and rhythmbox too

Revision history for this message
A. Tombol (atombol) wrote :

this bug annoys me a lot. i've got these pa_stream_writable_size() failed freezes very often, from 30 seconds to 10 minutes, but it comes back over and over again. I can't listen normally to music anymore. it happens in exaile and rhythmbox too. youtube also loses sound, but there's no pulse error window.

i created the valgrind log with
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --log-file=valgrind.log pulseaudio -vvvv

and pulseverbose log with
LANG=C pulseaudio -vvvv > ~/pulseverbose.log 2>&1

massif didn't give any output for me (maybe i did it wrong, couldn't find much info) i tried it with
valgrind --tool=massif --depth=5 --alloc-fn=g_malloc --alloc-fn=g_realloc --alloc-fn=g_try_malloc --alloc-fn=g_malloc0 --alloc-fn=g_mem_chunk_alloc pulseaudio

i attach lspci -vvnn too
Daniel, please reply if you still need something for this to be confirmed

Revision history for this message
A. Tombol (atombol) wrote :
Revision history for this message
A. Tombol (atombol) wrote :
Revision history for this message
A. Tombol (atombol) wrote :

something is fundamentally wrong here. Audacious2 with Alsa output is freezing the sound too. OSS is working fine though.

A. Tombol (atombol)
tags: added: regression-potential
Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 532586] Re: pa_stream_writable_size() failed: Connection terminated errors not caught by apport

This isn't a PulseAudio issue, a.tom. Use
linux-alsa-driver-modules-$(uname -r) from ppa:ubuntu-audio-dev

Revision history for this message
A. Tombol (atombol) wrote :

"This isn't a PulseAudio issue"

i realized, as i wrote it above, and that's why i added the alsa-driver package as affected.
i tried the driver-modules from the ppa you mentioned, but it haven't fixed the problem.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 532586] Re: pa_stream_writable_size() failed: Connection terminated errors not caught by apport

a.tom, that isn't what I'm referring to. Please don't open tasks for bugs that you didn't file. You should file a separate bug report against alsa-driver, and test if using position_fix=1 works around the problem:

I.e., options snd-hda-intel position_fix=1

should appear in /etc/modprobe.d/alsa-base.conf.

Changed in alsa-driver (Ubuntu):
status: New → Incomplete
tags: removed: regression-potential
Revision history for this message
Bernat (berarma) wrote :

I'm having this problem playing videos with Totem on a HP Mini 210-1010ES, I haven't tried other media. It might be a gstreamer bug since VLC plays fine.

Console output:
** Message: Error: pa_stream_writable_size() failed: Conexión finalizada
pulsesink.c(1386): gst_pulseringbuffer_commit (): /GstPlayBin2:play/GstPlaySink:playsink0/GstBin:abin/GstBin:audiosinkbin/GstGConfAudioSink:audio-sink/GstBin:bin2/GstAutoAudioSink:autoaudiosink1/GstPulseSink:autoaudiosink1-actual-sink-pulse

Revision history for this message
Bernat (berarma) wrote :

I understand this bug targets the reporting problem, and bug 567165 targets the actual error.

Revision history for this message
Matt Zimmerman (mdz) wrote :

I can reliably reproduce this situation, both the problem itself, being that pulseaudio dies, and the fact that apport does not notice.

The reason for the latter is that pulseaudio is being killed with SIGKILL(!):

recvmsg(21, {msg_name(0)=NULL, msg_iov(1)=[{"\0\0\0\30\377\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0", 20}], msg_controllen=24, {cmsg_len=24, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS{pid=14140, uid=1000, gid=1000}}, msg_flags=0}, 0) = 20
ppoll([{fd=4, events=POLLIN}, {fd=21, events=POLLIN}, {fd=10, events=POLLIN}, {fd=7, events=POLLIN}, {fd=23, events=POLLIN}, {fd=30, events=POLLIN}, {fd=34, events=POLLIN}, {fd=33, events=POLLIN}, {fd=32, events=POLLIN}, {fd=31, events=POLLIN|POLLERR|POLLHUP}, {fd=31, events=0}, {fd=24, events=POLLIN}, {fd=27, events=POLLIN}, {fd=17, events=POLLIN}, {fd=20, events=POLLIN}, {fd=16, events=POLLIN|POLLERR|POLLHUP}, {fd=16, events=0}, {fd=15, events=POLLIN}, {fd=14, events=POLLIN}, {fd=8, events=POLLIN}], 20, NULL, NULL, 8) = 1 ([{fd=21, revents=POLLIN}])
recvmsg(21, {msg_name(0)=NULL, msg_iov(1)=[{"L\0\0\0\16L\0\0\0NL\0\0\0\1TK\336\220\203\0\3D\203", 24}], msg_controllen=24, {cmsg_len=24, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS{pid=14140, uid=1000, gid=1000}}, msg_flags=0}, 0) = 24
read(17, "\1\0\0\0\0\0\0\0", 8) = 8
read(17, "\1\0\0\0\0\0\0\0", 8) = 8
read(17, "\1\0\0\0\0\0\0\0", 8) = 8
read(17, "\1\0\0\0\0\0\0\0", 8) = 8
read(17, "\1\0\0\0\0\0\0\0", 8) = 8
read(17, "\1\0\0\0\0\0\0\0", 8) = 8
read(17, "\1\0\0\0\0\0\0\0", 8) = 8
read(17, "\1\0\0\0\0\0\0\0", 8) = 8
read(17, "\1\0\0\0\0\0\0\0", 8) = 8
futex(0x83d66a8, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
+++ killed by SIGKILL +++

Revision history for this message
Matt Zimmerman (mdz) wrote :

position_fix=1 as mentioned in comment #11 makes no difference for me: the crash happens in the same way.

There's a hint as to the origin of the SIGKILL here: http://www.pubbs.net/201002/kernel/41719-stupid-futex-question-2633-rc7-mmotm0210.html

i.e. that pulseaudio is running with RLIMIT_RTTIME and exceeds its CPU bound.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Here is the last bit of output from pulseaudio -v:

I: sink-input.c: Created input 1 "Playback Stream" on alsa_output.pci-0000_00_1b.0.analog-stereo with sample spec float32le 6ch 48000Hz and channel map lfe,front-left,front-center,front-right,rear-left,rear-right
I: sink-input.c: media.name = "Playback Stream"
I: sink-input.c: application.name = "Totem Movie Player"
I: sink-input.c: native-protocol.peer = "UNIX socket client"
I: sink-input.c: native-protocol.version = "16"
I: sink-input.c: media.role = "video"
I: sink-input.c: application.process.id = "14444"
I: sink-input.c: application.process.user = "mdz"
I: sink-input.c: application.process.host = "braukoff"
I: sink-input.c: application.process.binary = "totem"
I: sink-input.c: application.icon_name = "totem"
I: sink-input.c: window.x11.display = ":0.0"
I: sink-input.c: application.language = "en_US.UTF-8"
I: sink-input.c: application.process.machine_id = "6afc1dfc236ebd7466be0dc74b9ebf93"
I: sink-input.c: application.process.session_id = "6afc1dfc236ebd7466be0dc74b9ebf93-1271941892.814229-1193264960"
I: sink-input.c: module-stream-restore.id = "sink-input-by-media-role:video"
I: protocol-native.c: Requested tlength=200.00 ms, minreq=10.00 ms
I: protocol-native.c: Final latency 200.00 ms = 90.00 ms + 2*10.00 ms + 90.00 ms
W: asyncq.c: q overrun, queuing locally
W: asyncq.c: q overrun, queuing locally
W: asyncq.c: q overrun, queuing locally
W: asyncq.c: q overrun, queuing locally
W: asyncq.c: q overrun, queuing locally
W: asyncq.c: q overrun, queuing locally
W: asyncq.c: q overrun, queuing locally
W: asyncq.c: q overrun, queuing locally
W: asyncq.c: q overrun, queuing locally
W: asyncq.c: q overrun, queuing locally
W: asyncq.c: q overrun, queuing locally
zsh: killed pulseaudio --start --daemon=false -v

Revision history for this message
Matt Zimmerman (mdz) wrote :

There are similar symptoms reported in bug 367671

Changed in pulseaudio (Ubuntu):
status: Incomplete → Confirmed
Changed in alsa-driver (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Juan Manuel Pereyra (jmpereyra) wrote :
Download full text (4.7 KiB)

I don't know if this will help at all but this is what cat /var/log/syslog | grep pulseaudio outputs (special lines marked with => and explained below):

=> May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: snd_pcm_delay() devolvió un valor que es excepcionalmente grande: 384788 bytes (2181 ms).
=> May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: Lo más probable es que sea un error del controlador ALSA «snd_cmipci». Por favor, informe esto a los desarrolladores de ALSA.
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: snd_pcm_dump():
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: Hooks PCM
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: Its setup is:
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: stream : PLAYBACK
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: access : MMAP_INTERLEAVED
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: format : S16_LE
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: subformat : STD
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: channels : 2
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: rate : 44100
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: exact rate : 44100 (44100/1)
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: msbits : 16
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: buffer_size : 16384
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: period_size : 8192
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: period_time : 185759
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: tstamp_mode : ENABLE
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: period_step : 1
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: avail_min : 15503
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: period_event : 0
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: start_threshold : -1
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: stop_threshold : 1073741824
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: silence_threshold: 0
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: silence_size : 0
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: boundary : 1073741824
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: Slave: Hardware PCM card 0 'C-Media CMI8738' device 2 subdevice 0
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: Its setup is:
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: stream : PLAYBACK
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: access : MMAP_INTERLEAVED
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: format : S16_LE
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: subformat : STD
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: channels : 2
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: rate : 44100
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: exact rate : 44100 (44100/1)
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: msbits : 16
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: buffer...

Read more...

Revision history for this message
GuyR (guy-rouger) wrote :

@ubuntu-desktop:~$ lsb_release -a
LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch:cxx-3.0-ia32:cxx-3.0-noarch:cxx-3.1-ia32:cxx-3.1-noarch:cxx-3.2-ia32:cxx-3.2-noarch:cxx-4.0-ia32:cxx-4.0-noarch:desktop-3.1-ia32:desktop-3.1-noarch:desktop-3.2-ia32:desktop-3.2-noarch:desktop-4.0-ia32:desktop-4.0-noarch:graphics-2.0-ia32:graphics-2.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch:graphics-3.1-ia32:graphics-3.1-noarch:graphics-3.2-ia32:graphics-3.2-noarch:graphics-4.0-ia32:graphics-4.0-noarch:languages-3.2-ia32:languages-3.2-noarch:languages-4.0-ia32:languages-4.0-noarch:multimedia-3.2-ia32:multimedia-3.2-noarch:multimedia-4.0-ia32:multimedia-4.0-noarch:printing-3.2-ia32:printing-3.2-noarch:printing-4.0-ia32:printing-4.0-noarch:qt4-3.1-ia32:qt4-3.1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 10.04 LTS
Release: 10.04
Codename: lucid
@ubuntu-desktop:~$ uname -a
Linux ubuntu-desktop 2.6.32-22-generic-pae #33-Ubuntu SMP Wed Apr 28 14:57:29 UTC 2010 i686 GNU/Linux

occurs when playing commercial DVD with Totem

May 9 18:23:00 localhost pulseaudio[2750]: alsa-util.c: snd_pcm_delay() a retourné une valeur qui est exceptionnellement large : 3528256 octets (10000 ms).
May 9 18:23:00 localhost pulseaudio[2750]: alsa-util.c: Il s'agit très probablement d'un bogue dans le pilote ALSA « snd_hda_intel ». Veuillez rapporter ce problème aux développeurs d'ALSA.
May 9 18:23:00 localhost pulseaudio[2750]: alsa-util.c: snd_pcm_dump():
May 9 18:23:00 localhost pulseaudio[2750]: alsa-util.c: Soft volume PCM
May 9 18:23:00 localhost pulseaudio[2750]: alsa-util.c: Control: PCM Playback Volume

Revision history for this message
bserviss (thebserviss) wrote :

I just did a fresh install of Xubuntu 10.04 and am getting this error as well.

uname -a
Linux julie-toy 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:27:30 UTC 2010 i686 GNU/Linux

Running pulseaudio in a terminal gives this:

E: alsa-util.c: snd_pcm_avail() returned a value that is exceptionally large: 4294952016 bytes (24347800 ms).
E: alsa-util.c: Most likely this is a bug in the ALSA driver 'snd_cmipci'. Please report this issue to the ALSA developers.
E: alsa-util.c: snd_pcm_dump():
E: alsa-util.c: Hardware PCM card 0 'C-Media CMI8738' device 0 subdevice 0
E: alsa-util.c: Its setup is:
E: alsa-util.c: stream : PLAYBACK
E: alsa-util.c: access : MMAP_INTERLEAVED
E: alsa-util.c: format : S16_LE
E: alsa-util.c: subformat : STD
E: alsa-util.c: channels : 2
E: alsa-util.c: rate : 44100
E: alsa-util.c: exact rate : 44100 (44100/1)
E: alsa-util.c: msbits : 16
E: alsa-util.c: buffer_size : 16384
E: alsa-util.c: period_size : 8192
E: alsa-util.c: period_time : 185759
E: alsa-util.c: tstamp_mode : ENABLE
E: alsa-util.c: period_step : 1
E: alsa-util.c: avail_min : 15503
E: alsa-util.c: period_event : 0
E: alsa-util.c: start_threshold : -1
E: alsa-util.c: stop_threshold : 1073741824
E: alsa-util.c: silence_threshold: 0
E: alsa-util.c: silence_size : 0
E: alsa-util.c: boundary : 1073741824
E: alsa-util.c: appl_ptr : 6000369
E: alsa-util.c: hw_ptr : 5980165
E: alsa-util.c: snd_pcm_delay() returned a value that is exceptionally large: 398112 bytes (2256 ms).
E: alsa-util.c: Most likely this is a bug in the ALSA driver 'snd_cmipci'. Please report this issue to the ALSA developers.
E: alsa-util.c: snd_pcm_dump():
E: alsa-util.c: Hardware PCM card 0 'C-Media CMI8738' device 0 subdevice 0
E: alsa-util.c: Its setup is:
E: alsa-util.c: stream : PLAYBACK
E: alsa-util.c: access : MMAP_INTERLEAVED
E: alsa-util.c: format : S16_LE
E: alsa-util.c: subformat : STD
E: alsa-util.c: channels : 2
E: alsa-util.c: rate : 44100
E: alsa-util.c: exact rate : 44100 (44100/1)
E: alsa-util.c: msbits : 16
E: alsa-util.c: buffer_size : 16384
E: alsa-util.c: period_size : 8192
E: alsa-util.c: period_time : 185759
E: alsa-util.c: tstamp_mode : ENABLE
E: alsa-util.c: period_step : 1
E: alsa-util.c: avail_min : 15503
E: alsa-util.c: period_event : 0
E: alsa-util.c: start_threshold : -1
E: alsa-util.c: stop_threshold : 1073741824
E: alsa-util.c: silence_threshold: 0
E: alsa-util.c: silence_size : 0
E: alsa-util.c: boundary : 1073741824
E: alsa-util.c: appl_ptr : 6079749
E: alsa-util.c: hw_ptr : 5980221

Revision history for this message
follencavale (follencavale) wrote :

Hi there,
I have the exact same problem on Ubuntu 10.04.
I'm looking up for some advice.
I'll keep you updated

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

I am seeing this error too when playing AC3 files under Ubuntu 10.04 and Fedora 13 (so this an upstream issue in presumably something related to gstreamer or pulseaudio). Rumour has it that the issue may be linked to CPU usage.

Other possibly related bugs are Bug #554002, Bug #496616 and https://bugzilla.redhat.com/show_bug.cgi?id=583785 .

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

OK I have had a chance to do some light testing. This issue seems to occur when pulseaudio needs to do resampling and revolves around some resampling methods using too much CPU time.

On my 1Ghz EeePC 900, sampling methods that fail are:
copy
speex-float-[1-9]
speex-float-10
speex-fixed-*
src-sinc-*
auto

Methods that work are:
src-zero-order-hold
src-linear
trivial
speex-float-1
ffmpeg
peaks

Steps to reproduce the problem:
(You will need gstreamer-ugly)
1. Download
http://samples.mplayerhq.hu/A-codecs/AC3/Canyon-5.1-48khz-448kbit.ac3
2. Run
gst-launch-0.10 filesrc location=Broadway-5.1-48khz-448kbit.ac3 ! decodebin ! audioconvert ! audioresample ! pulsesink

Expected result:
To hear sound out of the speakers.

Actual result:
No sound, pulseaudio quits/is killed.

How reproducible is the problem?
It is reproducible every time.

Additional information:
Running
gst-launch-0.10 filesrc location=Broadway-5.1-48khz-448kbit.ac3 ! decodebin ! audioconvert ! audioresample ! audio/x-raw-int, rate=44100 ! pulsesink
doesn't produce a problem.

You can almost certainly reproduce the problem with a plain WAV like
http://samples.mplayerhq.hu/A-codecs/wavpcm/8_Channel_ID.wav
too.

The key seems to be multichannel sound that also needs to resampled. It should be noted that I also see a similar failure on an 2Ghz Intel Core 2 laptop.

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

I should add that it is possible to workaround the issue by running
echo "extra-arguments=--log-target=syslog --resample-method=ffmpeg" >> .pulse/client.conf
pulseaudio -k

Revision history for this message
John Bagley (bagley) wrote :

I tried the workaround and it did what I expected but did not fix my problem.
[CODE]
ls -al ~/.pulse/client.conf
-rw-r--r-- 1 jdb jdb 61 2010-06-02 08:42 /home/jdb/.pulse/client.conf

cat ~/.pulse/client.conf
extra-arguments=--log-target=syslog --resample-method=ffmpeg
[/CODE]

Audio still quits after a few minutes.

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

(Subscribing John Bagley to this bug so the reply is seen. Please add yourself to a bug when you comment so you see replies :)

John:
Hmm that file does seem to correctly show the change I suggested. Did you restart pulseaudio too (using pulseaudio -k)? Do you get any sound at all?

I guess my next question is did it make any difference at all and do you have a way of reproducing the issue? Is there a small sound sample that cause the problem? Is it limited to just one program? Are you using Ubuntu 10.04? If you use "trivial" instead of "ffmpeg" is it any better?

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 532586] Re: pa_stream_writable_size() failed: Connection terminated errors not caught by apport

Please note that several commenters may be conflating bugs due to
similarities in symptoms. This particular bug (from the original bug
reporter) seems to be exposed only through GStreamer and certain
resamplers, but there is insufficient indication from John's
description whether he's actually experiencing a sound driver bug.

John, have you tested the position_fix=1 workaround for your driver?
(I.e., append "options snd-hda-intel position_fix=1" to
/etc/modprobe.d/alsa-base.conf and reboot.)

Revision history for this message
John Bagley (bagley) wrote :

Sitsofe,

On Wed, Jun 2, 2010 at 1:35 PM, Sitsofe Wheeler <email address hidden> wrote:

> (Subscribing John Bagley to this bug so the reply is seen. Please add
> yourself to a bug when you comment so you see replies :)
>
> John:
> Hmm that file does seem to correctly show the change I suggested. Did you
> restart pulseaudio too (using pulseaudio -k)? Do you get any sound at all?
>

Yes, I did kill pulseaudio. I always hear the beginning of the sound file
but after a variable time (from 20 seconds to 10 minutes)

> I guess my next question is did it make any difference at all and do you
>

No difference

> have a way of reproducing the issue? Is there a small sound sample that
>

mp3 files tend to be about a megabyte per minute. I can send you a 5.7MB
file.

> cause the problem? Is it limited to just one program? Are you using
>

I get the same results using Rhythmbox 0.12.8 or Totem
Movie Player.

> Ubuntu 10.04? If you use "trivial" instead of "ffmpeg" is it any better?
>
> Yes, 10.04. I tried trivial. It made no difference.

> --
> pa_stream_writable_size() failed: Connection terminated errors not caught
> by apport
> https://bugs.launchpad.net/bugs/532586
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
John Bagley <email address hidden>
Naperville, Illinois 60540

Revision history for this message
Luke Yelavich (themuso) wrote :

I attempted to reproduce the problem with both Sitsofe Wheeler's procedures in comment 32, however I am unable to reproduce the problem on maverick, with the default pulse resampling method shipped in maverick. I may have missed someting, so will try again later on the same, and different hardware, but no killing pulseaudio so far in my testing. I will also try with lucid.

Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 532586] Re: pa_stream_writable_size() failed: Connection terminated errors not caught by apport

On Fri, Jul 23, 2010 at 02:40:22PM -0000, Luke Yelavich wrote:
> I attempted to reproduce the problem with both Sitsofe Wheeler's
> procedures in comment 32, however I am unable to reproduce the problem
> on maverick, with the default pulse resampling method shipped in
> maverick. I may have missed someting, so will try again later on the
> same, and different hardware, but no killing pulseaudio so far in my
> testing. I will also try with lucid.

The problem seems to affect some systems and not others (perhaps depending
on CPU speed), so it's necessary to verify the same system with Lucid before
we can draw conclusions about whether it's still broken in Maverick.

--
 - mdz

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

Matt is correct - if you have a suitably fast machine (say 2.2Ghz or faster) you won't see the problem on 10.04 either. I may see if I can test things from a Maverick live CD later today...

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

OK I've tested on a Maverick daily from July 25th. There's definitely a change as on the 2Ghz laptop pulseuadio no longer dies with a "Killed" message and the wav sample is played (manually using speex-float-3 rather than Ubuntu's default of speex-float-1 will still show the problem though). On a 900Mhz EeePC no sound is played (it looks like the CPU does not have enough power to keep up). Effectively, this issue has been dramatically improved although I'm a little unsure as to what part of the system has done it...

Revision history for this message
maxpower (markjsmit) wrote :

Doesent seem to be the cpu speed at all. I have a 3.6 ghz quad core and the same problems. It seems to take a bit longer to reproduce the problem.. But it is there still.

Revision history for this message
Justas Lavišius (bucaneer) wrote :

It *is* related to CPU/system load in some way. Termination can usually be prevented by closing busy background apps or disabling fullscreen for videos. However, there doesn't seem to be any concrete threshold, it's just more likely to happen when there are less resources available.

Revision history for this message
eMJayy (fungie55) wrote :

I've been experiencing this bug as well, ever since I upgraded my primary machine to version 10.04 some months ago. I have 2 home-built desktop machines here - a newer one (running with an ASRock N68-S motherboard, Athlon II X2 250 CPU and SB Audigy SE 7.1 soundcard) and a six year old one (running with a MSI KM2M combo board, Athlon XP 2200 CPU and SB Live! 5.1 soundcard).

The newer machine, a dual core running at 3GHz, is affected by this bug, while the older one, a single core running at 1.8GHz is not. The bug only manifests itself when I have the new machine set to surround audio and it disappears immediately when audio is reverted back to stereo audio. I have both the 32bit and 64bit versions of Ubuntu 10.04 installed on the new machine with the latest generic kernels and all updates installed, and they're both affected by this bug. I've tried using the latest alsa drivers in the 64bit Ubuntu, but the issue has remained unaltered by their use.

Once the machine is set to use surround, the issue shows up whenever I watch flash video in a browser, or DVDs or when I listen to locally stored music. The sequence of events on my machine reflects what several others have been describing - pulseaudio is in use and the audio channels are set to 5.1 surround; then after anywhere from a minute to half an hour of playback, there's a sudden jump in CPU usage by the pulseaudio process in one CPU core; once it hits 100% usage of both cores, the pulseaudio process is killed and is replaced by one with a new pid. Once the pulseaudio process has a new pid, programs that were previously accessing pulseaudio will either crash with an error message (eg. Totem Movie Player) or continue to play the video file without audio (eg. VLC 1.0.6 or SMPlayer). With video players that don't crash, it's possible to get the player to access the new pulseaudio process by pausing the video and then disabling and re-enabling the software's audio.

I do think there might be some sort of relationship to the system load. The problem tends to happen more frequently when the CPU is being extensively used. It happens least when music files are played back and the most when the web browser has lots of flash-filled pages running simultaneously or when the video is running in full screen.

I'm going to try an experiment during this week to see if this thing might be audio hardware related. I'll switch the older SB Live card to the new machine and move the Audigy to the older machine. If the problem trades places, it might hopefully help narrow things down a bit.

Revision history for this message
Justas Lavišius (bucaneer) wrote :

Shortly after my last comment, I had to purge and reinstall Xorg together with ATI proprietary drivers (fglrx) due to unrelated issues. Since then, the bug has occurred only two or three times, as opposed to the multiple daily occurrences that were common before. However I have no idea how the two could be connected, so I'm hoping someone else will make sense of it.

Revision history for this message
Raymond (superquad-vortex2) wrote :

May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: stream : PLAYBACK
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: access : MMAP_INTERLEAVED
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: format : S16_LE
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: subformat : STD
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: channels : 2
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: rate : 44100
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: exact rate : 44100 (44100/1)
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: msbits : 16
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: buffer_size : 16384
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: period_size : 8192
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: period_time : 185759
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: tstamp_mode : ENABLE
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: period_step : 1
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: avail_min : 15503
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: period_event : 0
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: start_threshold : -1
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: stop_threshold : 1073741824
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: silence_threshold: 0
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: silence_size : 0
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: boundary : 1073741824
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: appl_ptr : 4457581
May 7 17:50:15 deepblue pulseaudio[9676]: alsa-util.c: hw_ptr : 4361384

4457581-4361384 = 96197 which is more than 5 times of the buffer size 16384

it is strange that appl ptr is ahead of hw_ptr but the distance is larger than the buffer size

Revision history for this message
jctolton (jctolton) wrote :

I have been advised my bug is a duplicate of this one. Please advise on what tests to run and how to do them.

Revision history for this message
Matthias (funny-hangman-gmx) wrote :

Hi, I had the same Bug with Totem. Skype was also affected by this bug.
On my machine it was an problem with the configuration in "/etc/pulse/daemon.conf".

If "resample-method = src-sinc-best-quality" and CPU mode is "Ondemand" I get this Bug.

If "resample-method = src-sinc-best-quality" and CPU mode is "Performance" or
   "resample-method = speex-float-1" and CPU mode is "Ondemand" every program works normal.

It is reproducible on my machine, hope it helps. Tested with Ubuntu 10.4 and AMD X2 6000+.

Revision history for this message
drakesoft (powerschorsch21) wrote :

I got this error in Rhythmbox. It plays a mp3 for a few seconds with no sound output then I got this error and then Rhythmbox plays the next file with no problems.
But one strange thing is ... if pavucontrol is open everything works normal.

Revision history for this message
drakesoft (powerschorsch21) wrote :

I forgot ... I had this problem since I upgraded to Ubuntu 10.10

Revision history for this message
Abdusamed Ahmed (sir508) wrote :

I'm experiencing this with Totem because it would play any files after a while of Totem use. All players dies, yes vlc too. For some reason smplayer works and Banshee sometimes hangs.

I'm on ubuntu 10.04.1 See the attach file for the debug I recorded from start to kill of banshee.?field.comment=I'm experiencing this with Totem because it would play any files after a while of Totem use. All players dies, yes vlc too. For some reason smplayer works and Banshee sometimes hangs.

I'm on ubuntu 10.04.1 See the attach file for the debug I recorded from start to kill of banshee.?field.comment=I'm experiencing this with Totem because it would play any files after a while of Totem use. All players dies, yes vlc too. For some reason smplayer works and Banshee sometimes hangs.

I'm on ubuntu 10.04.1 See the attach file for the debug I recorded from start to kill of banshee.

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.