-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node 22.1+ crashes process when a lot of VM processes are created/destroyed in parallel workers #54735
Comments
Do you happen to have a repro without any dependencies?
Have you tried reporting it to vitest? |
Unfortunately no. The behaviour seems very unreliable so at least some amount of dependencies is required. It seems like different tests just exit the process on different reruns without any errors printed to
I am representing Vitest. I have found |
FYI if it's getting exited deliberately by some user-land code via |
I haven't attempted to reproduce, but given the report, I've optimistically added these labels. @sheremet-va I saw you pushed vitest-dev/vitest#6448, did this resolve the issue? |
No, it is a separate issue.
I see that it hits some specific module and panics, I don't think it's the |
I wasn't able to create a small reproduction, but I've made it easier to debug: vitest-dev/vitest#6452 You can see in the console the test that failed and it creates a file with stdout logs. I am still not sure what is happening and why Node crashes with a custom module runner based on VM context. And just a reminder - it started happening in Node 22.1, 22.0 works without an issue. |
Version
22.1.0
Platform
Subsystem
No response
What steps will reproduce the bug?
pnpm install --prefer-offline
pnpm build
cd test/core
pnpm test:vmThreads --run
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 useschild_process
under the hood instead, but the code for VM is the same) - looks likechild_process
just exists without crashing the main process, but it also doesn't print anything useful.The text was updated successfully, but these errors were encountered: