Skip to content

Intermittent CI failure in the ci job (passed on re-run) #27

Closed

Description

@samitbasu

On PR #17 at commit 8cbf11a, the ci job (cargo xtask ci) failed once on GitHub. coverage and msrv passed on the same commit, and the job passed on a re-run of the same commit. The failed job's log had already expired (BlobNotFound) by the time we looked, so the cause is unknown.

This is likely a race or timing dependency in the tests. Earlier, style::tokens deadlocked under parallel tests (read the theme while holding the context lock); that was fixed in 2daaebd, but similar contention may remain, for example tests sharing a static egui::Context (tests/layout.rs).

To do

  • Run the suite repeatedly with high parallelism and with low parallelism (--test-threads=1 against the default) to reproduce it.
  • Audit tests that share a static context, and every place that calls egui context methods inside another context closure.
  • Keep the CI log next time: have xtask ci echo the failing test name and its panic message as a final summary line, so the step output shows the cause even after the raw log expires.

Don't re-run until green: find and fix the race.

Activity

  1. samitbasu commented on Nov 8, 2026

    @samitbasu
    OwnerAuthor

    Not reproduced in 25 full test runs at default parallelism, 3 single-threaded, and 450 stressed runs of tests/layout.rs (1, 2 and 64 threads, pinned to 2 CPUs). A reentrancy audit of every context closure found no nested context calls. #28 makes cargo xtask ci print the failing tests and the first panic as the step's last line, so the next occurrence will show its cause. Leaving this open until it recurs or a few weeks pass cleanly. The remaining lead is the slow trybuild compile-fail test, which shares the target directory.

  2. samitbasu commented on Nov 8, 2026

    @samitbasu
    OwnerAuthor

    Likely cause found on PR #28's CI: collect2: fatal error: ld terminated with signal 7 [Bus error] while linking the controls test binary, in both the ci and coverage jobs. The repo has 24 integration-test files, so 24 separate binaries, each statically linking egui, eframe and kittest. With debug info they are 400–700 MB each (snapshots is 1.5 GB), and target/debug/deps is 14 GB locally. A GitHub runner has roughly that much free disk, so the linker runs out of space writing its memory-mapped output and dies with SIGBUS. Whether it happens depends on how full the runner already is, hence the intermittency. The fix goes in #28: consolidate the tests into one binary and reduce debug info for test builds in CI. Also, the new summary line missed this cause, because CI output is coloured (CARGO_TERM_COLOR=always) and the parser didn't strip ANSI codes; that is fixed in the same PR.

  3. samitbasu commented on Nov 14, 2026

    @samitbasu
    OwnerAuthor

    The cause was a linker SIGBUS from a full disk across 24 test binaries. Fixed by #28 (one tests/it binary) and line-tables-only debug info in CI. It hasn't recurred since.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions