Skip to content

bug: local Tier 2 can compile another checkout's source through the shared zccache daemon #2028

Closed

Description

@zackees

Problem

rust/tools/linux-validate/run.sh mounts one machine-wide volume, obs-rust-linux-validate-zccache, at /zccache in every checkout's Tier 2 container (ZCCACHE_CACHE_DIR=/zccache), and mounts each checkout's source at the same path, /ro. zccache keeps its daemon socket inside the cache dir:

/zccache/v1.15.5/daemon-v1.15.5.sock
/zccache/v1.15.5/.writer.lock

So while one checkout's container has a daemon running, another checkout's container finds that socket and sends its compiles to that daemon. The daemon reads /ro/... in its own container, which holds a different checkout. 22 checkouts on this machine share the volume.

Observed (2026-10-23/24, three times in one session)

  • First local run after adding a committed test file: cc1: fatal error: /ro/test/cmocka/test_obs_scripting_python_host.c: No such file or directory, and again for test_obs_ffmpeg_mux_host.c. The file was in the checkout. A rerun minutes later compiled it.
  • On a branch rebased onto master at 446d373, test_deinterlace_pacing_steps failed in the [OFF] pass with the pre-libobs: Show both fields of the first 2x deinterlaced frame #1995 half_duration results (half_duration is 0, expected 20000000, ...), and test_deinterlace_2x_field_order failed too. libobs: Show both fields of the first 2x deinterlaced frame #1995's own PR CI passed both, Tier 2 OFF and ON. The object came from older source.

Consequence: ./unittest and ci-lint local-gate run can pass or fail on source that isn't the checkout's, and a local-gate stamp can attest to a build of other code.

Fix

Keep the compiled-object cache shared but give each container its own daemon: put the daemon socket and lock in container-local storage (or a per-checkout path), not in the shared volume. If zccache cannot move the socket separately from the cache dir, use a per-checkout zccache volume, as the build volume already is (#135), at the cost of a cold cache for new checkouts.

Test

RED: two checkouts whose versions of one source file differ. Start Tier 2 in checkout A, and while A's daemon is alive, build that file from checkout B; B's object reflects A's source. GREEN: B compiles its own source.

Activity

  1. zackees commented on Oct 24, 2026

    @zackees
    MemberAuthor

    Claiming: #2028. Plan: give each Tier 2 container its own zccache daemon (socket and lock off the shared volume) while keeping the shared object cache; one PR with a local RED/GREEN reproduction.

  2. added
    claimed
    on Oct 24, 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

    claimed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions