Skip to content

minidump OOM crash reports should include javascript stacktrace #46078

Description

@tmm1

Preflight Checklist

Problem Description

when triaging minidumps related to Renderer OOMs, it would be useful to see the javascript stack trace at the time of the crash.

for example, a crash might show an issue related to JSON:

partition_alloc::internal::OnNoMemoryInternal (oom.cc:66)
partition_alloc::TerminateBecauseOutOfMemory (oom.cc:90)
partition_alloc::internal::OnNoMemory (oom.cc:100)
blink::ReportV8OOMError (v8_initializer.cc:806)
v8::Utils::ReportOOMFailure (api.cc:354)
v8::internal::V8::FatalProcessOutOfMemory (api.cc:305)
v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath (heap-allocator.cc:158)
v8::internal::Factory::AllocateRaw (factory.cc:287)
v8::internal::FactoryBase<T>::NewRawTwoByteString (factory-base.cc:855)
v8::internal::Factory::NewStringFromTwoByte (factory.cc:864)
v8::internal::Factory::NewStringFromTwoByte (factory.cc:874)
v8::internal::JsonStringify (json-stringifier.cc:404)
v8::internal::Builtin_JsonStringify (builtins-json.cc:32)
Builtins_CEntry_Return1_ArgvOnStack_BuiltinExit

but without more details about the calling JS stack, one must audit every json callsite in their app

Proposed Solution

at OOM time, a javascript-level stacktrace should be captured and included as a crash-key for the minidump

Alternatives Considered

an alternative strategy is to use tracing with v8.cpu_profiler, however this requires a working reproduction. sometimes only a minidump is available and the steps to recreate it are not obvious.

Additional Information

in discussion, @deepak1556 noted chromium no longer prints js stacks during OOM https://chromium-review.googlesource.com/c/v8/v8/+/6308705

however nodejs does their own plumbing which could be replicated in electron https://github.com/nodejs/node/blob/ab9660b55aaf78f4b296cf0d613706938a6dca08/src/debug_utils.cc#L329-L343

Activity

  1. added theissue type on Mar 17, 2025
  2. self-assigned this
    on Mar 17, 2025
  3. alexkozy commented on Mar 3, 2026

    @alexkozy
    Contributor

    @deepak1556 and @tmm1 i would appreciate a review on #50043
    I am open to all suggestions and ready to rewrite it from scratch if needed, with the goal of having some kind of JavaScript stack trace available within out-of-memory crashes.

  4. 5 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions