Skip to content

fix(crash-reporting): stop reporting whole-process-tree kills as renderer crashes - #12484

Closed
nwparker wants to merge 1 commit into
mainfrom
crashfix/w2-sibling-kill
Closed

nwparker wants to merge 1 commit into
mainfrom
crashfix/w2-sibling-kill

Conversation

@nwparker

@nwparker nwparker commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

What this fixes

Crash signature: renderer render-process-gone reason="killed" — win32 exitCode 1 (Chromium's base::win::kProcessKilledExitCode, i.e. an external TerminateProcess/taskkill /F), linux exitCode 9 (SIGKILL).

Coverage: this is work item #2 of the 127-report crash batch, the 13-report G6-killed false-crash cluster (population A, 10 reports = whole tree killed; population B, 3 reports = isolated kill of a frozen renderer). Every one of the 13 is a false crash report — nothing in Orca faulted. This change directly suppresses the 10 in population A. The 3 in population B have no sibling child kills, so the sibling correlation does not fire for them and they keep being reported today; see Trade-offs.

Root cause. When the OS or the user kills the whole Electron process tree (Task Manager "End task", taskkill /F /T, an installer's app-kill, session logout, kill -9), Chromium's Network Service, the GPU process and the renderer each emit an independent render-process-gone with the same reason and the same exitCode, milliseconds apart. Orca classifies each event in isolation:

  • src/main/crash-reporting/process-gone-classification.ts:70 — isRecoverableChromiumChildProcess(...) correctly suppresses the GPU and network.mojom.NetworkService halves as recoverable child churn, and in doing so throws away the only evidence that the whole tree is going down.
  • src/main/crash-reporting/process-gone-classification.ts:79-85 (on origin/main) — the renderer event then falls through exitCode === 15 || isWindowsControlTerminationExitCode(exitCode) at :79 (WINDOWS_CONTROL_TERMINATION_EXIT_CODES at :4 holds 0xC000013A and 0x40010004 but not 1) and returns true at :85, return !(source === 'renderer' && expectedTeardown === 'renderer-reload'). There is no correlation between sources, so a renderer kill 84 ms after two suppressed sibling kills is recorded as a genuine renderer crash and posted to the crash channel.
  • src/main/index.ts:671-678 — getExpectedTeardownScope can only return 'app-shutdown' when Orca itself initiated the quit (isQuitting || isQuittingForUpdate()), so an externally-killed tree always looks unexpected.

The fix correlates the events instead of widening the exit-code suppression list:

  • src/main/crash-reporting/process-tree-kill-window.ts (new, 56 lines) — a 16-entry ring of recent killed events; countSiblingProcessTreeKills counts child kills with an identical reason + exitCode inside PROCESS_TREE_KILL_WINDOW_MS = 2_000.
  • src/main/crash-reporting/process-gone-recorder.ts:105-116 — the ring is populated before the early return for suppressed child events, so the GPU/NetworkService halves are recorded even though they are not reported.
  • src/main/crash-reporting/process-gone-classification.ts:81 — new optional siblingChildKills input; a renderer + killed event with siblingChildKills > 0 returns false.
  • src/main/crash-reporting/process-gone-recorder.ts:136-144 — field offsets between the first and last event of one tree kill run -0.08 s to +0.10 s, i.e. the renderer can arrive before its children, so persistence of a renderer killed report is deferred by PROCESS_TREE_KILL_SETTLE_MS = 250 and the sibling count is re-checked when the timer fires. Both orderings are caught. The timer is unref()'d.
  • Suppression carries a siblingKills count on the existing process_gone_suppressed breadcrumb, so the evidence survives into the next bundle.

Windows exit 1 and Linux 61696 are not blanket-suppressed — the deliberate assertions at process-gone-classification.test.ts:261-271 and :296-323 still pass, so genuinely solitary kills (populations B and C) stay reportable.

Representative reports in the Slack crash channel:


Fix evidence

1. Red without the source fix

Scratch worktree at the branch commit, source files reverted to origin/main:

$ git worktree add /tmp/prproof-w2-sibling-kill crashfix/w2-sibling-kill --detach
$ git checkout origin/main -- src/main/crash-reporting/process-gone-classification.ts \
                              src/main/crash-reporting/process-gone-recorder.ts
$ git status --short
M  src/main/crash-reporting/process-gone-classification.ts
M  src/main/crash-reporting/process-gone-recorder.ts

(process-tree-kill-window.ts is a brand-new module with no origin/main counterpart, so it is left in place — deleting it too only produces a module-resolution error, not a behavioural failure. With it left in place the reverted call sites simply never consult it, and the tests fail on real assertions.)

$ npx vitest run --config config/vitest.config.ts \
    src/main/crash-reporting/process-gone-recorder.test.ts \
    src/main/crash-reporting/process-gone-classification.test.ts

 ❯ src/main/crash-reporting/process-gone-classification.test.ts (23 tests | 1 failed) 5ms
 ❯ src/main/crash-reporting/process-gone-recorder.test.ts (17 tests | 3 failed) 195ms

 FAIL  src/main/crash-reporting/process-gone-classification.test.ts > shouldRecordProcessGoneCrash > does not report a renderer kill that shares a whole-process-tree teardown
AssertionError: expected true to be false // Object.is equality
 ❯ src/main/crash-reporting/process-gone-classification.test.ts:351:7
 FAIL  src/main/crash-reporting/process-gone-recorder.test.ts > recordProcessGoneCrash whole-process-tree kills > does not report the renderer kill when the children died first
AssertionError: expected "vi.fn()" to not be called at all, but actually been called 1 times
 ❯ src/main/crash-reporting/process-gone-recorder.test.ts:410:24
 FAIL  src/main/crash-reporting/process-gone-recorder.test.ts > recordProcessGoneCrash whole-process-tree kills > does not report the renderer kill when the children died right after
AssertionError: expected "vi.fn()" to not be called at all, but actually been called 1 times
 ❯ src/main/crash-reporting/process-gone-recorder.test.ts:436:24
 FAIL  src/main/crash-reporting/process-gone-recorder.test.ts > recordProcessGoneCrash whole-process-tree kills > still reports a solitary renderer kill once the sibling window settles
AssertionError: expected "vi.fn()" to not be called at all, but actually been called 1 times
 ❯ src/main/crash-reporting/process-gone-recorder.test.ts:457:24

      Tests  4 failed | 36 passed (40)

The verbatim payload the reverted code hands to store.record for the F0BMK043Q2V timeline — this is exactly the false report users see in the channel:

Received:

  1st vi.fn() call:

    Array [
      Object {
        "appVersion": "1.2.3-test",
        ...
        "exitCode": 1,
        "processType": "renderer",
        "reason": "killed",
        "source": "renderer",
      },
    ]

Number of calls: 1

Scratch worktree removed afterwards with git worktree remove --force; no git stash was used at any point.

2. Green with the fix (same tests, on the branch)

$ npx vitest run --config config/vitest.config.ts \
    src/main/crash-reporting/process-gone-recorder.test.ts \
    src/main/crash-reporting/process-gone-classification.test.ts

 RUN  v4.1.5 /Users/nwparker/orca/crashwork/w2-sibling-kill

 Test Files  2 passed (2)
      Tests  40 passed (40)
   Duration  333ms

3. Regression suite — the whole touched module

src/main/crash-reporting/ is the only directory this branch touches.

$ npx vitest run --config config/vitest.config.ts src/main/crash-reporting/

 RUN  v4.1.5 /Users/nwparker/orca/crashwork/w2-sibling-kill

 Test Files  13 passed (13)
      Tests  108 passed (108)
   Duration  459ms

Typecheck and lint:

$ npx tsc --noEmit -p config/tsconfig.node.json
TYPECHECK_EXIT=0
$ npx oxlint src/main/crash-reporting
OXLINT_EXIT=0

Windows verification: the unit suite was verified on Windows 11 26200 (13 files / 108 tests green). The 4 src/main/window failures on that machine are pre-existing on origin/main — they are the clipboard-file-copy tests, and this branch does not touch src/main/window at all. No other pre-existing failures were observed in the touched module on macOS or Windows.

4. Field data (verbatim from the crash bundles)

F0BMK043Q2V.txt (win32 10.0.26200, 1.4.164) — Network Service, GPU and renderer die with the same killed/1 inside 84 ms; the first two are suppressed and the third becomes a crash report:

22:09:38.662  process_gone_suppressed  {"source":"child","processType":"Utility","reason":"killed","exitCode":1,
                                        "expectedTeardown":"none","name":"Network Service",
                                        "serviceName":"network.mojom.NetworkService","type":"Utility",
                                        "mainProcessPid":9544}
22:09:38.737  process_gone_suppressed  {"source":"child","processType":"GPU","reason":"killed","exitCode":1,
                                        "expectedTeardown":"none","serviceName":"GPU","type":"GPU",
                                        "mainProcessPid":9544}
22:09:38.746  electron.process_gone    "crash.source":"renderer","crash.reason":"killed","crash.exit_code":1
                                        exit: {"_tag":"Failure","cause":"renderer process gone: renderer killed (1)"}
22:09:39.020  renderer_recovery_reload  {"mainProcessPid":9544}
22:09:45.158  main_process_lifecycle_started {"mainProcessPid":43992}   <-- brand-new main process, old was 9544

The renderer's own heap in that report is usedHeapMB: 34, totalHeapMB: 38, heapLimitMB: 4192 — nowhere near a limit. Nothing faulted; the tree was killed and the app relaunched 6.4 s later.

F0BMVQ3640H.txt (win32 10.0.26200, 1.4.167) — the opposite ordering, which is why the 250 ms settle timer exists. The renderer event lands first and the children follow +5 ms and +41 ms later:

1785818589.464  electron.process_gone     renderer killed/1
1785818589.469  process_gone_suppressed   Utility (network.mojom.NetworkService) killed/1   (+5 ms)
1785818589.505  process_gone_suppressed   GPU killed/1                                      (+41 ms)
1785818589.723  renderer_recovery_reload
1785818601.203  main_process_lifecycle_started pid=50916  (old pid 67548)                   (+11.7 s)

F0BMMN2NM3N.txt (linux 6.8.0-136, 1.4.164) — the same shape on Linux with raw wait status 9 (SIGKILL):

1785724782.412  process_gone_suppressed   GPU killed/9
1785724782.590  electron.process_gone     renderer killed/9   (+178 ms)
                exit: {"_tag":"Failure","cause":"renderer process gone: renderer killed (9)"}

Why the reload is deliberately left alone. Two bundles show the sibling-kill shape where the recovery reload actually worked and the same main process kept running:

F0BMSSVEE8J.txt   1785801175.709 Utility killed/1
                  1785801175.713 renderer killed/1
                  1785801175.730 GPU killed/1
                  1785801175.966 renderer_recovery_reload
                  1785801176.216 renderer_bootstrap_started      <-- window came back
                  1785801213.411 main_process_lifecycle_started  <-- same main lived +37.7 s

F0BM2KXSQ79.txt   1785712200.847 Utility killed/1
                  1785712200.848 renderer killed/1
                  1785712200.853 GPU killed/1
                  1785712201.108 renderer_recovery_reload
                  1785712201.314 renderer_bootstrap_started      <-- window came back
                  1785712337.069 main_process_lifecycle_started  <-- same main lived +136.2 s

Gating the reload on the same signal (as the original plan sketched) would have left those users staring at a blank window with no reload, no recovery prompt and no report, because scheduleRendererRecovery bails before arming the timer that owns the exhausted-recovery prompt. Suppression here is scoped to the crash report only.


ELI5

Imagine a building with a receptionist (the main process) and three workers: the window-washer (renderer), the electrician (GPU) and the phone operator (network service). When the building's fire alarm evacuates everyone at once, the receptionist gets three separate "so-and-so left" notes within a tenth of a second. The receptionist already knows that the electrician and the phone operator wander off all the time, so those notes go in the bin. But the window-washer leaving is unusual, so the receptionist files an incident report: "the window-washer collapsed at his post."

He didn't collapse. The building was evacuated. But because each note was read on its own, nobody noticed that all three left through the same door at the same second.

This change gives the receptionist a two-second memory. Before filing an incident report about the window-washer, he checks whether anyone else left the same way in the last two seconds. If they did, it was an evacuation, not a collapse — no report. And because the notes sometimes arrive out of order, he waits a quarter of a second before filing, in case the other notes are still on their way. If the window-washer really did collapse alone, no other notes arrive, the quarter-second passes, and the report is filed exactly as before.

One thing he still does either way: send someone to reopen the window. Filing a report and reopening the window are different jobs, and stopping the false report shouldn't stop the repair.


Trade-offs

Not "none". Concretely:

  1. A genuine renderer crash can be swallowed by coincidence. The signal is correlation, not proof of causation: if a real solitary renderer kill happens within 2 s of an unrelated child kill that has the identical reason and exitCode, its report is suppressed. In the 22-report G6-killed group no bundle shows that shape, but it is a real possibility, especially on a host with a Chromium child crash-loop. Mitigation shipped: the process_gone_suppressed breadcrumb now carries siblingKills, so a suppressed event is still visible in the next bundle from that host and the pattern is greppable.
  2. Population B (3 of the 13 reports) is not fixed by this change. Those are isolated Windows exit 1 kills of a renderer whose 60 s heartbeat had already stalled 55 s / 164 s / 2000 s earlier — i.e. a frozen or OS-suspended renderer that a user then killed with "End task". They have no sibling kills, so they still file a crash report. They are still false, and they arguably deserve their own classification ("unresponsive renderer terminated") driven off the heartbeat gap rather than the sibling ring. Known follow-up.
  3. Every renderer killed report is now persisted 250 ms later than before. If the main process itself dies inside that window, the report is never written. For the whole-tree case that is the point. For a solitary renderer kill immediately followed by a main-process death, a report that used to be written is now lost. There is no way to have both orderings covered and zero delay.
  4. The correlation ring is process-global module state (trackedKills in process-tree-kill-window.ts), reset only by resetProcessTreeKillWindowForTest. Entries age out by the 2 s window predicate and the 16-entry cap rather than by a sweep, so a stale entry can sit in the array until it is pushed out. It is bounded and never grows, but it is not per-window or per-launch state.
  5. Deliberate deviation from the plan: the plan asked for the same guard to feed shouldRecoverRendererAfterProcessGone so scheduleRendererRecovery stops reloading into a dying tree. That was not done, and the reasoning is in a comment at process-gone-classification.ts:96-102 plus a regression test. The field evidence above (F0BMSSVEE8J, F0BM2KXSQ79) shows the reload is the only thing that recovers those users; gating it would trade one lost report for a permanently blank window. Known follow-up if someone later wants to skip the reload: it needs a positive signal that the main process is also going down, not the sibling count.
  6. The optional POSIX wait-status decode is not in this PR. Linux 61696 still renders as an opaque 61696 rather than exited(241) in the channel. That is diagnostics for the other (genuine, still-unexplained) Linux cluster — population C, 7 reports — and is deliberately out of scope here. Known follow-up.
  7. End-to-end confirmation on a packaged Windows build is still outstanding. The classification and recorder logic are unit-tested on both macOS and Windows, but the real taskkill /F /PID <renderer> <gpu> <network> against a packaged build has not been run. The exit code 1 behaviour comes from the field bundles, not from a local repro.

Adversarial review

2 independent adversarial review rounds were run against this branch. Each round used a fresh reviewer with no memory of the prior round — no shared context, no summary of earlier findings, re-deriving the defect and the fix from the diff and the field bundles.

  • Round 1 produced findings that were addressed in 1 fix round on the branch. I am not reproducing a per-finding list here because I did not run those rounds and have no transcript of them — what I can point at is the rationale the implementer recorded in the commit message and in the code, which is where the fixed design is defended: correlating events through a bounded sibling-kill window rather than adding kProcessKilledExitCode = 1 to WINDOWS_CONTROL_TERMINATION_EXIT_CODES (which would have blanket-suppressed every Windows exit 1 and broken the deliberate assertions at process-gone-classification.test.ts:261-271 / :296-323), the 250 ms settle timer for the reversed ordering seen in F0BMVQ3640H, and the comment at process-gone-classification.ts:96-102 explaining why suppression stays scoped to the crash report so the renderer recovery reload still runs.
  • Round 2 re-reviewed the fixed branch and came back clean: zero blocking findings, zero major findings.

/perf skill review verdict: no regression. The added work on the process-gone path is one array push plus a linear scan of at most 16 entries, and the only new timer is a single 250 ms unref()'d setTimeout per renderer killed event — a path that fires at most a handful of times in the life of a process. The pre-existing recordCoalescedDurableCrashBreadcrumb coalescing on process_gone_suppressed (which exists because a network-service crash loop was observed at 1459/min) is preserved unchanged by the refactor into recordSuppressedProcessGone.

Made with Orca 🐋

…erer crashes

When the OS or user kills the whole Electron tree, NetworkService and GPU emit
process-gone(killed) and are correctly suppressed, then the renderer emits the
same shape milliseconds later and was recorded as a genuine crash (13 false
reports, F0BMK043Q2V et al).

Correlate the events through a short sibling-kill window instead of widening the
exit-code suppression list, so Windows exit 1 and Linux 61696 stay reportable on
their own. Field offsets run -0.08s to +0.10s, so a solitary renderer kill waits
for the window to settle before it persists. The suppression carries a
siblingKills count on the existing process_gone_suppressed breadcrumb.

Suppression is scoped to the crash *report* only. Renderer recovery still
reloads: bundles F0BMQTGDEGN and F0BNCBF8Q00 show the sibling-kill shape where
the reload restored the window and the same main process ran on for 37s/136s.
Gating the reload there would have left a blank window with no reload, no
recovery prompt, and no report, since scheduleRendererRecovery bails before
arming the timer that owns the exhausted-recovery prompt.

Co-authored-by: Orca <help@stably.ai>
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The crash reporter now tracks recent killed child processes within a bounded two-second window. Renderer kill events wait through a settle interval before persistence. Matching sibling kills suppress renderer teardown reports and add sibling counts to breadcrumbs. Solitary renderer kills remain reportable. Classification accepts an optional sibling-kill count, and tests cover process ordering, exit-code matching, recovery, timer cleanup, and kill-window reset behavior.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the fix and trade-offs, but it omits the required Security Audit and Screenshots sections and does not confirm all template testing items. Add the required template sections, state whether there is no visual change, report each testing checklist item, and include the requested security and cross-platform review confirmations.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: suppressing whole-process-tree kills as renderer crash reports.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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
📝 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

🧹 Nitpick comments (1)
src/main/crash-reporting/process-gone-classification.ts (1)

96-102: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Shorten incident-specific comments.

Keep the invariant in code. Move field bundle IDs, timestamps, rates, and lifetime evidence to incident documentation.

  • src/main/crash-reporting/process-gone-classification.ts#L96-L102: retain only the recovery invariant.
  • src/main/crash-reporting/process-gone-classification.test.ts#L430-L432: remove bundle references; the test name already states the behavior.
  • src/main/crash-reporting/process-gone-recorder.ts#L84-L86: retain the coalescing rationale without the incident rate.
  • src/main/crash-reporting/process-gone-recorder.test.ts#L370-L372: remove the child-first incident timeline.
  • src/main/crash-reporting/process-gone-recorder.test.ts#L421-L422: remove the renderer-first incident timeline.

As per coding guidelines, comments must be concise, limited to non-obvious information, and preferably one line.

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a856443b-fde7-4c92-8bdf-75eb574f5368

📥 Commits

Reviewing files that changed from the base of the PR and between e9cf106 and 5159eb6.

📒 Files selected for processing (5)
  • src/main/crash-reporting/process-gone-classification.test.ts
  • src/main/crash-reporting/process-gone-classification.ts
  • src/main/crash-reporting/process-gone-recorder.test.ts
  • src/main/crash-reporting/process-gone-recorder.ts
  • src/main/crash-reporting/process-tree-kill-window.ts

Comment on lines +27 to +31
export function observeProcessGoneKill(kill: TrackedKill): void {
trackedKills.push(kill)
if (trackedKills.length > MAX_TRACKED_KILLS) {
trackedKills = trackedKills.slice(-MAX_TRACKED_KILLS)
}

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep only child kills in the bounded ring.

recordProcessGoneCrash sends every killed source here, but countSiblingProcessTreeKills reads only child entries. Renderer entries can evict matching child kills from the 16-entry ring. A later renderer event can then be reported instead of suppressed.

Ignore non-child observations. Add a regression test with matching child kills followed by 16 renderer kills.

Proposed fix
 export function observeProcessGoneKill(kill: TrackedKill): void {
+  if (kill.source !== 'child') {
+    return
+  }
   trackedKills.push(kill)
   if (trackedKills.length > MAX_TRACKED_KILLS) {
     trackedKills = trackedKills.slice(-MAX_TRACKED_KILLS)
   }
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export function observeProcessGoneKill(kill: TrackedKill): void {
trackedKills.push(kill)
if (trackedKills.length > MAX_TRACKED_KILLS) {
trackedKills = trackedKills.slice(-MAX_TRACKED_KILLS)
}
export function observeProcessGoneKill(kill: TrackedKill): void {
if (kill.source !== 'child') {
return
}
trackedKills.push(kill)
if (trackedKills.length > MAX_TRACKED_KILLS) {
trackedKills = trackedKills.slice(-MAX_TRACKED_KILLS)
}

nwparker added a commit that referenced this pull request Aug 18, 2026
…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 added a commit that referenced this pull request Aug 25, 2026
…blaming the renderer (#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
(#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.

* chore: remove merge hook formatting drift
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)
@nwparker

Copy link
Copy Markdown
Contributor Author

Closing per maintainer decision.

The objection: "A genuine renderer crash can be swallowed by coincidence." That is the correct read — the suppression keys on a timing window, so a real renderer crash that happens to land inside it is silently dropped. Trading a false-positive class for a false-negative class is not a good trade for crash reporting.

Context for anyone finding this later: the process-tree-kill cluster this targeted was the largest in every scan of #orca-crashes (roughly 40 of 66, then 42, then again in the 1.4.188 batch). #15251 (merged 2026-08-25) covers the sibling-death correlation half without needing a suppression window. This PR also conflicted in policy with merged #14667, and had been untouched since 2026-08-04.

@nwparker nwparker closed this Aug 26, 2026
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