[pulseaudio-tickets] [Bug 103498] Closing PulseAudio freezes SDL audio

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Nov 26 20:22:41 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=103498

--- Comment #5 from Jussi Pakkanen <jpakkane at gmail.com> ---
This bug is nasty because it most likely boils down to a race condition that
happens very rarely. This is what we came up with:

- machine is booted
- pulseaudio starts up in system mode
- in some circumstances PA's startup is delayed, and the program using SDL
audio starts up and grabs the sound card before PA is fully running
- PA is now running, and the first application is using SDL audio, but it is
using Alsa directly
- programs started after PA starts try to connect to PA, succeed, and send
their sound data there but PA can't play it because the sound card is held by
the first launched application
- when closing one of the applications that are started afterwards, they get
hung in the method described above

We tried delaying the startup with systemd rules so that the application is
only started after PA's control socket appears. This did not work. The only
thing that did work was creating a startup application that tries to open SDL
audio, forcing it to use PA and delay starting any other program until it has
successfully opened a PA audio connection.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20171126/b416a25e/attachment.html>


More information about the pulseaudio-bugs mailing list