Skip to content

bug: CI: libobs module keys change when GCC loads a precompiled header #5165

Closed

Description

@zackees

Location: ci/libobs_modules.py:87-119 (compile_args / header_closure). The dependency probe reuses -fpch-preprocess from hosted ccache's GCC commands. GCC then loads an existing .gch during -M -MG and drops the PCH's header closure from the dependency list. Keys before and after the build differ even without source changes; a changed header hidden behind that PCH is also absent from the post-build key.

Class: content-addressed cache key inconsistency.

The pool's E640 check 16 (.worker-pool/e640-measure/report-16.md, 2026-11-18) measured a median 372 s Build Tier 2 step and 0/7 module hits. Six recent merge-group/master-push job logs show successful restores of 4.8 MB master-scoped libobs-modules-tier2-linux-* archives. Master jobs 135187090875 and 135200900974 saved archives successfully, yet both reported 0/7 module hits; their stores added only three and two archives respectively. Dell jobs 135176110873 and 135179638652 also restored master archives and reported 0/7. This is not missing save permissions or merge-group cache scoping.

A local GCC probe reproduces the dependency difference with an unchanged source and header before/after creating its PCH. Hosted Tier 2 uses the ccache front layer, whose _obs_pch_ccache setup adds -fpch-preprocess; the Dell's empty launcher does not. The build still legitimately invalidates Rust/core modules when port PRs change their inputs.

Proposed fix: omit the PCH preprocessing-output flag from module command identity and dependency scanning. It does not change compiled object semantics. Preserve flags that affect objects, compiler identity, and full header-content hashing. Add regressions in the existing ci/test_libobs_modules_cache.py for pre/post PCH equality, header invalidation with a PCH present, and launcher flag parity. No workflow files, host changes, or repo-variable changes are needed. Draft #5065's kept-tree configure optimization remains separate.

CI log examples: https://github.com/obs-rust/obs-studio/actions/runs/44414793369/job/135200900974 and https://github.com/obs-rust/obs-studio/actions/runs/44411145590/job/135179638652.

Activity

  1. added
    ciContinuous integration
    readyMeets the definition of Ready; claimable
    on Nov 19, 2026
  2. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Claiming: #5165 in pool slot obs-studio6, branch infra/tier2-module-pch-keys.

    1. Add RED tests demonstrating unchanged-key equality before/after PCH creation and header invalidation while a PCH exists.
    2. Exclude GCC's preprocessing-output flag from key/probe arguments; verify parity with the Dell's no-launcher command.
    3. Run focused self-tests and full lint once, then publish according to backpressure. First PR expected this session; local RED/GREEN will be pushed together for this focused CI fix.
  3. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Landed on master in #5176 (d0b9810): libobs module cache keys no longer use GCC's -fpch-preprocess for the dependency scan, so restore and save compute the same header closure. The hit rate will be measured in the next Dell check.

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

Metadata

Metadata

Assignees

Labels

ciContinuous integrationreadyMeets the definition of Ready; claimable

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions