You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: test_pipewire_teardown_wait: hangs on PipeWire 0.3.60 to 0.3.76 #3596
Logic error (a test hang on supported PipeWire versions).
How it is reached
test/cmocka/tests.d/test_pipewire_teardown_wait.cmake builds the test for PipeWire 0.3.60 and newer (find_package(PipeWire 0.3.60 QUIET)). PipeWire's thread loop only reads thread-loop.start-signal from 0.3.77 on: src/pipewire/thread-loop.c has no start-signal at 0.3.60, 0.3.65, 0.3.68, 0.3.72 or 0.3.75, and has it at 0.3.77 and later. On 0.3.60 to 0.3.76 (Debian 12 ships 0.3.65) the property is ignored, the loop thread never signals, and the unconditional pw_thread_loop_wait() blocks until the ctest timeout. CI's runners have PipeWire 1.x, so CI doesn't see it. Found while reviewing a rebase onto #3593.
Proposed fix and failing test
Wait for the start signal only where the library honours it: raise this test's minimum to 0.3.77, or keep 0.3.60 and, below 0.3.77 (pw_check_library_version(0, 3, 77)), synchronize another way, for example by scheduling a no-op with pw_loop_invoke() from the loop thread and waiting for it under the lock. RED: the test run against a PipeWire 0.3.65 build (a Debian 12 container) hangs past its timeout; GREEN: it passes there and on 1.x.
Claiming: the PipeWire 0.3.60 to 0.3.76 hang in test_pipewire_teardown_wait
RED evidence: build PipeWire 0.3.65 (Debian 12's version) from source and run the current test against it; it blocks in the unconditional pw_thread_loop_wait() until the timeout, because thread-loop.start-signal is only read from 0.3.77 on.
GREEN: drop the start-signal property and synchronize in a way every supported version honours: add an event source to the loop before starting it, signal it after pw_thread_loop_start(), and wait under the lock until its callback (which only runs on the loop thread, after it has entered the loop) has set a flag and signalled. This keeps the bug: test_pipewire_teardown_wait hung for 10 minutes in the asan job #3577 guarantee (the loop thread is in the loop before the stop) and keeps the 0.3.60 minimum.
Check it passes against 0.3.65 and the host's 1.x, under ctest with no TMPDIR, and run the local gate lanes.
Fixed by PR #3602 (merged through the merge queue). The teardown test no longer asks for thread-loop.start-signal, which PipeWire reads only from 0.3.77 on. It now waits for an event source's callback on the loop thread, which works on every version the test builds for, so the 0.3.60 minimum stays. A second case covers the loop built without the property, so CI's 1.x runners now exercise the pre-0.3.77 behaviour too. Checked against PipeWire 0.3.65 and 1.6.9. The knowledge note docs/knowledge/pipewire-stop-after-start.md was updated to match.
Left: nothing. No follow-up issue is needed, and there is no tracking issue to tick.
Activity
rdoupe commentedon Nov 4, 2026
Claiming: the PipeWire 0.3.60 to 0.3.76 hang in test_pipewire_teardown_wait
pw_thread_loop_wait()until the timeout, becausethread-loop.start-signalis only read from 0.3.77 on.pw_thread_loop_start(), and wait under the lock until its callback (which only runs on the loop thread, after it has entered the loop) has set a flag and signalled. This keeps the bug: test_pipewire_teardown_wait hung for 10 minutes in the asan job #3577 guarantee (the loop thread is in the loop before the stop) and keeps the 0.3.60 minimum.PR expected today.
rdoupe commentedon Nov 4, 2026
Fixed by PR #3602 (merged through the merge queue). The teardown test no longer asks for
thread-loop.start-signal, which PipeWire reads only from 0.3.77 on. It now waits for an event source's callback on the loop thread, which works on every version the test builds for, so the 0.3.60 minimum stays. A second case covers the loop built without the property, so CI's 1.x runners now exercise the pre-0.3.77 behaviour too. Checked against PipeWire 0.3.65 and 1.6.9. The knowledge notedocs/knowledge/pipewire-stop-after-start.mdwas updated to match.Left: nothing. No follow-up issue is needed, and there is no tracking issue to tick.
test: Fix PipeWire teardown hang before 0.3.77 (obs-rust#3602)