orca icon indicating copy to clipboard operation
orca copied to clipboard

Crash reporting unreliable on Windows: automatic capture/prompt never fires and manual "Send Report" fails

Open brennanb2025 opened this issue 4 months ago • 2 comments

Summary

Orca's crash-reporting pipeline is failing on at least one Windows 11 machine in two distinct ways, leaving a user who is actively hitting renderer crashes unable to get a report to us:

  1. No report is ever captured / no prompt appears. Despite repeated renderer crashes, the user was never shown the automatic "Report a crash" prompt on relaunch, and opening it manually (Help → Report Crash…) shows "No automatic crash report was captured."
  2. Manual submission fails. Filling in the dialog and pressing Send Report fails with a red toast: "Failed to send crash report."

This is a crash-reporting reliability bug, separate from the underlying renderer crash / PTY-orphaning behavior (#7742) and the watcher.node crash (#7547). Because reporting is the channel we rely on to diagnose those crashes, this bug is blocking our ability to root-cause the others.

Failure mode 1 — automatic capture / prompt never fires

On render-process-gone, main is supposed to persist a status: 'pending' crash record:

  • src/main/index.ts:1245 — crashReports.record({ ... }) inside recordProcessGoneCrash.
  • On next launch the renderer auto-opens the dialog when getLatestPending() returns a pending record: src/renderer/src/components/crash-report/CrashReportDialog.tsx:33,84.

The record is only written when the crash passes shouldRecordProcessGoneCrash (src/main/index.ts:1199) and isCrashReportReason(reason). So a machine that crashed repeatedly but has no pending record means one of:

  • the crashes were classified as expected teardown (renderer-reload) and suppressed — plausible given #7742's crash→auto-reload recovery path marks reloads as expected (src/main/crash-reporting/process-gone-classification.ts:85);
  • the persist itself failed — crashReports.record(...) writes crash-reports.json via writeFile (src/main/crash-reporting/crash-report-store.ts:49-68), and the .catch only logs (index.ts:1262), so a failed write on a machine under disk/commit pressure would silently leave no record;
  • the store never initialized.

We can't tell which from the outside because the only signal is a console.error. This path needs a durable breadcrumb ("crash record persist failed", "process-gone suppressed as expected-teardown") so a machine with no captured report is diagnosable.

Failure mode 2 — "Failed to send crash report"

The submit path is crashReports:submit → submitFeedback → POST to https://www.onorca.dev/v1/feedback (src/main/ipc/feedback.ts). The backend is healthy (a plain-JSON POST returns 202, and other users' manual crash reports are arriving), so the failure is specific to this submission. The one variable that differs is the "Attach recent diagnostic logs" checkbox, which switches the request onto a fragile path:

  • Different transport. With logs attached, the request becomes a multipart FormData upload with the trace bundle as a Blob (feedback.ts:94-131), vs a small JSON body otherwise. The bundle is capped at 4 MiB (src/main/observability/diagnostic-bundle-limits.ts:1) but built from a trace file that can be ~10 MB pre-cap.
  • 10-second timeout. FEEDBACK_REQUEST_TIMEOUT_MS = 10_000 (feedback.ts:11) aborts the whole POST. A ~4 MiB multipart upload needs ~3.3 Mbps sustained to make that window; a slow/corporate uplink → AbortError → failure.
  • Fallback only fires on 404 / ≥500. submitFeedback (feedback.ts:177) only retries the fallback host on 404 or 5xx. A multipart-specific rejection (400 / 413) returns failure with no retry.
  • The real error is hidden. The renderer only logs result.error to console.error and shows a generic toast (CrashReportDialogSurface.tsx:176-183), so the user (and we) can't tell whether it was size, timeout, network, or a proxy.

Repro / workaround for the affected user

  • Uncheck "Attach recent diagnostic logs" and Send again. If it succeeds, the multipart/bundle path is confirmed as the cause (size / timeout / proxy / backend multipart handling) — the trace can then be attached to the issue manually.
  • Use "Copy Details" to paste the report straight into the issue, bypassing the endpoint entirely.
  • If the box-unchecked send also fails, onorca.dev is being blocked from that network (proxy / firewall / DNS).

Proposed fixes

  1. Surface the actual failure reason in the toast (status code / AbortError / "diagnostic ticket uploaded but not linked" already exists) instead of a bare "Failed to send crash report."
  2. Make the bundle path robust: raise/streamed timeout for multipart uploads, retry-without-bundle on failure, and broaden the fallback beyond 404/5xx.
  3. Add durable diagnostics for capture so "No automatic crash report was captured" is explainable: breadcrumb the persist-failure and the expected-teardown suppression, and confirm whether #7742's crash→auto-reload recovery is wrongly classifying real crashes as expected reloads.
  4. Consider auto-trimming the bundle further (or chunked upload) so large-trace machines aren't the ones that can't report.

Environment

  • Orca on Windows 11 (10.0.26200), PowerShell 7.6.3, ~5 terminals across multiple worktrees.
  • Distinct from the memory/commit daemon-death issue (mitigated via larger pagefile), from #7742 (renderer crash + PTY orphaning), and from #7547 (watcher.node crash).

Made with Orca 🐋

brennanb2025 avatar Jul 08 '26 04:07 brennanb2025

The July 6–10 Windows crash batch confirms that successful diagnostic-bundle submission still leaves a major native-crash triage gap: the bundle contains process-gone metadata and breadcrumbs, but no Crashpad dump (or dump/ticket identifier) to symbolicate the renderer fault.

Examples that cannot be reliably reproduced from the bundle alone:

  • Report 08 (1.4.128, Win11 26200): renderer crashed, exit -1; heap 18/22 MB immediately before; Claude moved to waiting 21s earlier; no JS rejection/error or process-gone detail for the occurrence.
  • Report 13 (1.4.131, Win11 26200): renderer crashed, exit -1; heap ~78/82 MB, renderer WS ~322 MB; automatic recovery succeeds; no GPU/ENOMEM/fatal error or exact action.
  • Report 17 (1.4.134, Win11 26200): one historical renderer 0xC0000005 access violation and a later -36861 crash; current heap ~78/93 MB, GPU WS ~378 MB; repeated Grok activity but no trigger/stack.
  • Reports 01/03/07 similarly contain Chromium OOM/native-allocation classifications while JS heap is far below its limit, so the exit code alone cannot distinguish GPU/native allocation, system commit, or another Chromium component.

A forced-renderer-crash E2E can verify Orca's recovery/PTY reattachment behavior, but it does not reproduce these native causes. The responsible next request for reports 08/13/17 is the exact last click/keystroke/output, GPU/driver/RDP/VM status, Event Viewer faulting module/exception, and the matching raw Crashpad .dmp; two of these submissions have no GitHub identity to contact.

Suggested reporting-pipeline follow-up: when a native child/renderer crash has a Crashpad artifact, attach or upload it through a private dump lane and include a stable dump/ticket ID in the redacted diagnostic bundle. If collection is unavailable/disabled, record that reason explicitly. Without that, a successfully submitted report can still be unsymbolicateable.

OrcaWin avatar Jul 11 '26 05:07 OrcaWin

Resolved by #8242. Automatic Windows capture now waits for in-flight persistence and recovers transient ACL/file failures; manual submissions use a bounded report-only fallback and surface actionable, sanitized errors. Crashpad dump upload and symbolication remain a separate enhancement, not part of the two failures tracked here.

OrcaWin avatar Jul 11 '26 09:07 OrcaWin