Skip to content

Latest NodeJS 24.4.0 OOMing on large deps #9743

@Covkie

Description

@Covkie

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

10.13.1

Which area(s) of pnpm are affected? (leave empty if unsure)

Dependencies resolver

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

with a clean cache:
pnpm i with a large dependency. ex: electron-builder which pulls in app-builder-bin

Progress: resolved 0, reused 0, downloaded 669, added 721
Downloading app-builder-bin@5.0.0-alpha.12: 32.74 MB/72.51 MB

<--- Last few GCs --->
  
  [24914:0x7f04cc002000]    31026 ms: Scavenge 398.3 (527.7) -> 398.3 (527.7) MB, pooled: 0 MB, 63.91 / 0.00 ms  (average mu = 0.995, current mu = 0.801) allocation failure; 
  [24914:0x7f04cc002000]    31303 ms: Scavenge 675.9 (805.3) -> 675.9 (805.3) MB, pooled: 0 MB, 30.07 / 0.00 ms  (average mu = 0.995, current mu = 0.801) allocation failure; 
  
  FATAL ERROR: invalid array length Allocation failed - JavaScript heap out of memory
  ----- Native stack trace -----
  
  1: 0x55af5f2ec8b4 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node]
  2: 0x55af5f80dd34 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
  3: 0x55af5f80de3b v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
  4: 0x55af5fa9e42c  [node]
  5: 0x55af5ff407fb v8::internal::Runtime_FatalProcessOutOfMemoryInvalidArrayLength(int, unsigned long*, v8::internal::Isolate*) [node]
  6: 0x7f0497e76636 

Describe the Bug

Node OOMs
Yarn and NPM do not.
Node versions older than 24.4.0 do not have this behaviour

Expected Behavior

downloading works

Which Node.js version are you using?

24.4.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

Arch

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions