Skip to content

[Bug]: CI test runners crash with JavaScript heap out of memory (OOM) on all PRs #17341

@miloudbelarebia

Description

@miloudbelarebia

Description

The CI checks jobs (both node test and bun test) are crashing with a JavaScript heap out of memory error on all pull requests. All individual tests pass successfully (✓), but the Node.js process runs out of memory after completing the test suite.

This is a separate issue from #17315 (TS2742 in slash.test-harness.ts), and together they block CI from passing on any PR.

Error

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

------ Native stack trace ------
1: 0xe40d24 node::OOMErrorHandler(char const*, v8::OOMDetails const&)
   [/opt/hostedtoolcache/node/22.22.0/x64/bin/node]
2: 0x1216be0 v8::Utils::ReportOOMFailure(...)
3: 0x1216eb7 v8::internal::V8::FatalProcessOutOfMemory(...)

Affected Jobs

  • checks (node, test, pnpm canvas:a2ui:bundle && pnpm test) — crashes after all tests pass
  • checks (bun, test, pnpm canvas:a2ui:bundle && bunx vitest run --config vitest.unit.config.ts) — same OOM crash

Evidence

Observed on multiple unrelated PRs:

All tests show ✓ (pass) before the OOM crash occurs.

Possible Causes

  • Node.js heap size may need to be increased via NODE_OPTIONS=--max-old-space-size=4096
  • Test suite memory consumption may have grown beyond the default heap limit
  • The CI runner (Node 22.22.0 on x64) may need more memory allocation

Impact

High — Combined with #17315, this means no PR can currently pass CI, blocking all contributions.

Suggested Fix

Add NODE_OPTIONS=--max-old-space-size=4096 (or higher) to the test runner CI step, or investigate which test(s) are leaking memory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions