ALSA issues inside the sandbox

Hello,
I’ve been working on improving audio support in my Flatpak of Purr Data, and noticing some strange issues which I can’t explain.

Trying open an ALSA device sometimes results in dlopen() errors like this:

ALSA lib ../../src/dlmisc.c:170:(snd_dlsym_verify) unable to verify version for symbol _snd_pcm_plug_open
ALSA lib ../../src/dlmisc.c:295:(snd1_dlobj_cache_get) symbol _snd_pcm_plug_open is not defined inside [builtin]
snd_pcm_open (input): No such device or address
ALSA lib ../../src/dlmisc.c:170:(snd_dlsym_verify) unable to verify version for symbol _snd_pcm_plug_open
ALSA lib ../../src/dlmisc.c:295:(snd1_dlobj_cache_get) symbol _snd_pcm_plug_open is not defined inside [builtin]
snd_pcm_open (output): No such device or address

This seems like a runtime issue, except that the ALSA libraries are all present in /usr/lib/x86_64-linux-gnu/alsa-lib/ as far as I can see … and they do sometimes work, so it’s not completely reproducible

Has anyone seen a problem like this before, or have any tips for debugging it?

I have seen this in a few, including Audacity, Polyphone (still in review), etc.

No problem with Ardour though.

Not sure what’s happening.

OK. Good to know that it’s not just me, at least :slight_smile:

Actually I do think it is this issue:

tl;dr the plug device isn’t part of the runtime (it is in 20.08)