Skip to content

BUG - Out of memory crash on Node 20 arm64 after test suite completes #4545

@marcovieth

Description

@marcovieth

Related Feature

Feature request: issue number

Description

The eslint-plugin-fiori-tools test suite (71 suites, 717 tests) runs successfully but the process crashes with a fatal heap out of memory error immediately after ran all test suites:

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

Conditions: Only observed on macos-latest with Node 20.x (arm64). Not reproducible on Node 22.x.

Steps to Reproduce

Commit a change and create a PR.

Expected results

The pipeline should run without an error:
CI/CD Pipeline / build (macos-latest, 20.x) (pull_request)

Actual results

❌ > nx run @sap-ux/eslint-plugin-fiori-tools:test

...

Test Suites: 72 passed, 72 total
  Tests:       725 passed, 725 total
  Snapshots:   35 passed, 35 total
  Time:        578.385 s
  Ran all test suites.

<--- Last few GCs --->
  
  [18030:0x120008000]   656492 ms: Scavenge 2008.6 (2067.9) -> 2008.5 (2078.9) MB, 54.83 / 0.00 ms  (average mu = 0.789, current mu = 0.666) allocation failure; 
  [18030:0x120008000]   656642 ms: Scavenge 2015.3 (2078.9) -> 2015.3 (2079.9) MB, 19.50 / 0.00 ms  (average mu = 0.789, current mu = 0.666) allocation failure; 
  [18030:0x120008000]   656955 ms: Scavenge 2016.2 (2079.9) -> 2016.0 (2102.9) MB, 284.21 / 0.00 ms  (average mu = 0.789, current mu = 0.666) allocation failure; 
  
  <--- JS stacktrace --->
  
  FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
  ----- Native stack trace -----

Screenshots

Version/Components/Environment

Add any other context about the problem here
OS:

  • Mac OS
  • Windows
  • Other

Root Cause Analysis

Problem

{describe the problem}

Fix

{describe the fix}

Why was it missed

{Some explanation why this issue might have been missed during normal development/testing cycle}

How can we avoid this

{if we don’t want to see this type of issues anymore what we should do to prevent}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions