Audio randomly playing when pulseaudio client doesn't send anything for a couple hours
- PipeWire version (
pipewire --version
):Compiled with libpipewire 0.3.51, Linked with libpipewire 0.3.51
- Distribution and distribution version (
PRETTY_NAME
from/etc/os-release
): Ubuntu 22.04 LTS (used to happen on 21.10 too, but only started showing up after I switched from pulseaudio to pipewire) - Desktop Environment: GNOME
- Kernel version (
uname -r
): 5.15.0-27-generic
Description of Problem:
A mopidy music server (pulseaudio client from Pipewire's point of view) that's not playing any audio for a couple hours makes pipewire play 15-20s of the last song actually played.
How Reproducible:
Multiple times over the last month or so (since I switched to pipewire, basically). The "wait for a couple hours" step makes it rather annoying to reproduce though.
Steps to Reproduce:
- I play a song using mopidy.
- The song ends. Nothing is playing anymore, but mopidy is still running in the background.
- A couple hours pass.
Actual Results:
- I start hearing the last ~15-20s of the song being played again, despite not interacting with mopidy at all.
Expected Results:
- I don't hear audio unless I start it again.
Additional Info (as attachments):
-
pw-dump > pw-dump.log
: pw-dump.log -
pipewire-pulse
journalctl debug log (PIPEWIRE_DEBUG=5
) captured soon before the audio played unexpectedly: pipewire-pulse.log
When I enabled debug logging and waited for the problem to happen again, I noticed a ton of logs like this:
[...] [Mopidy] underrun read:2290554584 avail:-2143451796 max:3764
And the log above came maybe shortly before the audio started playing randomly. The avail
value looks suspiciously close to INT32_MIN, so I suspect the audio playing may be a result of the integer underflow convincing pulse-server that it should play the last song's data that's still kept around in some buffer.