Skip to content

perf(ci): 129 of 322 AppImage compilations stay cold with a warm zccache #2182

Open

Description

@zackees

Follow-up of #1832.

With the AppImage compiler cache now saved (#2179), a second master dispatch of the same source (run 40110617992) restored zccache-appimage-40109086378 and reported 322 total (193 cached, 129 cold, 0 non-cacheable). Its Build step took 221 s instead of 332 s.

Same commit, same image, so all 322 should hit. Something in 129 compilations' cache key differs between runs: candidates are a per-run path or define (version or timestamp headers, OBS_RUST_VERSION, generated config headers), the unity or PCH files regenerated with new content or mtimes, or files zccache refuses after a source-freshness check (forge-ci/zccache#1935).

Next step: compare the zccache miss reasons or keys of the two runs for a few of the cold files (ZCCACHE_LOG or the cache's stats), find the varying input, and pin it.

Activity

  1. added
    infra
    on Oct 24, 2026
  2. zackees commented on Oct 24, 2026

    @zackees
    MemberAuthor

    Claiming: #2182. Plan: 1) diff the two runs' build logs to find which 129 compilations miss and what input varies (version/generated headers, unity/PCH content, paths); 2) pin it, with a ci test showing the varying input is gone (local RED evidence); 3) confirm with a second master dispatch that hits stay at ~322. First PR expected today.

  3. added
    claimed
    on Oct 24, 2026
  4. zackees commented on Oct 24, 2026

    @zackees
    MemberAuthor

    Claiming: find which compilations miss on an identical tree and why, then pin the varying input.

  5. zackees commented on Oct 24, 2026

    @zackees
    MemberAuthor

    Collision note: two sessions claimed this two minutes apart (16:42 and 16:44); the 16:42 claim, on branch infra/2182-appimage-zccache, came first. What has already landed from the other one, so it isn't redone:

    Still open:

    • The master caches from 40109086378 and 40110617992 are gone (evicted). Run 40119770099 on master (1eaa4e1, with both fixes) started cold and saved zccache-appimage-40119770099. The next master build of a different commit should hit on the frontend; the journal will show it.
    • Unexplained: a few shared/qt/* group misses, and the 2 input_fingerprint_mismatch (a generated qrc_resources.cpp and libobs-version's unity file, both expected to vary).

    I'm releasing my claim and leaving these to the first claimant. Releasing #2182.

  6. 10 remaining items

  7. zackees commented on Oct 25, 2026

    @zackees
    MemberAuthor

    Master after #2193 and #2255, two AppImage builds of the same commit 760f8e6:

    run restored from cold
    40141813515 (8d0c874) nothing (evicted) 322
    40143159722 (760f8e6) 40141813515 132
    40144506031 (760f8e6) 40143159722 (itself mostly warm) 126

    The last two miss nearly the same set, all input_fingerprint_mismatch with no differing fields named: all 52 obs-websocket sources, 8 shared/qt, 8 frontend, 6 obs-outputs, 5 libobs, decklink, nvenc, x264, obs-scripting. So it is not only forge-ci/zccache#1984 (an incomplete save after a cold build): a mostly warm save gives the same misses again.

    My branch pairs (before #2190 landed) on one commit got down to 11, with obs-websocket hitting. Differences between those runs and master: master's session uses --cwd "$PWD" and a journal under ${RUNNER_TEMP:-/tmp}; my branch also set ZCCACHE_PROFILE_CC_MISS=1. Next: a branch pair on master with only ZCCACHE_PROFILE_CC_MISS=1 added, to see whether that setting changes the verdicts.

    Also: master's cache 40119770099 was evicted, likely pushed out by my experiment branch's 1.77 GiB entry. I deleted the branch's caches and won't save from it again.

  8. moved this from In progress to Triage in obs-rust Multiviewon Oct 25, 2026
  9. added
    ready
    and removed
    claimed
    on Oct 25, 2026
  10. moved this from Triage to In progress in obs-rust Multiviewon Oct 25, 2026
  11. zackees commented on Oct 26, 2026

    @zackees
    MemberAuthor

    A lead that needs no CI runs. GCC precompiled headers are not reproducible: building the same header three times in one container, at the same path, gives three different .gch hashes. That holds for C (stdio.h/string.h/stdlib.h: 96fc98…, ebc3a7…, 405383…) and for C++ (string/vector: 99b93d…, c5b589…, 93cb95…), with GCC 15.2.0 in the Tier 2 image.

    So every object that includes a PCH depends on that PCH's exact bytes:

    • PCH compile is a cache hit: zccache restores the same .gch, and its dependents can hit.
    • PCH compile misses: GCC writes new bytes, and every object that includes it misses too, with input_fingerprint_mismatch and no differing field named, because the objects' own inputs didn't change.

    That fits what we've seen:

    Next step, using logs we already have: in a warm run's cold list, check whether the cmake_pch.h(xx).gch edges of those targets are themselves cold, and if so why (for Qt targets, a generated or autogen header the PCH includes would be my first guess). Fixing the few PCH misses should bring their dependents back. If the PCH can't be made to hit, zccache would have to key dependents on the PCH's inputs instead of its bytes, which is an upstream question.

  12. zackees commented on Oct 26, 2026

    @zackees
    MemberAuthor

    Correction to my PCH note: in warm run 40144506031 (job 121022866462) none of the 118 miss rows is a PCH (.gch) compile. Every row is input_fingerprint_mismatch [], with an empty list of differing inputs. 53 of them are plain plugins/obs-websocket/src/** sources, and the rest are unity sources. So the GCC .gch non-determinism I found is real, but this journal doesn't show it causing these misses. Next step: find out why zccache reports a fingerprint mismatch while listing no differing input. That looks like a zccache journal gap and belongs upstream at forge-ci/zccache.

  13. zackees commented on Oct 26, 2026

    @zackees
    MemberAuthor

    This is tracked upstream as forge-ci/zccache#1984. After a fully cold build, the cache that gets saved is missing 120-150 of the 322 entries, so the next build of the same commit misses those compiles with input_fingerprint_mismatch. That count matches the 129 here, and it explains why the miss rows name no differing input: the entry was never saved, nothing changed. Nothing in our build or our PCH handling needs to change. This issue waits on the zccache fix and a version bump.

  14. moved this from In progress to Ready in obs-rust Multiviewon Oct 26, 2026
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

    infraready

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions