Repository navigation
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a feature request that matches the one I want to file, without success.
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
feat: capture JS stack trace on renderer OOM
test: add tests for OOM JS stack trace capture
feat: capture JS stack trace on renderer OOM
feat: capture JS stack trace on renderer OOM
feat: capture JS stack trace on renderer OOM
feat: capture JS stack trace on renderer OOM
alexkozy commentedon Mar 3, 2026
@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.
feat: capture JS stack trace on renderer OOM
test: add crash reporter test for OOM JS stack trace
feat: capture JS stack trace on renderer OOM
test: add crash reporter test for OOM JS stack trace
feat: capture JS stack trace on renderer OOM
5 remaining items
feat: capture JS stack trace on renderer OOM
test: add crash reporter test for OOM JS stack trace
test: add crash reporter test for OOM JS stack trace
feat: capture JS stack trace on renderer OOM
test: add crash reporter test for OOM JS stack trace
feat: capture JS stack trace on renderer OOM
test: add crash reporter test for OOM JS stack trace
feat: capture JS stack trace on renderer OOM (#50043)
feat: capture JS stack trace on renderer OOM
test: add crash reporter test for OOM JS stack trace
feat: capture JS stack trace on renderer OOM (electron#50043)
feat: capture JS stack trace on renderer OOM (electron#50043)
feat: capture JS stack trace on renderer OOM (#50911)
feat: capture JS stack trace on renderer OOM (electron#50043)