Skip to content

Node 22.1+ crashes process when a lot of VM processes are created/destroyed in parallel workers #54735

@sheremet-va

Description

@sheremet-va

Version

22.1.0

Platform

Darwin MacBook-Air.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:16:51 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8103 arm64

Subsystem

No response

What steps will reproduce the bug?

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior? Why is that the expected behavior?

No crash

What do you see instead?

Command failed with exit code 129. with no error.

Additional information

This is most likely an issue with Vitest itself, but I am having a hard time debugging it. The error started happening on 22.1.0, 22.0.0 works as before. The changelog didn't help me.

The issue seems to be with Worker Threads + VM as vmForks pool works fine or at least doesn't crash completely (it uses child_process under the hood instead, but the code for VM is the same) - looks like child_process just exits without crashing the main process, but it also doesn't print anything useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    child_processIssues and PRs related to the child_process subsystem.regressionIssues related to regressions.v22.xIssues that can be reproduced on v22.x or PRs targeting the v22.x-staging branch.workerIssues and PRs related to Worker support.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions