Skip to content

[Due for payment 2026-07-17] [$250] NewDot web tab crashes silently (renderer OOM kill) under high memory / large Onyx dataset #93916

Description

@melvin-bot

Problem

NewDot's browser tab crashes repeatedly and silently on web. The crash produces no JS error, runs no graceful shutdown, and Sentry captures zero error events. It has been reproduced regularly on staging and on ad-hoc builds while doing normal activity (DMing other users, clicking around inside an expense on the Spend page, etc.).

Root cause (current best understanding)

Renderer process OOM kill. The browser/OS SIGKILLs the renderer process under physical RAM pressure. This happens below jsHeapSizeLimit, so it is completely independent of the V8 heap limit and produces no JS error — which is why nothing reaches Sentry through normal error reporting.

Evidence from crash tracking captured via the instrumentation PRs below:

  • JS heap chronically pinned at ~97–98% usage with a large retained live set (~1.1 GB in one session, ~3.5 GB in a later one). The set is genuinely retained — a GC ran between two snapshots yet couldn't drop below ~1.1 GB.
  • A later crash report: usedJSHeapSizeMB: 3572, totalJSHeapSizeMB: 3589, jsHeapSizeLimitMB: 4192, reportsCount: 1083, domNodes: 2430, visibility: hidden.
  • Earlier memory snapshots before a crash: 98.13% and 97.38% heap usage with only ~23–29 MB free.

The trigger

The crash typically follows a healthy ManualSendMessage (the send itself renders fine in ~100 ms), then dies ~1 s later while draining post-send work. In one ~1.23 s window a single comment generated:

  • 71 Onyx writes (21 of them snapshot_ blobs — the AddComment snapshot fan-out)
  • 27 OnyxDerived recomputes, including reportAttributes ×6 and todos ×6, each iterating all ~89 reports.

With only ~23–29 MB free, that allocation burst is the final straw → OOM kill. Bursts of OnyxDerived recomputation (e.g. 91 computation events at once) were observed correlating with crashes, also triggered by OpenApp.

Proposed action items

  • Investigate the high retained heap — large memory footprint even for a normal number of reports. Find what's keeping ~1.1 GB+ resident.
  • Upgrade the OnyxDerived system to batch/debounce computation when many dependencies change in the same time window (would help many other cases too).
  • Cut the snapshot fan-out — does one comment really need to rewrite ~21 search snapshots?
  • Continue crash instrumentation so renderer OOM kills are observable.

Related work

Reported in Slack.

Issue OwnerCurrent Issue Owner: @eh2077
Issue OwnerCurrent Issue Owner: @eh2077
Upwork Automation - Do Not Edit

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
CRITICAL

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions