Bug 2343887 - occasional deadlock opening pipewire audio
Summary: occasional deadlock opening pipewire audio
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sdl2-compat
Version: 41
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Neal Gompa
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-02-05 08:10 UTC by Stas Sergeev
Modified: 2025-05-11 01:16 UTC (History)
3 users (show)

Fixed In Version: sdl2-compat-2.32.56-1.fc42
Clone Of:
Environment:
Last Closed: 2025-05-11 01:16:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github libsdl-org sdl2-compat issues 301 0 None open Program sometimes deadlocks on SDL_OpenAudio call 2025-02-16 19:50:36 UTC

Description Stas Sergeev 2025-02-05 08:10:39 UTC
Got this hang on opening audio device:

#0  futex_wait (futex_word=0x555557083ee8, expected=2, private=0)
    at ../sysdeps/nptl/futex-internal.h:146
#1  __GI___lll_lock_wait (futex=futex@entry=0x555557083ee8, private=0)
    at lowlevellock.c:49
#2  0x00007ffff7680a02 in __pthread_mutex_cond_lock
    (mutex=mutex@entry=0x555557083ee8) at ../nptl/pthread_mutex_lock.c:128
#3  0x00007ffff767d110 in __pthread_cond_wait_common
    (cond=0x555557083f10, mutex=0x555557083f28, clockid=0, abstime=0x0)
    at pthread_cond_wait.c:607
#4  ___pthread_cond_wait
    (cond=cond@entry=0x555557083f10, mutex=mutex@entry=0x555557083ee8)
    at pthread_cond_wait.c:618
#5  0x00007fff4ad40e88 in pw_thread_loop_wait (loop=0x555557083ed0)
    at ../src/pipewire/thread-loop.c:428
#6  0x00007fffe5f34c76 in PIPEWIRE_OpenDevice (device=0x555557083ad0)
    at /usr/src/debug/SDL3-3.2.2-1.fc41.x86_64/src/audio/pipewire/SDL_pipewire.c:1222
#7  0x00007fffe5e0c541 in OpenPhysicalAudioDevice
    (device=device@entry=0x555557083ad0, inspec=inspec@entry=0x7fffffffd0a0)
    at /usr/src/debug/SDL3-3.2.2-1.fc41.x86_64/src/audio/SDL_audio.c:1710
#8  0x00007fffe5e0d8e7 in SDL_OpenAudioDevice_REAL
    (devid=<optimized out>, spec=0x7fffffffd0a0)
    at /usr/src/debug/SDL3-3.2.2-1.fc41.x86_64/src/audio/SDL_audio.c:1777
#9  0x00007fffe8e607ef in OpenAudioDeviceLocked
    (allowed_changes=0, devicename=<optimized out>, iscapture=0, desired2=0x7fffffffd140, obtained2=0x7fffffffd120, min_id=<optimized out>)
    at /usr/src/debug/sdl2-compat-2.30.52-1.fc41.x86_64/src/sdl2_compat.c:6016
#10 OpenAudioDevice.isra.0
    (devicename=<optimized out>, iscapture=0, desired2=0x7fffffffd140, obtained2=0x7fffffffd120, min_id=<optimized out>, allowed_changes=<optimized out>)
    at /usr/src/debug/sdl2-compat-2.30.52-1.fc41.x86_64/src/sdl2_compat.c:6107
#11 0x00007fffe8ed3264 in sdlsnd_open (arg=<optimized out>) at snd_o_SDL.c:84


Reproducible: Sometimes

Steps to Reproduce:
1. run sdl2 app over sdl2-compat
2. sometimes it hangs opening pipewire
Actual Results:  
sometimes hangs

Expected Results:  
never hangs

I don't think SDL2 used pipewire,
I think it used pulseaudio, so the
pipewire was involved via the wrapper
(if at all).
Direct pipewire code is certainly new,
and I don't know if this is an sdl2-compat
problem or sdl3 problem or pipewire problem.

Comment 1 Fedora Update System 2025-05-10 07:21:10 UTC
FEDORA-2025-e9f23d2848 (mingw-sdl2-compat-2.32.56-1.fc42, mingw-SDL3-3.2.12-1.fc42, and 2 more) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-e9f23d2848

Comment 2 Fedora Update System 2025-05-11 01:16:28 UTC
FEDORA-2025-e9f23d2848 (mingw-sdl2-compat-2.32.56-1.fc42, mingw-SDL3-3.2.12-1.fc42, and 2 more) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.