Skip to content

test-wasm-allocation[-memory64] failures with V8 14.6 in worker thread #62870

Description

@targos

Refs: #61898

The worker is terminated because it runs out of memory, instead of throwing the expected error.

---
duration_ms: 270.205
exitcode: 1
severity: fail
stack: |-
  node:events:487
        throw er; // Unhandled 'error' event
        ^

  Error [ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory
      at [kOnExit] (node:internal/worker:385:26)
      at Worker.<computed>.onexit (node:internal/worker:301:20)
  Emitted 'error' event on Worker instance at:
      at [kOnExit] (node:internal/worker:385:12)
      at Worker.<computed>.onexit (node:internal/worker:301:20) {
    code: 'ERR_WORKER_OUT_OF_MEMORY'
  }

  Node.js v26.0.0-pre
...

Activity

  1. added
    v8 engineIssues and PRs related to the V8 dependency.
    workerIssues and PRs related to the worker_threads module and Worker API.
    wasmIssues and PRs related to WebAssembly.
    on Apr 21, 2026
  2. joyeecheung commented on May 2, 2026

    @joyeecheung
    Member

    Looked into it a bit and I think this might be a desirable behavior change in 14.6: previously when there's not enough virtual memory to allocate the cage, V8 would throw an allocation error; now, before it throws the allocation error, V8 triggers the near heap limit callback first, which in the case of workers we would report it to the parent and then just let the worker die, because we assume when the heap limit is near the worker is not far from dying; but for wasm allocation failures, this is a bit too pessimistic.

    Potentially we can add an option for workers to not die when the heap limit is reached and just emit an event to the parent for cases like this where we don't have to be so pessimistic, and use that in our worker test runner.

  3. github-actions commented on Aug 1, 2026

    @github-actions
    Contributor

    This issue has been marked as stale due to 90 days of inactivity.
    It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

  4. added
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Aug 1, 2026
  5. github-actions commented on Sep 1, 2026

    @github-actions
    Contributor

    This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
    If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.v8 engineIssues and PRs related to the V8 dependency.wasmIssues and PRs related to WebAssembly.workerIssues and PRs related to the worker_threads module and Worker API.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions