Skip to content

bug: test_pipewire_teardown_wait hung for 10 minutes in the asan job #3577

Closed

Description

@vpacher

What happens

The asan job failed on run 41638819338 (attempt 1) with exit 124, the 10-minute limit of the harness. The test log ends here:

[==========] tests: Running 1 test(s).
[ RUN      ] teardown_waits_only_under_the_lock

I saw it once, in 13 asan jobs. A normal run of this test ends almost at once, so this is a hang and not a slow run.

What is known

The test has no daemon. It starts a real pw_thread_loop, then calls obs_pipewire_destroy(), which calls pw_thread_loop_stop(). The harness keeps no stack for a unit test that times out, so the place of the hang is not known.

What to do

  1. Run the test in a loop under CPU load until it hangs, and take a stack.
  2. Decide from the stack whether the hang is in obs_pipewire_destroy() or in the test's lock wrappers.

A stack for each unit test that times out would also help the next hang like this.

Activity

  1. added
    bug
    on Nov 3, 2026
  2. added
    ready
    on Nov 3, 2026
  3. vpacher commented on Nov 3, 2026

    @vpacher
    MemberAuthor

    Claiming: #3577

    I found the cause: a race in PipeWire 1.6.2. pw_thread_loop_stop() invokes do_stop. When the loop thread has not set impl->thread yet, invoke runs do_stop on the caller, and nothing wakes the loop thread if it is on its way into epoll_wait. The caller then waits in pthread_join.

    1. PR: the test waits for PipeWire's start signal before it stops the loop, and leaves the known list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions