Repository navigation
fix(crash-reporting): correlate concurrent process deaths instead of blaming the renderer - #15251
Conversation
|
Warning Review limit reachedNext included review available in 4 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (6)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe 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)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (6)
src/main/crash-reporting/process-gone-killed-one-ordering.test.tssrc/main/crash-reporting/process-gone-recorder.test.tssrc/main/crash-reporting/process-gone-recorder.tssrc/main/crash-reporting/process-gone-sibling-attribution.tssrc/main/crash-reporting/process-gone-sibling-correlation.test.tssrc/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.
ee23085 to
afbe98e
Compare
|
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. |
…h-correlation # Conflicts: # src/main/crash-reporting/process-gone-recorder.ts
…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)
…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
…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
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:
src/main/crash-reporting/process-gone-classification.ts:73-74short-circuits withif (reason !== 'killed') return truebefore any cross-source correlation exists, andisRecoverableChromiumChildProcesshas 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, andsiblingProcessDeathRepeatsare attached to any renderer report that had child deaths nearby.crashAttribution: 'concurrent-process-deaths'is set only when the nearest sibling is withinSIBLING_ATTRIBUTION_PROXIMITY_MS = 250and no child identity repeats.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-exitinto a reason class. ExactexitCodeequality 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 passedacross the crash-reporting suites; typecheck, oxlint andcheck:max-lines-ratchetclean with no new bypasses (the recorder crossed its line budget, so the glue moved toprocess-gone-sibling-attribution.tsrather 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
(+N more)suffix.crashAttributionis a new field consumers may not know. Additive only — no existing field changes meaning. Nothing in-repo consumed it (greppedsrc/anddocs/).#12484 is open (
crashfix/w2-sibling-kill, last updated 2026-08-04) and edits the same hunks ofprocess-gone-classification.tsandprocess-gone-recorder.ts, adding its own sibling-death ring inprocess-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.