FS#46479 - [pulseaudio] "Connection terminated" while playing audio

Attached to Project: Arch Linux
Opened by Rowan Lewis (meow) - Tuesday, 29 September 2015, 16:12 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Sunday, 20 February 2022, 04:00 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:
Just upgraded from PA 6 to 7 today, and now audio keep getting dropped. I've had this problem in some video games and music players:

↪ mpv ~/Music/Dissection/Storm\ of\ the\ Light\'s\ Bane/05.\ Retribution\ -\ Storm\ of\ the\ Light\'s\ Bane.opus
Playing: /home/rowan/Music/Dissection/Storm of the Light's Bane/05. Retribution - Storm of the Light's Bane.opus
(+) Audio --aid=1 --alang=eng 'Retribution - Storm of the Light's Bane' (opus)
File tags:
Artist: [snip]
AO: [pulse] 48000Hz stereo 2ch float
A: 00:01:24 / 00:04:50 (29%)
[ao/pulse] pa_stream_cork() failed: Connection terminated
[ao/pulse] pa_stream_flush() failed: Connection terminated
[ao/pulse] pa_stream_cork() failed: Connection terminated
[ao/pulse] pa_stream_cork() failed: Connection terminated
[ao/pulse] pa_stream_flush() failed: Connection terminated
[ao/pulse] pa_stream_cork() failed: Connection terminated
[ao/pulse] pa_context_get_sink_input_info() failed: Bad state
[ao/pulse] pa_context_get_sink_input_info() failed: Bad state

Installed packages:
local/lib32-libpulse 7.0-2
A featureful, general-purpose sound server (32-bit client libraries)
local/libcanberra-pulse 0.30-5
PulseAudio plugin for libcanberra
local/paprefs 0.9.10-4
A simple GTK-based configuration dialog for PulseAudio
local/pavucontrol 3.0-1
A GTK volume control for PulseAudio
local/pulseaudio 7.0-2
A featureful, general-purpose sound server
local/pulseaudio-alsa 2-3
ALSA Configuration for PulseAudio
local/pulseaudio-equalizer 7.0-2
Equalizer for PulseAudio
local/pulseaudio-gconf 7.0-2
GConf support for PulseAudio
local/pulseaudio-jack 7.0-2
Jack support for PulseAudio

Steps to reproduce:
1) Use a pulseaudio client to play sound
2) Experience audio dropping out every few minutes with the error "pa_stream_cork() failed: Connection terminated"
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Sunday, 20 February 2022, 04:00 GMT
Reason for closing:  No response
Additional comments about closing:  2022-02-19: A task closure has been requested. Reason for request: Stale since 2015-09-30, 1 day after original reporting. I wasn't able to find any other bug reports for this exact problem. As a HIGH severity issue, it's suspiciously silent. I suggest to close this 6 year old task. No indication the problem has remained.
Comment by Sing (Sing) - Wednesday, 30 September 2015, 13:50 GMT
I'm having the same problem too
Comment by Justin C (boxofrox) - Thursday, 08 October 2015, 04:05 GMT
Having the same problem with spotify client (0.9.11.27-1), chromium (45.0.2454.101-1), and google-chrome (45.0.2454.101-1).

local/lib32-libcanberra-pulse 0.30-4
local/lib32-libpulse 7.0-2
local/libcanberra-pulse 0.30-5
local/paprefs 0.9.10-4
local/pavucontrol 3.0-1
local/pulseaudio 7.0-2
local/pulseaudio-alsa 2-3
local/pulseaudio-gconf 7.0-2
local/pulseaudio-zeroconf 7.0-2
Comment by Justin C (boxofrox) - Friday, 09 October 2015, 07:18 GMT
I may have found a possible work around. As described on https://github.com/netblue30/firejail, disabling shm (aka srbchannel mechanism) appears to correct the issue with Netflix on google-chrome. I have not yet tested spotify or chromium.

This may also be of interest. tanuk on #pulseaudio suggested recompiling pulseaudio with two commits [1][2] may also resolve issue with terminated connections. The first four patches are already merged according to tanuk's response to a bug report [3]. My attempts to compile pulseaudio 7.0-2 through ABS ran into dependency conflicts.

[1] http://lists.freedesktop.org/archives/pulseaudio-discuss/2015-January/022920.html
[2] http://lists.freedesktop.org/archives/pulseaudio-discuss/2015-January/022921.html
[3] https://bugs.freedesktop.org/show_bug.cgi?id=91956#c1
Comment by Justin C (boxofrox) - Saturday, 10 October 2015, 21:58 GMT
Here's a followup.

Disabling shm in pulseaudio was an unexpected fix for tanuk. The problem firejail has is depriving the jailed app of the `/dev/shm/pulse-shm-xxxx` file it expects. I'm not using firejail, so what fixed my problem? Time to back-track.

I updated my `~/.config/pulse/client.conf` and removed the `enable-shm = no` setting. After a `pulseaudio -k`, I found I could not reproduce the connection terminated issue, which indicates that messing with the shm setting may not have an effect. About the only other thing I did at the time was `pulseaudio -k` to restart pulse after adding the setting. Media apps are still working fine so far.
Comment by Sing (Sing) - Sunday, 11 October 2015, 09:12 GMT
I think adding `enable-shm = no` to `~/.config/pulse/client.conf`, then `pulseaudio -k` as suggested by Justintar worked for me
Comment by Rowan Lewis (meow) - Saturday, 24 October 2015, 17:50 GMT
Still experiencing this problem, even after setting `enable-shm = no`.

Loading...