Skip to content

Flaky: test_pulse_default_follow default_output_unplugged fails in merge queue on Dell runner #4944

Open

Description

@zackees

The merge-queue run for #4912 at 2026-11-17T02:26Z (job Build 🧱 / Rust Tier 2 Linux 🐧 (tests OFF, all), runner dell-fsx3mn2-3) failed in test/cmocka/test_pulse_default_follow.c:450, case default_output_unplugged. #4912 (a private-data extraction) doesn't touch audio, and a later queue build containing it passed, so it merged under HEADGREEN grouping.

This looks like the non-PipeWire sibling of #3630, which was the PipeWire variant missing the default output switch. Likely a timing dependence on the Pulse server's default-sink change event.

Next steps: reproduce under load (stress beside the test) on a Linux runner, and make the test wait on the event rather than on a fixed delay. Don't edit the existing C test's assertions (testing policy). Fix the harness or the wait in a new helper.

Refs #4896 (merge queue ejection sources).

Activity

  1. zackees commented on Nov 17, 2026

    @zackees
    MemberAuthor

    Claiming: investigation on branch fix/4944-pulse-default-follow. 1. Reproduce both private-daemon variants under parallel CPU load and record failure rates. 2. Identify and fix the implementation or fixture race without editing the C tests or public headers. 3. Repeat an equal or larger run, lint, push and arm a pinned PR. First PR expected this session if the failure can be reproduced.

  2. added
    needs-investigation
    on Nov 17, 2026
  3. added
    ready
    on Nov 17, 2026
  4. zackees commented on Nov 17, 2026

    @zackees
    MemberAuthor

    Claiming: continuing the implementation root-cause investigation on fix/4944-pulse-default-follow in obs-studio3, reworking draft #4984. 1. Trace subscription/default-resolution/stream attachment under the recorded CPU stress. 2. Fix the implementation without editing C tests or public headers. 3. Require zero failures in an equal or larger stress run, then lint, push and arm pinned. First revision expected this session if GREEN is established.

  5. moved this from Triage to Investigating in obs-rust Multiviewon Nov 18, 2026
  6. zackees commented on Nov 18, 2026

    @zackees
    MemberAuthor

    Claiming: continuing #4944 on fix/4944-pulse-serialize in obs-studio7 under the maintainer’s serialization assignment, superseding draft #4984. 1. Give all private PulseAudio/PipeWire daemon registrations a shared CTest lock. 2. Record configuration RED/GREEN for OFF and ON and replay the prior loaded runtime profile where available. 3. Run lint, push, and open the replacement PR this session; arm only when backpressure permits. No C test or public header edits.

  7. zackees commented on Nov 18, 2026

    @zackees
    MemberAuthor

    #5036 merged at 04:38Z: the 21 private PulseAudio/PipeWire daemon tests now share a CTest RESOURCE_LOCK, so they never run concurrently. I'm leaving this open as an observation window: if test_pulse_default_follow_pipewire fails again in a merge-group run after 04:38Z, the lock isn't the whole fix; otherwise close it after ~48 h of clean Dell runs.

  8. zackees commented on Nov 18, 2026

    @zackees
    MemberAuthor

    Claiming: the maintainer-assigned narrow Tier 2 retry shield on infra/4944-known-flaky-retry in obs-studio8. 1. Add an issue-linked known-flaky registry and fake-ctest RED tests. 2. Retry only an entirely registered failure set once through the shared Linux OFF/ON hosted/Dell runner, preserving failures and determinism requirements. 3. Run ./lint, push RED and GREEN together, and open the PR this session; arm only when backpressure is open. The root-cause investigation remains under #4944.

  9. zackees commented on Nov 18, 2026

    @zackees
    MemberAuthor

    PR #5054: #5054 adds the requested issue-linked, single-retry Tier 2 shield for test_pulse_default_follow_pipewire across OFF/ON hosted and Dell paths. Mixed failures, failed retries and malformed registry entries remain failures; successful recovery warns and writes the step summary. The 100-run determinism rule remains in force, and the root-cause investigation stays open. Refs #4944.

  10. zackees commented on Nov 18, 2026

    @zackees
    MemberAuthor

    #5054 merged at 08:23Z: this test is now in test/cmocka/known-flaky.txt, so a merge-queue run whose ONLY failures are registered tests retries them once and passes with a ::warning:: (and a step-summary line) instead of ejecting the group. This shields the queue; it does not resolve the root cause, so this issue stays open. Remove the registry line in the PR that fixes it.

  11. rdoupe commented on Nov 21, 2026

    @rdoupe
    Collaborator

    Notes from a reproduction attempt (not claiming).

    Where it actually fails. The one failure I found in the last 60 merge-queue runs' Tier 2 Linux logs is the PipeWire variant, run 44761819648 (2026-11-20 15:29Z), at the last step of default_output_unplugged, not the unplug itself:

    pulse-input: An error occurred while getting the source info!
    after A was plugged back in and made the default: the capture records from 'obs_test_c.monitor' and hears silence; expected 'obs_test_a.monitor' and the desktop
    

    So the capture followed the unplug to C correctly, then never followed the default back to A. No Giving up restarting or Stream ... failed warning was printed, so the plugin either saw no change or judged the default unchanged.

    What pipewire-pulse sends (a libpulse probe that asks for the default inside each event callback, private PipeWire as in test_pulse_monitor_device.py):

    unload A:      remove sink, remove source, change server -> default '@DEFAULT_SINK@'
                   change server                             -> default 'obs_test_c'
    load A:        new sink, new source                      -> default still 'obs_test_c'
    set default A: change server                             -> default 'obs_test_a'
    

    Two things follow. On unplug the server briefly reports the literal @DEFAULT_SINK@; the plugin follows it to @[email protected], which is where the logged source-info error comes from (passing runs log it too), and a 100 ms retry then restarts C a second time. On replug there is exactly one server-change event, so if that one is judged "unchanged", nothing ever corrects it.

    What did not reproduce it (master 224faff, linux-validate image, PipeWire variant): 20 runs beside 16 busy loops on 16 CPUs, 0 failures; 12 runs with 50/150/400 ms injected at the start of pulse_stream_event_task (a local-only change), 0 failures.

    Without a reproduction I'm not proposing a fix. Two candidates for whoever picks this up: treat @DEFAULT_SINK@/@DEFAULT_SOURCE@ as "no default yet" in pulse_default_device, and have a default-following source re-check the default on PULSE_SOURCE_NEW too, so a single missed server event can't strand it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-investigationready

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions