Skip to content

bug: macOS x86_64 packaged startup smoke test times out shutdown: the app blocks ~75 s on the rtmp-services remote update #2671

Closed

Description

@zackees

The release-rust.yaml Native macOS x86_64 DMG startup 🧪 job fails on the Intel runner because the packaged app does not exit within the test's 30 s shutdown budget. It is not a hang: the app's own log shows a normal shutdown (profiler + Number of memory leaks: 0), it just takes ~75 s — the same wall time as a blocked outbound network connect in the same run. The ARM64 sibling and the previous release run of the same job pass.

Evidence

Release run 40529110726 (event schedule, head b926b01c4 = #2647), job 122287574932:

  • The job runs test/packaged-startup.py over four config modes (fresh migrate-default migrate-custom existing, release-rust.yaml).
  • Mode fresh passes (packaged startup: capture plugins registered, saved profile loaded, clean shutdown).
  • The next mode's shutdown is requested and then:
    • 15:36:09.559: info: ==== Shutting down =============================
    • 15:37:24.052: info: == Profiler Results ============================= — i.e. 74.5 s between the close request and the shutdown completing.
    • The harness gave up first: subprocess.TimeoutExpired ... timed out after 30 seconds at test/packaged-startup.py:601 (close_frontend), after printing sampling owned frontend PID <pid> after shutdown timeout (reporting path from test: packaged startup names an unanswered request and prints the OBS log on failure (#2161) #2169).
  • In the same run, the app logged the matching blocker:
    warning: [rtmp-services plugin] Remote update of URL "https://obsproject.com/obs2_update/rtmp-services/v5/package.json" failed: Failed to connect to obsproject.com port 443 after 75005 ms: Couldn't connect to server
    (75005 ms ≈ 74.5 s).
  • Other degraded-environment symptoms in the same job, for context: obs_init_module(mac-avcapture-legacy): 5072.26 ms; error: os_dlopen(.../VLC.app/.../libvlccore.dylib): ... (no such file); error: [ mac-screencapture ]: init_screen_stream: Invalid target display ID: 0.

What I did not verify

  • Whether the shutdown is blocked on the rtmp-services fetch or merely coincident with it. The 75 s equivalence is strong, but I did not read the shutdown path to confirm the fetch runs on a thread the frontend joins before exiting.
  • Whether the ~75 s wait is a fixed connect timeout (no connect-refused fast path on this runner) or a retry budget.
  • Reproducibility rate: one failing run against one passing run (previous release-rust run) and one passing sibling (arm64, same run).

Related

Proposed default (maintainer can override)

Treat the environment-dependent network wait as out of scope for the smoke test rather than widening the budget blindly:

  1. Give the smoke test's shutdown wait a headroom that covers a slow runner, and/or
  2. stop the packaged app from doing the rtmp-services remote update during a smoke run (the job already passes --disable-updater; this is a different fetch), or bound the fetch so shutdown cannot be held for a minute.

A first PR would be scoped to whichever of those the maintainer prefers; the existing Native macOS x86_64 DMG startup 🧪 job is the failing test and the release lane is the only place it runs, so the fix is validated by a release-rust run, not PR CI.

Activity

  1. added
    bug
    infra
    on Oct 27, 2026
  2. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Claiming: #2671

    Diagnosis is already in the issue body (release run 40529110726, job 122287574932). Plan:

    1. Confirm the blocker: read the shutdown path for what the frontend joins before exit and whether the rtmp-services remote update runs there (plugins/rtmp-services, OBSBasic::Close/Destroy). State whether the 75 s is that fetch or a coincidence.
    2. Pick the smallest fix the evidence supports — bound the remote update so it cannot hold shutdown, or skip it in the packaged smoke run alongside --disable-updater.
    3. Widen the smoke test shutdown wait only as a backstop, with the value justified from the observed 74.5 s.
    4. Validate on the release lane (release-rust.yaml macOS x86_64 job is the only place test/packaged-startup.py runs) and report the run.

    Note: PR CI does not run this job, so the merge/queue gate will not prove the fix — it needs a release-rust run.

  3. added
    ready
    on Oct 27, 2026
  4. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Root cause confirmed at code level — this is a real shutdown-blocking bug, not just a tight test budget.

    Chain:

    • plugins/rtmp-services/rtmp-services-main.c.h:104 — obs_module_load() starts the remote update: update_info_create(...) (under ENABLE_SERVICE_UPDATES).
    • shared/file-updater/file-updater/file-updater.c.h:488 — that spawns update_thread.
    • shared/file-updater/file-updater/file-updater.c.h:106-121 — the curl handle is configured without CURLOPT_TIMEOUT or CURLOPT_CONNECTTIMEOUT, so the connect falls back to the OS default (~75 s here). That is the Failed to connect to obsproject.com port 443 after 75005 ms line from the failing run.
    • shared/file-updater/file-updater/file-updater.c.h:36-42 — update_info_destroy() does pthread_join(info->thread, NULL).
    • plugins/rtmp-services/rtmp-services-main.c.h:122 — obs_module_unload() calls update_info_destroy(update_info).

    So at shutdown the rtmp-services module unload blocks until the in-flight fetch finishes; with no egress the fetch takes the full ~75 s connect timeout, and the frontend exits 74.5 s after the close request (app log: Shutting down 15:36:09.559 -> profiler 15:37:24.052). The smoke test's 30 s wait (test/packaged-startup.py:601) expires first.

    Two separate defects, either of which fixes the symptom:

    1. file-updater sets no transfer/connect deadline at all — a blocked network can hold shutdown (and every other update_info user: rtmp-services, win-capture) for the OS connect timeout.
    2. Even with a deadline, unloading a module joins a network thread; a smoke run should not depend on the network to exit.

    Preference: bound the fetch (1) as the product fix, and keep the 30 s test budget as-is; the --disable-updater flag the job already passes does not cover this path. I have not yet written the patch.

  5. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Fix is in PR #2673 (same tick): bound the file-updater request with CURLOPT_CONNECTTIMEOUT 15 s and CURLOPT_TIMEOUT 60 s, so the rtmp-services fetch cannot hold obs_module_unload → update_info_destroy's join for the OS connect timeout. That removes the ~75 s shutdown stall; the 30 s smoke-test budget is left as it is. Tier 2 cmocka case test_file_updater_timeout (TEST-NET-1) is the test.

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

Metadata

Metadata

Assignees

Labels

buginfraready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions