Skip to content

CI: Artifact-Canvas Browser Tests hangs indefinitely (intermittent) — blocks every merge and leaves main's Tests run unconcluded #1502

Closed

Description

@amrmelsayed

Problem

The Artifact-Canvas Browser Tests job in the Tests workflow intermittently hangs indefinitely
instead of completing or failing. Every sibling job in the same run finishes normally, so the run
never reaches a conclusion and the PR's check set never becomes complete.

Observed 2026-08-18, three concurrent instances on unrelated branches:

Run Branch Job started State when observed
32085216485 main (merge of #1493) 00:37:25Z still in_progress at ~03:03Z (~2.5 hours)
32093117702 builder/pir-1497 02:49:07Z still in_progress after ~14 min
32091129032-era builder/air-1474 02:47:12Z in_progress

Baseline for the same job is ~1m09s (e.g. the run on PR #1421). So these are hangs, not slow
runs.

In every hung run, the other four jobs (Unit Tests, CLI Integration Tests, Tower Integration Tests, Package Install Verification) completed success within ~1–2.5 minutes.

Not a straightforward concurrency-contention story: two near-simultaneous air-1474 runs at
02:46:36 and 02:46:40 both completed successfully, while runs starting ~30 seconds later hung.

Impact

  1. It blocks merges. Branch protection plus the standing admin-bypass envelope require the full
    check set green on a stationary head. A permanently-pending job means the set is never complete,
    so a correctly-verified merge is impossible without either waiting out a hang that may never end
    or lowering the bar to "six of seven", which defeats the envelope.
  2. main has been silently incomplete for hours. Run 32085216485 has never concluded, so main's
    Tests workflow has no result for the [Air #1489] records: porch completion state + builder thread close-out #1493 merge. A glance at the branch shows later green runs
    and reads as healthy.
  3. It is release-blocking in effect. A release cut cannot be verified green while a required check
    hangs intermittently.

What to investigate

  • Whether the browser/harness process fails to exit (a held handle, an un-awaited server, a browser
    instance not torn down) rather than the tests themselves hanging.
  • Whether the job has any timeout. A hung job that runs for 2.5 hours suggests either no
    timeout-minutes on the job or one set far too high. A tight timeout would convert this from a
    silent stall into a visible failure, which is the minimum acceptable behaviour even before the root
    cause is found.
  • Whether it correlates with runner cold-start or browser download.

Acceptance criteria

  • Root cause identified for the non-termination.
  • The job carries a timeout-minutes bound proportionate to its ~1m09s baseline, so a stall
    fails visibly instead of pending forever.
  • No indefinite in_progress jobs observed across a sustained run of the suite.

Activity

  1. added
    area/core
    on Aug 18, 2026
  2. amrmelsayed commented on Aug 18, 2026

    @amrmelsayed
    CollaboratorAuthor

    Root-cause location identified: it is not the tests. The job hangs before they start.

    Queried the job steps on both hung runs. In each, the stalled step is Install Playwright Chromium (.github/workflows/test.yml:134-136, pnpm exec playwright install --with-deps chromium), and Run artifact-canvas browser tests is still pending — it never begins.

    Run Branch Install Playwright Chromium started State
    32085216485 main (#1493 merge) 00:37:43Z still in progress at 03:07Z
    32093117702 builder/pir-1497 02:49:22Z still in progress at 03:07Z

    Everything before it is fast: checkout, pnpm, Node setup and pnpm install all complete within ~15 seconds.

    Why it presents as hours rather than a failure: there is no timeout-minutes on any job in test.yml (grepped; zero occurrences). GitHub's default job timeout is 6 hours, so a stalled step sits pending for hours instead of failing fast. That is why main's run has been unconcluded since 00:37Z and reads as "still running" rather than "broken".

    Cause inside the step is not yet verified — in-progress jobs return BlobNotFound for logs, so the apt/download output is not retrievable until the job ends. Candidates, in order of likelihood for --with-deps on a GitHub Ubuntu runner: contention on the dpkg/apt lock with the runner's background unattended-upgrades; an apt prompt blocking on absent stdin; or a stalled browser/CDN download. Grabbing the log from a hung run after it finally times out would settle it.

    Fixes worth considering, in increasing order of ambition:

    1. timeout-minutes on the job — against a ~1m09s baseline, something like 10 is generous. This does not fix the hang but converts a silent multi-hour stall into a visible failure, which is the property that actually blocks merges today.
    2. Cache ~/.cache/ms-playwright keyed on the Playwright version, so the browser download leaves the common path entirely.
    3. Reconsider --with-deps. ubuntu-latest already carries most Chromium system libraries; if the apt phase is the staller, dropping it (or running it with DEBIAN_FRONTEND=noninteractive) removes the stall's source rather than bounding it.

    (1) is the one that unblocks merging, and is independent of diagnosing the rest.

  3. amrmelsayed commented on Aug 18, 2026

    @amrmelsayed
    CollaboratorAuthor

    The intermittence makes this worse, not doubtful — and explains why it has gone unreported.

    Data from three runs of the same job tonight, all at the same step (Install Playwright Chromium):

    Run Branch Started Outcome
    32095039750 builder/pir-1498 03:19:18Z pass, 3m58s
    32093117702 builder/pir-1497 02:49:07Z still running at 03:26Z (~38 min)
    32085216485 main (#1493 merge) 00:37:25Z still running at 03:26Z (~3 hours)

    Same workflow, same job, same step. One head completes in four minutes; two others never finish.

    Three consequences worth recording:

    1. An intermittent hang at a fixed step is a stronger signal than a consistent one. It points at the step rather than at the suite — the tests are identical across all three runs and two never reach them.
    2. It is self-concealing. Because a rerun often succeeds, the rational local response is to rerun and move on, which is precisely what prevents the failure from being reported. A consistent hang would have been filed the first day.
    3. The ~1m09s figure quoted earlier is not the baseline — a healthy run of this job ranges to at least 3m58s. That widens the band in which "slow" and "hung" are indistinguishable by eye, which is the argument for a timeout-minutes bound rather than operator judgement. Without one, the only way to tell them apart is to query the job's step state and elapsed time, which nobody does by default.

    Recorded after two opposite misreadings of the same data in the same minute: IN_PROGRESS read as "hung", then one clean run read as "nothing is hung". Both were settled by one query of the other runs' durations. A bounded timeout removes the need to make that judgement at all.

  4. amrmelsayed commented on Aug 18, 2026

    @amrmelsayed
    CollaboratorAuthor

    On it! Working on a fix now.

  5. added 3 commits that reference this issue on Aug 18, 2026
    e104f3e
    0fd9997
    93b7c16
  6. amrmelsayed commented on Aug 18, 2026

    @amrmelsayed
    CollaboratorAuthor

    A better fix than bounding it: --with-deps is unnecessary on this runner, and the repo already proves it.

    .github/workflows/dashboard-e2e.yml:42 installs Chromium as:

    pnpm exec playwright install chromium
    

    No --with-deps. Same ubuntu-latest image, and the workflow then launches Chromium for Playwright tests. It has completed success on main for five consecutive scheduled runs (2026-08-13 through 2026-08-17).

    So Chromium's system libraries are already present on the runner image, and the apt-get update that --with-deps triggers in test.yml:136 buys nothing. Since that apt index-fetch is the confirmed stall, removing the flag removes the cause rather than bounding it.

    Both changes belong in the fix, not one or the other:

    • Drop --with-deps — removes this failure mode entirely.
    • Keep the timeout-minutes bounds — the backstop for any future stall in any job. The durable lesson from this issue is not "apt can hang" but "an unbounded job conceals its own failure", and that is unaddressed by fixing one step.

    Caveat, to be settled by CI rather than argument: dashboard-e2e exercises the dashboard while this job exercises canvas rendering. Same browser and image, so the evidence transfers, but if canvas rendering needs a library the dashboard path does not, it will surface as a launch failure on the PR's own run. That is a cheap verification and a genuinely useful result either way.

    Also noted: the sibling workflow runs playwright test --retries 3; this job has no retry. Worth arguing separately rather than copying by reflex.

    Recording how this was missed, since it is the more useful part: the removal of --with-deps was treated as speculative and gated behind "verify it still launches in CI first". The verification already existed in a sibling workflow in the same directory. Checking for existing work before classifying something as unknown would have found it immediately.

  7. added 5 commits that reference this issue on Aug 18, 2026
    4e823b5
    cb13072
    0bacf77
    913035b
    860cb73
  8. added a commit that references this issue on Aug 18, 2026
    ee548df
  9. amrmelsayed commented on Aug 18, 2026

    @amrmelsayed
    CollaboratorAuthor

    Fixed in PR #1507, merged as ee548df21.

    Root cause removed at source: --with-deps dropped from the Install Playwright Chromium step, eliminating the apt-get update whose archive.ubuntu.com index fetch was the confirmed stall. The runner image already carries Chromium's system libraries — established by dashboard-e2e.yml, which installs the same way and is green on 10 of its last 10 runs.

    Verified twice on the PR, against ~4 minutes with the flag and two runs that night which never finished at all:

    Head Canvas job
    913035b37 success, 40s
    dd1a7e952 (main merged in) success, 55s

    The apt phase was roughly 85% of the job's runtime and 100% of its failure surface.

    Timeout bounds kept deliberately, not as redundancy. Removing the flag fixes this stall; timeout-minutes on every job in test.yml is what stops the next unbounded job concealing its own failure for hours. That is the durable lesson here — an unbounded stall is a monitoring gap rather than a latency problem, which is why main sat with no Tests conclusion for three hours while reading as healthy.

    Two regression guards ship with it: a test asserting every job carries a bound below GitHub's 360-minute default, and an assertion pinning the absence of --with-deps so a well-meaning re-addition fails the suite instead of silently restoring a multi-hour stall.

    --retries was considered and argued down rather than copied from the sibling workflow: Playwright's --retries retries tests, and this failure was in the install step, which no test-level retry can reach.

    Follow-up #1509 covers the remaining workflow files, which are still unbounded.

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

    area/core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions