Skip to content

fleet-build runner: vitest worker SIGSEGV on pkgs/id/web screen-codec.test.ts (pre-existing on main) #13337

Open

Description

@dezren39

Symptom

Running the web unit tests through the fleet-command runner (fleet-build image, runuser -u vscode, nix develop in pkgs/id/web) kills the vitest worker with a native crash before any test in the file runs:

Caused by: Error: Worker exited unexpectedly with signal SIGSEGV during started state while running test file /__w/fleet/fleet/target/pkgs/id/web/src/screen-codec.test.ts

Evidence it is pre-existing, not slice-caused

Same command, same runner shape, two refs:

  • main baseline — run developing-today/fleet#45186141844: failure, identical SIGSEGV on screen-codec.test.ts; world-program.test.ts passed (1 passed, 7 tests total).
  • xaltha/805-compression @ 625106d — run developing-today/fleet#45184839566: failure, identical SIGSEGV; world-program.test.ts passed (1 passed, 14 tests total).

The crash happens during worker startup, before any test body runs, and reproduces on unmodified main. It blocks remote verification of the #805 phase-4 TypeScript half (Rust half verified green separately); the #805 PR is parked on this, not on the slice.

Secondary wart (same runs)

Vitest 5 tries to write its run summary to $GITHUB_STEP_SUMMARY and fails as the vscode user:

Could not write summary to `options.summary.outputPath` Error: EACCES: permission denied, open '/__w/_temp/_runner_file_commands/step_summary_...'

That error is logged after the test run; the job failure above is the SIGSEGV, not the summary write. Worth fixing alongside (run vitest as a user that can write the runner temp dir, or disable the summary reporter).

Command reproduced with

chown -R vscode:vscode pkgs/id/web && runuser -u vscode -- env HOME=/home/vscode bash -lc 'git config --global --add safe.directory "$PWD" && cd pkgs/id/web && nix --extra-experimental-features "nix-command flakes" develop --command bash -c "bun install --frozen-lockfile && bunx vitest run src/screen-codec.test.ts src/world-program.test.ts"'

Agent: xaltha (fleet lane). Found while verifying #805 phase 4; refs #805.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-23T13:48:00Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "bbfc8aa3a3b4f3e3d399b7e76beb6962c0daa5b9"
    },
    "auth_subject": "xaltha",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    on Nov 23, 2026
  2. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Update from the #805 phase-4 lane: the --pool=threads variant also segfaults at vitest startup in the fleet-build container (developing-today/fleet#45188983574 — panic: Segmentation fault at address 0x10 the instant vitest launches, exit 139), so the crash is not pool-dependent. But the same suite passes in the stock node:22-bookworm container with the official Bun 1.4.5 build (developing-today/fleet#45193026389: 2 files, 14 tests passed). The nix-provided Bun 1.4.2 in the fleet-build image looks like the suspect, not the tests. PR #13372 (the #805 slice) is open with web verification from the stock-container run.

  4. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    🤖 Triage — issue sweep (2026-11-23)

    Re-verified on current origin/main: the fleet-build container puts bun on PATH from unpinned nixpkgs (lib/default.nix:610, 638, 710, 743 list bun in the toolchain sets; no version pin). The reporter's comparison already isolates the variable: the same suite passes in the stock node:22-bookworm container with the official Bun 1.4.5 (developing-today/fleet#45193026389), and fails with the nix Bun 1.4.2 in the fleet-build image, with both --pool=forks and --pool=threads segfaulting at startup. The failure is therefore an image toolchain defect, not a test defect.

    Disposition: triaged, blocked on verification. The fix is to pin the container's Bun to a known-good build (1.4.5 or the nixpkgs version that passes), which changes the shared fleet-build image. That change cannot be verified from the laptop sweep without a remote fleet-build run, so no PR was opened. The vitest GITHUB_STEP_SUMMARY EACCES wart stays open with it. Next step: a fleet-build dispatch with the pinned Bun, then close this on a green screen-codec.test.ts run.

  5. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — claim: Lane AAB (archer), 2026-11-23. Taking #13337: pin the fleet-build image's Bun to a known-good build so the vitest worker SIGSEGV on pkgs/id/web clears.

    Premise re-verified from this issue's record: triage (comment 7106660398) isolated the variable on current main — nixpkgs Bun 1.4.2 in the fleet-build image segfaults vitest at startup (both pools); official Bun 1.4.5 in the stock node:22-bookworm container passes the same suite (2 files, 14 tests). No other lane claim on this issue (3 comments, none a claim). Plan: pin Bun in the fleet toolchain sets (lib/default.nix), land via PR in the fleet repo, verify with a fleet-build dispatch of the exact vitest command from the issue, close on green.

  6. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — progress: Lane AAB (archer), 2026-11-23.

    PR #13538 is open (lane-aab-13337 @ ed60aa0): Bun pinned to the official 1.4.5 build at the three toolchain definition sites — pkgs/id/nix-common.nix (the id shell the reproduced command runs), lib/default.nix devShells (mcpx + fleet shells), and the mcpx-e2e-test image. Local verification: the pinned derivation builds from the pkgs/id pin and reports 1.4.5; eval checks show 1.4.5 in the id, fleet, and mcpx shells and the test image still evaluates.

    Container verification dispatched with the issue's exact reproduced command against the branch: handle fp_8cfa1a3ac81aebd32dc56abd465ccb3c, run https://github.com/developing-today-forks/fleet/actions/runs/45232010374 — result to be recorded here when terminal.

    The GITHUB_STEP_SUMMARY EACCES wart from this issue's body is split out to #13537 so this issue can close on the SIGSEGV evidence alone.

  7. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — diagnosis correction: Lane AAB (archer), 2026-11-23.

    The first verification dispatch against PR #13538 (run 45232010374, handle fp_8cfa1a3ac81aebd32dc56abd465ccb3c) failed with the same SIGSEGV — under the pinned Bun 1.4.5 itself. The run's log shows the container built and used the exact pinned store path, and the crash banner reads "Bun v1.4.5 (a7733435c) Linux x64 … panic(main thread): Segmentation fault at address 0x80AAAAAAAE" while running the vitest worker for screen-codec.test.ts (which loads msgpackr). So the version half of the triage premise is disproven: 1.4.2 vs 1.4.5 is not the deciding variable.

    What else the evidence now shows:

    • The same pinned Bun 1.4.5 passes both test files locally on the laptop — both invoked directly and inside the full nix develop shell (2 files, 7 tests, exit 0). The crash is specific to the fleet runner host environment (crash banner: Linux Kernel v7.0.0, glibc v2.44, AVX-512 host).
    • nixpkgs ships the baseline x86_64 Bun build (bun-linux-x64-baseline.zip); the official installer — and the reporter's passing stock-container run — use the regular bun-linux-x64.zip build. That difference is still untested in the runner.

    Two decisive dispatches are in flight against the PR branch:

    • D1 (handle fp_a8ea86e538c18486fa441c140323dfd4): same command, but vitest run through the regular (non-baseline) Bun 1.4.5 build downloaded in the container.
    • D2 (handle fp_6e446d06f474a4818bf4d51b8dbb2428): same command, but vitest run under Node (the runtime vitest is built for; the repo already runs Playwright under pkgs.nodejs for the same class of reason, pkgs/id/flake.nix test-e2e).

    PR #13538 stays open and unmerged until one of these proves green in the runner; its body is updated to match. The 1.4.5 pin itself is verified sound (builds, reports 1.4.5, passes locally, aligns the shells with the Containerfile's pin) — the open question is only whether it is part of the fix or hygiene alongside it.

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

    kind/bugSomething isn't working (prefixed form of the classic bug label)status/triagedTriaged and routed (see agent note)status:in-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions