Skip to content

CI: unit (linux) turbo run segfaulted mid-suite on main — @opencode/core:test never ran, truncated run reads as ordinary failure #90

Closed

Description

@dezren39

Problem

The unit (linux) job on current main crashed mid-suite: turbo itself segfaulted, so the run's failure reads as ordinary test failures while most of the affected suite never executed — including @opencode/core:test, the package the validated merge changed.

Evidence (verified 2026-10-19)

Run 39182188357 — test workflow, push to main at b3e93cd0 (merge of PR #88, the #87 subagent-cycle fix), job unit (linux) (117837096275), 00:45:17Z–00:48:18Z:

Test summaries actually printed before the crash:

Then, at 00:48:12Z, @opencode/cli:test started (cache miss, executing cfbd54e631d40ea2), and ~1.6s later:

error: Failed to run "turbo" due to signal SIGSEGV
... line 6:  2309 Segmentation fault      (core dumped) GITHUB_ACTIONS=false bun turbo test --affected --concurrency=3
##[error]Process completed with exit code 139.

No @opencode/core:test group ever opens in the log. packages/core is where PR #88 landed (packages/core/src/tool/plugin/subagent.ts), so current main has no unit (linux) verdict for core at all — the only visible failures are the two pre-existing #62 sdk tests, which makes the run look like a routine known-failure run.

The sibling unit (windows) job in the same run completed its suite (failures: the same 2 #62 tests + the known Windows #!/bin/sh mcpx ensureDaemon spawn test) — the crash is linux-job-only in this instance.

Scope check

Why it matters

A test-orchestrator crash that leaves the job summary indistinguishable from ordinary test failures silently erases CI signal: reviewers and sweeps triage the visible failures (#62) and move on, while the package that actually changed ships with no unit verdict. It already happened once on the merge that most needed the verdict.

Acceptance criteria

  • A re-run (or a new push) produces a complete unit (linux) run for b3e93cd0 or a later main head in which @opencode/core:test reports a summary, so main has a real core verdict.
  • On any recurrence, the turbo and bun versions in play and the runner's core dump / dmesg tail are captured on this issue (the unit step runs bun turbo test --affected --concurrency=3; the sibling affected job pins turbo@2.10.2 — record which binary actually segfaulted).
  • The unit job distinguishes an orchestrator crash from test failures in its outcome — e.g. per-package test steps/jobs, or a wrapper that retries once on exit 139 and annotates the run — so a truncated suite cannot masquerade as a complete red run.
  • If a re-run plus several subsequent main runs show no recurrence, close with that evidence and keep the distinguishing measure (or record why it is not needed).

Activity

  1. added
    kind/ciCI/CD pipelines, workflows, and build automation
    source/humanFiled directly by a human
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    area/ciCI, workflows, and build infrastructure
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 26, 2026
  2. dezren39 commented on Oct 26, 2026

    @dezren39
    Author

    Intake review

    🤖 Fleet monitor intake pass (protocol §5). The body already carries acceptance criteria, so the body was left untouched; this pass adds labels and this comment only.

    Related: run 39182188357 on main at b3e93cd (merge of PR #88 / #87 fix), detailed in the body; the two @opencode/sdk failures in that run were the already-tracked #62 assertions.

    Live check: still open and previously unlabelled. I did not find evidence in this pass that the turbo segfault has recurred or been diagnosed — equally, a single 2026-10-19 crash with no recurrence data may now be stale, which the next triage should test against recent unit (linux) runs before investing in a root-cause hunt.

    Notes / risks: the failure mode is dangerous precisely because it masquerades as ordinary test failures while suites (including @opencode/core:test) never run — a truncated run should fail loudly, not read as red tests.

    Suggested approach: first check recent main runs for any repeat SIGSEGV / exit-139 signature; if none, close-or-park with that evidence; if it recurs, treat making the truncation visible (job-level signal check) as the fixable part, with the turbo crash itself upstream.

  3. dezren39 commented on Oct 28, 2026

    @dezren39
    Author

    Triage verdict: segfault NOT recurring on current main; the distinguishing measure is still missing

    Checked against live CI on current main (2026-10-28), not the issue text alone. The original sighting was run 39182188357 on b3e93cd0 (2026-10-19): turbo SIGSEGV, exit 139, @opencode/core:test never ran.

    No recurrence in sampled current-main runs (test workflow, unit (linux) logs grepped for SIGSEGV / Segmentation fault / exit code 139):

    • Run 40744745296 (b0633cc6): 0 crash matches; the @opencode/core:test group opened and executed — so acceptance criterion 1 (a later main head where core reports) is met.
    • Run 40741605903 (cb92f8fe): 0 crash matches, core:test present.
    • Run 40740624281 (af239842): 0 crash matches, core:test present.
    • Run 40737402873 (ad881d2b): unit (linux) success, 0 crash matches in the full log.

    Still open — criterion 3: at origin/main cd21eab1dec5, .github/workflows/test.yml's "Run unit tests" step is still a single bare GITHUB_ACTIONS=false bun turbo test --affected --concurrency=3 — no retry on exit 139, no distinct annotation, no turbo/bun version capture on crash. If turbo segfaults again, a truncated suite will again read as ordinary test failures.

    Route

    Scoped follow-up packet enqueued to repo-health-opencode-pilot as task 2693 (kind small_fix, dedupe repo-health:v1:fix:developing-today/opencode:issue:90): wrap the unit step so an orchestrator crash retries once and, on recurrence, is annotated distinctly with versions recorded; ordinary test failures unchanged. Criterion 4's close-with-evidence path applies once that measure lands — this issue stays open until then.

    Labels synced: status/needs-triage removed; queue/queued set for task 2693.

  4. added
    queue/queuedHas a queued task in the Supabase agent queue
    and removed on Oct 28, 2026
  5. dezren39 commented on Oct 28, 2026

    @dezren39
    Author

    🤖 Dispatcher binding · openchamber-dispatcher run 2026-10-28 15:30 CDT

  6. dezren39 commented on Oct 28, 2026

    @dezren39
    Author

    Task 2693 checkpoint: crash-retry wrapper implemented, PR open, CI reported

    Branch/commit: queue/2693-90-turbo-crash-ci @ 72ea2299 — PR #761 (opened, not merged): #761

    What changed

    • .github/workflows/test.yml, Run unit tests step only: both the --affected variant and the workflow_dispatch full-suite variant now invoke bash script/run-unit-tests.sh bun turbo test …. The step's env and flags are otherwise unchanged.
    • script/run-unit-tests.sh (new): runs the given command and inspects the outcome.
      • exit 139 or SIGSEGV anywhere in the attempt's output → ::warning title=Unit test orchestrator crashed::, then one retry.
      • retry crashes too → ::error title=Unit test orchestrator crashed twice:: stating that the run was truncated (so packages after the crash point, e.g. @opencode/core:test, may have no verdict) and recording turbo and bun versions, plus the same facts in the step summary. Fallback to the package.json pins if a crashed binary cannot answer --version.
      • retry passes → ::notice title=Unit tests passed on retry:: and a summary line, so a flake leaves a trace.
      • any other non-zero exit → ordinary test failure, passed through unrepeated, same exit code, no crash annotation.
      • Detection is deliberately the narrow one this issue names. A crash of a bun test process inside a finished turbo task already surfaces as a normal turbo task failure, which this measure does not reinterpret.
      • Turbo replays tasks completed before the crash, so the retry executes only the missing remainder of the suite.

    Simulation (laptop, stub commands, CI shell flags bash -eo pipefail, GITHUB_STEP_SUMMARY captured)

    • crash twice (stub exits 139 with Bun's Failed to run "turbo" due to signal SIGSEGV): warning → retry → distinct error annotation with turbo 2.10.2, bun 1.4.2 in both annotation and summary, exit 139.
    • crash once, then pass: warning → retry → notice, exit 0.
    • ordinary failure (exit 1, no signal text): one attempt, exit 1, no annotation, empty summary.
    • marker only (exit 1 with SIGSEGV printed): retried and annotated as a crash, exit 1 preserved.
    • success: one attempt, exit 0, no annotation.
    • bash -n and shellcheck clean; workflow YAML parses and the step resolves to the wrapper on both branches.

    CI on the PR (run 40765912824, base cd21eab1)

    State

    Implementation, simulation and CI reporting are done. PR #761 is open for review and must not be merged until checks are judged; its unit checks will stay red on #565 (tracked separately) regardless of this change. Nothing here requires a decision from #90's owners beyond merging the measure.

    Closure note

    Triage 2063 found no recurrence in 4 sampled recent main runs (runs 40744745296, 40741605903, 40740624281, 40737402873; @opencode/core:test present each time), and this measure now supplies criterion 3. I am not closing #90 myself; close it once PR #761 has merged and the measure is on main.

  7. dezren39 commented on Oct 28, 2026

    @dezren39
    Author

    Closing per acceptance: (1) triage task 2063 found no recurrence of the turbo SIGSEGV in sampled current-main runs (runs 40744745296, 40741605903, 40740624281, 40737402873 — 0 segfault matches, @opencode/core:test executed); (2) PR #761 (merged a66dd47) adds the criterion-3 distinguishing measure: script/run-unit-tests.sh wraps both unit-step variants — a crash (exit 139 / SIGSEGV marker) retries once and, on recurrence, annotates distinctly (::error title=Unit test orchestrator crashed twice::) with turbo+bun versions in the annotation and step summary; ordinary failures are untouched.

  8. removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 28, 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

    area/ciCI, workflows, and build infrastructureeffort/mMedium: expected under 1 day of workkind/ciCI/CD pipelines, workflows, and build automationmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/humanFiled directly by a humanstatus:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions