Bug 1221235

Summary: libpipewire deadlock in futex
Product: [openSUSE] openSUSE Tumbleweed Reporter: Martin Tůma <tumic>
Component: SoundAssignee: Antonio Larrosa <alarrosa>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P5 - None CC: alarrosa, tiwai
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Martin Tůma 2024-03-11 13:00:51 UTC
The latest libasound_module_pcm_pipewire in Tumbleweed deadlocks in a futex and freezes applications like Thunderbird or Firefox. After uninstalling libasound_module_pcm_pipewire Thunderbird/Firefox seems to work properly.

Backtrace:

(gdb) bt
#0  0x00007f1f6dc8effe in __futex_abstimed_wait_common () at /lib64/libc.so.6
#1  0x00007f1f6dc91d40 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libc.so.6
#2  0x00007f1f3bcaa6b6 in pw_thread_loop_wait () at /lib64/libpipewire-0.3.so.0
#3  0x00007f1f46e11bd5 in  () at /lib64/alsa-lib/libasound_module_pcm_pipewire.so
#4  0x00007f1f61f98132 in  () at /lib64/libasound.so.2
#5  0x00007f1f61f4cd6b in snd_pcm_prepare () at /lib64/libasound.so.2
#6  0x00007f1f4a00e73a in  () at /usr/lib64/libcanberra-0.30/libcanberra-alsa.so
#7  0x00007f1f4a00f3e3 in alsa_driver_play () at /usr/lib64/libcanberra-0.30/libcanberra-alsa.so
#8  0x00007f1f6bd3cb5e in ca_context_play_full () at /lib64/libcanberra.so.0
#9  0x00007f1f4aa08bc4 in multi_driver_play () at /usr/lib64/libcanberra-0.30/libcanberra-multi.so
#10 0x00007f1f6bd3cb5e in ca_context_play_full () at /lib64/libcanberra.so.0
#11 0x00007f1f6bd3cff3 in ca_context_play () at /lib64/libcanberra.so.0
#12 0x00007f1f65ac6693 in  () at /usr/lib64/thunderbird/libxul.so
#13 0x00007f1f6709af9f in  () at /usr/lib64/thunderbird/libxul.so
#14 0x00007f1f6709b489 in  () at /usr/lib64/thunderbird/libxul.so
#15 0x00007f1f6706d38e in  () at /usr/lib64/thunderbird/libxul.so
#16 0x00007f1f6701ba41 in  () at /usr/lib64/thunderbird/libxul.so
#17 0x00007f1f670223e7 in  () at /usr/lib64/thunderbird/libxul.so
#18 0x00007f1f67022475 in  () at /usr/lib64/thunderbird/libxul.so
#19 0x00007f1f67165078 in  () at /usr/lib64/thunderbird/libxul.so
#20 0x00007f1f671b02e1 in  () at /usr/lib64/thunderbird/libxul.so
#21 0x00007f1f62d1690b in  () at /usr/lib64/thunderbird/libxul.so
#22 0x00007f1f62d17309 in  () at /usr/lib64/thunderbird/libxul.so
#23 0x00007f1f62d1753b in  () at /usr/lib64/thunderbird/libxul.so
#24 0x00007f1f62d176a2 in  () at /usr/lib64/thunderbird/libxul.so
#25 0x00007f1f62d3c950 in  () at /usr/lib64/thunderbird/libxul.so
#26 0x00007f1f62d2855b in  () at /usr/lib64/thunderbird/libxul.so
#27 0x00007f1f6342073a in  () at /usr/lib64/thunderbird/libxul.so
#28 0x00007f1f633d4bbe in  () at /usr/lib64/thunderbird/libxul.so
#29 0x00007f1f65a201b8 in  () at /usr/lib64/thunderbird/libxul.so
#30 0x00007f1f66eb2e3e in  () at /usr/lib64/thunderbird/libxul.so
#31 0x00007f1f66fa3a71 in  () at /usr/lib64/thunderbird/libxul.so
#32 0x00007f1f66fa44c3 in  () at /usr/lib64/thunderbird/libxul.so
#33 0x00007f1f66fa4a93 in  () at /usr/lib64/thunderbird/libxul.so
#34 0x0000556ca5900c2d in  ()
#35 0x0000556ca58fffda in  ()
#36 0x00007f1f6dc2a1f0 in __libc_start_call_main () at /lib64/libc.so.6
#37 0x00007f1f6dc2a2b9 in __libc_start_main_impl () at /lib64/libc.so.6
#38 0x0000556ca59003e5 in _start ()
Comment 1 Martin Tůma 2024-03-11 13:06:05 UTC
Sorry, the futex is of course in libpipewire-0.3.so. But that can not be uninstalled (without uninstalling the whole KDE...) thus I had to uninstall libasound_module_pcm_pipewire.so as a workaround which is the module that triggers the libpipewire deadlock.
Comment 2 Takashi Iwai 2024-03-11 13:38:31 UTC
Smells rather like a pipewire issue.  Adding Antonio to Cc.
Comment 3 Antonio Larrosa 2024-03-12 08:12:23 UTC
As a quick fix, you can uninstall the pipewire-alsa package (which removes the library you removed). Unless you specifically require it for some reason, the system should be functional without it.

Can you check if you have the wireplumber-audio package installed? My guess is that you don't (neither pipewire-pulseaudio, right?)
Comment 4 Martin Tůma 2024-03-12 10:44:15 UTC
Yes, wireplumber-audio and pipewire-pulseaudio are not installed on my system.
Comment 5 Antonio Larrosa 2024-03-12 12:50:19 UTC
Thanks for the quick response. That confirms what I thought.

The pipewire-alsa package shouldn't be installed on systems that don't use pipewire for audio but there wasn't any enforcement of that. 

I submitted a fix for this in https://build.opensuse.org/request/show/1157176 (together with an update to the latest stable release from git which includes a number of other fixes).
Comment 7 Antonio Larrosa 2024-04-11 11:06:13 UTC
This should be fixed now so I'll close this issue. Thanks for the report! (Feel free to reopen it if you still have any problem)