Open
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 bug report that matches the one I want to file, without success.
Electron Version
v28.1.4
What operating system are you using?
Windows
Operating System Version
10
What arch are you using?
x64
Expected Behavior
MWE:
'use strict';
const crypto = require('crypto');
let hash = Buffer.alloc(0);
while(1) hash = crypto.createHash('sha256').update(hash).digest();
This is expected to run forever.
Actual Behavior
> electron main.js
<--- Last few GCs --->
[11464:0000430400148000] 110602 ms: Scavenge 5.3 (7.9) -> 3.3 (7.9) MB, 4.49 / 3.82 ms (average mu = 1.000, current mu = 1.000) allocation failure;
[11464:0000430400148000] 110624 ms: Scavenge 5.3 (7.9) -> 3.3 (7.9) MB, 5.09 / 4.43 ms (average mu = 1.000, current mu = 1.000) allocation failure;
[11464:0000430400148000] 110646 ms: Scavenge 5.3 (7.9) -> 3.3 (7.9) MB, 4.60 / 3.95 ms (average mu = 1.000, current mu = 1.000) allocation failure;
<--- JS stacktrace --->
FATAL ERROR: ExternalEntityTable::AllocateSegment Allocation failed - process out of memory
1: 00007FF6ACB03E16 node::SetTracingController+86006
2: 00007FF6ACB04089 node::OnFatalError+585
3: 00007FF6AFCCD5E3 v8::Function::NewInstance+835
4: 00007FF6AFCCD573 v8::Function::NewInstance+723
5: 00007FF6AE54E857 v8::MicrotasksScope::PerformCheckpoint+1127
6: 00007FF6AFCD9238 v8::Object::SetAlignedPointerInInternalField+232
7: 00007FF6AD193B80 uv_fs_statfs+10464
8: 00007FF6AD9CEBAA uv_getnameinfo+219370
9: 00007FF6AE565F08 v8::MicrotasksScope::PerformCheckpoint+97048
10: 00007FF6AB576ADD v8::SourceLocation::ToString+25021
11: 00007FF6AEB957BA cppgc::internal::WriteBarrier::DijkstraMarkingBarrierRangeSlow+3110154
12: 00007FF6AEAF9AF9 cppgc::internal::WriteBarrier::DijkstraMarkingBarrierRangeSlow+2472009
13: 00007FF6E00555F5
Additional Information
This is probably a regression. The first electron version we observed the leak in is v25.2.0. The leak is not seen in Node.js v21.5.0.
Activity