Skip to content

fix(crash-reporting): correlate concurrent process deaths instead of blaming the renderer - #15251

Merged
nwparker merged 4 commits into
mainfrom
nwparker/sibling-death-correlation
Aug 25, 2026
Merged

nwparker merged 4 commits into
mainfrom
nwparker/sibling-death-correlation

Conversation

@nwparker

@nwparker nwparker commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​384 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​384
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​368 $\color{#cf222e}{\Huge{\mathbf{−}}}$​18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​350

The bug

When a Chromium child process dies and takes the renderer with it, Orca files the renderer half as an independent renderer crash. Two reports in the 1.4.184 batch are exactly this:

NetworkService crashed  →  renderer "crashed" +21ms   (same reason, same exitCode -1)
AudioService   crashed  →  renderer "crashed"  +2ms  →  GPU +180ms

src/main/crash-reporting/process-gone-classification.ts:73-74 short-circuits with if (reason !== 'killed') return true before any cross-source correlation exists, and isRecoverableChromiumChildProcess has already discarded the sibling half as recoverable churn. So the sibling death is dropped as noise and its collateral is promoted to a headline renderer crash.

That is roughly 2 of 28 reports in this batch misattributed outright, and it removes the one piece of context that would have explained them.

What this does

Correlates concurrent process deaths and records the evidence on the renderer report. Deliberately evidence-first, not suppression:

  • siblingProcessDeathCount, signed offsets, and siblingProcessDeathRepeats are attached to any renderer report that had child deaths nearby.
  • crashAttribution: 'concurrent-process-deaths' is set only when the nearest sibling is within SIBLING_ATTRIBUTION_PROXIMITY_MS = 250 and no child identity repeats.
  • Nothing is ever suppressed. A renderer crash that was going to be reported still is.

Suppression was rejected on purpose: silently dropping crash evidence is how real bugs get missed, and #14667 deliberately kept ambiguous tree kills reportable. The attribution names evidence ("these died together"), not a causal claim — a co-victim in a whole-tree kill is not "caused by" its sibling.

Window, justified from data not rounded

SIBLING_DEATH_LOOKBACK_MS = 1_000 / SIBLING_DEATH_LOOKAHEAD_MS = 250. The lookahead covers the observed +180ms GPU death and no more; an earlier symmetric ±1000ms window would have let a child dying up to a second after a genuine lone renderer crash retro-label an already-persisted report.

Cross-platform

Correlation buckets crashed/abnormal-exit into a reason class. Exact exitCode equality is a hard gate only on win32 and merely corroborating elsewhere, because POSIX wait statuses diverge between a signalled child and its renderer.

Fix evidence

Both real field sequences are pinned as tests, and — the important one — a negative test proves an independent renderer crash with no sibling nearby is still reported. Every guard in the module was mutation-tested individually: reason class, exit-code gate, lookahead, proximity, repeat guard, attach cap, and the unchanged-evidence skip each now fail a test when removed.

216 passed across the crash-reporting suites; typecheck, oxlint and check:max-lines-ratchet clean with no new bypasses (the recorder crossed its line budget, so the glue moved to process-gone-sibling-attribution.ts rather than taking a disable).

ELI5

Four of Orca's helper processes are wired together. When one dies, the others often fall over with it — like one strand snapping and taking its neighbours.

Orca was throwing away the "a helper died" note as routine noise, then seeing the renderer fall over a few milliseconds later and reporting that as the crash. So the report blamed the victim standing closest to the accident and threw away the accident.

This keeps the note. When several processes die together it says so on the report, with how far apart they died. It never hides a crash — it just stops a bystander from being written up as the culprit.

Trade-offs

  1. Reports get bigger. Every renderer report with nearby child deaths gains a few detail fields. Bounded: at most 2 late attaches per report, the rendered sibling list is budgeted to 200 chars and drops whole entries with a (+N more) suffix.
  2. A pending-report window is held in memory between the renderer death and its persist. Bounded by the lookahead and pruned; it cannot grow across a session or leak between launches.
  3. crashAttribution is a new field consumers may not know. Additive only — no existing field changes meaning. Nothing in-repo consumed it (grepped src/ and docs/).
  4. It does not reduce the report count, by design. If the goal were a quieter channel, suppression would do that — and would also hide real crashes.

⚠️ Needs a decision: overlap with open PR #12484

#12484 is open (crashfix/w2-sibling-kill, last updated 2026-08-04) and edits the same hunks of process-gone-classification.ts and process-gone-recorder.ts, adding its own sibling-death ring in process-tree-kill-window.ts.

The two are complementary in intent — #12484 targets whole-tree kills (reason='killed', cluster A), this targets sibling collateral (reason='crashed', cluster E) — but they will conflict textually and they take opposite policies on what to do with the correlated death.

They should not both land as-is. Options: rebase #12484 on top of this, fold this into #12484, or close one. I did not touch #12484 — it is yours and this is your call.

Adversarial review

2 reviewers (correctness + integration), 10 blocking findings, all fixed. Notable: the symmetric window retro-labelling persisted reports; recoverable child churn inside the window labelling a genuine crash; a win32-shaped predicate that would misbehave on POSIX; a swallowed .catch(() => {}) on the late attach; and the sibling list being silently cut at the 240-char generic detail cap in exactly the crash-loop case it exists to describe.

@coderabbitai

coderabbitai Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

Next included review available in 4 minutes.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ab3d0252-8f30-492d-bf6c-13e6c40564d7

📥 Commits

Reviewing files that changed from the base of the PR and between deae721 and 1028cc6.

📒 Files selected for processing (6)
  • src/main/crash-reporting/process-gone-killed-one-ordering.test.ts
  • src/main/crash-reporting/process-gone-recorder.test.ts
  • src/main/crash-reporting/process-gone-recorder.ts
  • src/main/crash-reporting/process-gone-sibling-attribution.ts
  • src/main/crash-reporting/process-gone-sibling-correlation.test.ts
  • src/main/crash-reporting/process-gone-sibling-correlation.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ed4aa1e8-0e79-4129-8809-2c0d05709ae1

📥 Commits

Reviewing files that changed from the base of the PR and between a3edabc and afbe98e.

📒 Files selected for processing (6)
  • src/main/crash-reporting/process-gone-killed-one-ordering.test.ts
  • src/main/crash-reporting/process-gone-recorder.test.ts
  • src/main/crash-reporting/process-gone-recorder.ts
  • src/main/crash-reporting/process-gone-sibling-attribution.ts
  • src/main/crash-reporting/process-gone-sibling-correlation.test.ts
  • src/main/crash-reporting/process-gone-sibling-correlation.ts
🚧 Files skipped from review as they are similar to previous changes (6)
  • src/main/crash-reporting/process-gone-recorder.test.ts
  • src/main/crash-reporting/process-gone-sibling-attribution.ts
  • src/main/crash-reporting/process-gone-sibling-correlation.test.ts
  • src/main/crash-reporting/process-gone-recorder.ts
  • src/main/crash-reporting/process-gone-killed-one-ordering.test.ts
  • src/main/crash-reporting/process-gone-sibling-correlation.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The change adds bounded correlation for child-process deaths and renderer crashes. It matches deaths by timing and failure signature, records sibling details, detects repeated identities, and supports late attribution updates to persisted reports. Process-gone recording now invokes correlation and attachment logic. Failure breadcrumbs are recorded for unsuccessful attachments. Tests cover attribution, timing boundaries, platform-specific status matching, truncation, repeated churn, persistence updates, and state cleanup.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the primary change: correlating concurrent process deaths instead of misattributing them to the renderer.
Description check ✅ Passed The description clearly explains the bug, implementation, trade-offs, testing, and cross-platform behavior, but it omits several template headings and the required explicit issue link.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 64d96133-c5b5-4f41-8202-e8664e740d88

📥 Commits

Reviewing files that changed from the base of the PR and between 7a695c7 and ee23085.

📒 Files selected for processing (6)
  • src/main/crash-reporting/process-gone-killed-one-ordering.test.ts
  • src/main/crash-reporting/process-gone-recorder.test.ts
  • src/main/crash-reporting/process-gone-recorder.ts
  • src/main/crash-reporting/process-gone-sibling-attribution.ts
  • src/main/crash-reporting/process-gone-sibling-correlation.test.ts
  • src/main/crash-reporting/process-gone-sibling-correlation.ts

Included review availability: Your plan includes up to 10 reviews per rolling hour; 2 remain after this review.

…er report

Two 1.4.184 reports (a326935a, 1862f316) are renderer "crashed"/-1 crash reports
whose renderer only died alongside a sibling Chromium child that died at the same
instant:

  F0BQMB30GJX  network.mojom.NetworkService crashed/-1  -21ms -> renderer crashed/-1
  F0BRPP8TC0Y  audio.mojom.AudioService     crashed/-1   -2ms -> renderer crashed/-1
                                                  GPU crashed/-1 +180ms

process-gone-classification.ts classifies each event in isolation:
isRecoverableChromiumChildProcess discards the utility/GPU halves as recoverable
churn, and `if (reason !== 'killed') return true` then reports the renderer half as
a genuine renderer crash before any cross-source signal exists. Triage reads
"renderer crashed" for what died with three other processes.

process-gone-sibling-correlation keeps a bounded ring of child deaths, populated
before the suppression early-return so churn-suppressed siblings stay visible, and
matches a renderer death against child deaths sharing its failure signature.

What the timing can and cannot support:

- The window is asymmetric. 1s of lookback (a child that died first can plausibly
  have taken the renderer with it), but only 250ms of lookahead: a child dying well
  after the renderer is at least as likely to be an effect of it — Chromium tearing
  down the dead renderer's channels, or renderer_recovery_reload at +264ms — and a
  symmetric window would retro-label a genuine lone crash as collateral.
- crashAttribution is 'concurrent-process-deaths', not a causal claim. The largest
  1.4.184 cluster is an external taskkill /T where renderer and children are
  co-victims; no sibling caused anything there.
- The verdict is not derived from timing alone. A host with a child looping at the
  observed 1459/min drops a death into every window, so crashAttribution is set only
  when the nearest sibling is within 250ms and no identity repeats. Looser or
  repeating deaths still ship as evidence (siblingProcessDeathCount, signed offsets,
  siblingProcessDeathRepeats) with no attribution.
- The signature match buckets `crashed` with `abnormal-exit` and gates on the exit
  code only on win32. Both fixtures are win32, where every process in a collateral
  pair reports crashed/-1; POSIX surfaces a per-process wait status, so an equality
  gate would mean this never fires on macOS or Linux.

The report stays reportable and gains evidence rather than being suppressed
(#14667). Both arrival orders are covered without delaying persistence: a sibling
that dies first is folded into the initial record, a sibling that dies after amends
the record already on disk through attachDetails, the same way the minidump
signature does. Late amends are capped at two per report and skipped when the
rendered evidence is unchanged, so a crash-looping child cannot rewrite the store
during renderer recovery, and a failed amend now leaves a
sibling_attribution_attach_failed breadcrumb instead of vanishing.

Relationship to #12484: it is still OPEN and adds process-tree-kill-window.ts, the
same ring/lookback bookkeeping with a 250ms settle, patching the same recorder
hunks with the opposite policy (suppress the killed/1 renderer report instead of
keeping it). #14667 is test-only — it pinned the keep-the-report policy in tests, it
did not remove a shipped implementation. #12484 has to be closed or rebased out
before this lands.
@nwparker
nwparker force-pushed the nwparker/sibling-death-correlation branch from ee23085 to afbe98e Compare August 18, 2026 20:28
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@nwparker
nwparker merged commit 6103b78 into main Aug 25, 2026
93 of 95 checks passed
paidaxingyo666 pushed a commit to paidaxingyo666/Manta that referenced this pull request Aug 25, 2026
…blaming the renderer (stablyai#15251)

* fix(crash-reporting): correlate concurrent process deaths on a renderer report

Two 1.4.184 reports (a326935a, 1862f316) are renderer "crashed"/-1 crash reports
whose renderer only died alongside a sibling Chromium child that died at the same
instant:

  F0BQMB30GJX  network.mojom.NetworkService crashed/-1  -21ms -> renderer crashed/-1
  F0BRPP8TC0Y  audio.mojom.AudioService     crashed/-1   -2ms -> renderer crashed/-1
                                                  GPU crashed/-1 +180ms

process-gone-classification.ts classifies each event in isolation:
isRecoverableChromiumChildProcess discards the utility/GPU halves as recoverable
churn, and `if (reason !== 'killed') return true` then reports the renderer half as
a genuine renderer crash before any cross-source signal exists. Triage reads
"renderer crashed" for what died with three other processes.

process-gone-sibling-correlation keeps a bounded ring of child deaths, populated
before the suppression early-return so churn-suppressed siblings stay visible, and
matches a renderer death against child deaths sharing its failure signature.

What the timing can and cannot support:

- The window is asymmetric. 1s of lookback (a child that died first can plausibly
  have taken the renderer with it), but only 250ms of lookahead: a child dying well
  after the renderer is at least as likely to be an effect of it — Chromium tearing
  down the dead renderer's channels, or renderer_recovery_reload at +264ms — and a
  symmetric window would retro-label a genuine lone crash as collateral.
- crashAttribution is 'concurrent-process-deaths', not a causal claim. The largest
  1.4.184 cluster is an external taskkill /T where renderer and children are
  co-victims; no sibling caused anything there.
- The verdict is not derived from timing alone. A host with a child looping at the
  observed 1459/min drops a death into every window, so crashAttribution is set only
  when the nearest sibling is within 250ms and no identity repeats. Looser or
  repeating deaths still ship as evidence (siblingProcessDeathCount, signed offsets,
  siblingProcessDeathRepeats) with no attribution.
- The signature match buckets `crashed` with `abnormal-exit` and gates on the exit
  code only on win32. Both fixtures are win32, where every process in a collateral
  pair reports crashed/-1; POSIX surfaces a per-process wait status, so an equality
  gate would mean this never fires on macOS or Linux.

The report stays reportable and gains evidence rather than being suppressed
(stablyai#14667). Both arrival orders are covered without delaying persistence: a sibling
that dies first is folded into the initial record, a sibling that dies after amends
the record already on disk through attachDetails, the same way the minidump
signature does. Late amends are capped at two per report and skipped when the
rendered evidence is unchanged, so a crash-looping child cannot rewrite the store
during renderer recovery, and a failed amend now leaves a
sibling_attribution_attach_failed breadcrumb instead of vanishing.

Relationship to stablyai#12484: it is still OPEN and adds process-tree-kill-window.ts, the
same ring/lookback bookkeeping with a 250ms settle, patching the same recorder
hunks with the opposite policy (suppress the killed/1 renderer report instead of
keeping it). stablyai#14667 is test-only — it pinned the keep-the-report policy in tests, it
did not remove a shipped implementation. stablyai#12484 has to be closed or rebased out
before this lands.

* chore: remove merge hook formatting drift

(cherry picked from commit 6103b78)
dallascrilley pushed a commit to dallascrilley/orca that referenced this pull request Aug 27, 2026
…blaming the renderer (stablyai#15251)

* fix(crash-reporting): correlate concurrent process deaths on a renderer report

Two 1.4.184 reports (a326935a, 1862f316) are renderer "crashed"/-1 crash reports
whose renderer only died alongside a sibling Chromium child that died at the same
instant:

  F0BQMB30GJX  network.mojom.NetworkService crashed/-1  -21ms -> renderer crashed/-1
  F0BRPP8TC0Y  audio.mojom.AudioService     crashed/-1   -2ms -> renderer crashed/-1
                                                  GPU crashed/-1 +180ms

process-gone-classification.ts classifies each event in isolation:
isRecoverableChromiumChildProcess discards the utility/GPU halves as recoverable
churn, and `if (reason !== 'killed') return true` then reports the renderer half as
a genuine renderer crash before any cross-source signal exists. Triage reads
"renderer crashed" for what died with three other processes.

process-gone-sibling-correlation keeps a bounded ring of child deaths, populated
before the suppression early-return so churn-suppressed siblings stay visible, and
matches a renderer death against child deaths sharing its failure signature.

What the timing can and cannot support:

- The window is asymmetric. 1s of lookback (a child that died first can plausibly
  have taken the renderer with it), but only 250ms of lookahead: a child dying well
  after the renderer is at least as likely to be an effect of it — Chromium tearing
  down the dead renderer's channels, or renderer_recovery_reload at +264ms — and a
  symmetric window would retro-label a genuine lone crash as collateral.
- crashAttribution is 'concurrent-process-deaths', not a causal claim. The largest
  1.4.184 cluster is an external taskkill /T where renderer and children are
  co-victims; no sibling caused anything there.
- The verdict is not derived from timing alone. A host with a child looping at the
  observed 1459/min drops a death into every window, so crashAttribution is set only
  when the nearest sibling is within 250ms and no identity repeats. Looser or
  repeating deaths still ship as evidence (siblingProcessDeathCount, signed offsets,
  siblingProcessDeathRepeats) with no attribution.
- The signature match buckets `crashed` with `abnormal-exit` and gates on the exit
  code only on win32. Both fixtures are win32, where every process in a collateral
  pair reports crashed/-1; POSIX surfaces a per-process wait status, so an equality
  gate would mean this never fires on macOS or Linux.

The report stays reportable and gains evidence rather than being suppressed
(stablyai#14667). Both arrival orders are covered without delaying persistence: a sibling
that dies first is folded into the initial record, a sibling that dies after amends
the record already on disk through attachDetails, the same way the minidump
signature does. Late amends are capped at two per report and skipped when the
rendered evidence is unchanged, so a crash-looping child cannot rewrite the store
during renderer recovery, and a failed amend now leaves a
sibling_attribution_attach_failed breadcrumb instead of vanishing.

Relationship to stablyai#12484: it is still OPEN and adds process-tree-kill-window.ts, the
same ring/lookback bookkeeping with a 250ms settle, patching the same recorder
hunks with the opposite policy (suppress the killed/1 renderer report instead of
keeping it). stablyai#14667 is test-only — it pinned the keep-the-report policy in tests, it
did not remove a shipped implementation. stablyai#12484 has to be closed or rebased out
before this lands.

* chore: remove merge hook formatting drift
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…blaming the renderer (stablyai#15251)

* fix(crash-reporting): correlate concurrent process deaths on a renderer report

Two 1.4.184 reports (a326935a, 1862f316) are renderer "crashed"/-1 crash reports
whose renderer only died alongside a sibling Chromium child that died at the same
instant:

  F0BQMB30GJX  network.mojom.NetworkService crashed/-1  -21ms -> renderer crashed/-1
  F0BRPP8TC0Y  audio.mojom.AudioService     crashed/-1   -2ms -> renderer crashed/-1
                                                  GPU crashed/-1 +180ms

process-gone-classification.ts classifies each event in isolation:
isRecoverableChromiumChildProcess discards the utility/GPU halves as recoverable
churn, and `if (reason !== 'killed') return true` then reports the renderer half as
a genuine renderer crash before any cross-source signal exists. Triage reads
"renderer crashed" for what died with three other processes.

process-gone-sibling-correlation keeps a bounded ring of child deaths, populated
before the suppression early-return so churn-suppressed siblings stay visible, and
matches a renderer death against child deaths sharing its failure signature.

What the timing can and cannot support:

- The window is asymmetric. 1s of lookback (a child that died first can plausibly
  have taken the renderer with it), but only 250ms of lookahead: a child dying well
  after the renderer is at least as likely to be an effect of it — Chromium tearing
  down the dead renderer's channels, or renderer_recovery_reload at +264ms — and a
  symmetric window would retro-label a genuine lone crash as collateral.
- crashAttribution is 'concurrent-process-deaths', not a causal claim. The largest
  1.4.184 cluster is an external taskkill /T where renderer and children are
  co-victims; no sibling caused anything there.
- The verdict is not derived from timing alone. A host with a child looping at the
  observed 1459/min drops a death into every window, so crashAttribution is set only
  when the nearest sibling is within 250ms and no identity repeats. Looser or
  repeating deaths still ship as evidence (siblingProcessDeathCount, signed offsets,
  siblingProcessDeathRepeats) with no attribution.
- The signature match buckets `crashed` with `abnormal-exit` and gates on the exit
  code only on win32. Both fixtures are win32, where every process in a collateral
  pair reports crashed/-1; POSIX surfaces a per-process wait status, so an equality
  gate would mean this never fires on macOS or Linux.

The report stays reportable and gains evidence rather than being suppressed
(stablyai#14667). Both arrival orders are covered without delaying persistence: a sibling
that dies first is folded into the initial record, a sibling that dies after amends
the record already on disk through attachDetails, the same way the minidump
signature does. Late amends are capped at two per report and skipped when the
rendered evidence is unchanged, so a crash-looping child cannot rewrite the store
during renderer recovery, and a failed amend now leaves a
sibling_attribution_attach_failed breadcrumb instead of vanishing.

Relationship to stablyai#12484: it is still OPEN and adds process-tree-kill-window.ts, the
same ring/lookback bookkeeping with a 250ms settle, patching the same recorder
hunks with the opposite policy (suppress the killed/1 renderer report instead of
keeping it). stablyai#14667 is test-only — it pinned the keep-the-report policy in tests, it
did not remove a shipped implementation. stablyai#12484 has to be closed or rebased out
before this lands.

* chore: remove merge hook formatting drift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant