-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
repro: vmForks bug #6452
base: main
Are you sure you want to change the base?
repro: vmForks bug #6452
Conversation
✅ Deploy Preview for vitest-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
The ari ~/x/vitest/test/cli (main) $ pnpm run test vm-threads --run
> @vitest/test-cli@ test /Users/x/x/vitest/test/cli
> vitest "vm-threads" "--run"
RUN v2.1.1 /Users/x/x/vitest/test/cli
❯ test/vm-threads.test.ts (1)
❯ test/vm-threads.test.ts (1)
⠏ importing files in restricted fs works correctly
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Vitest caught 1 unhandled error during the test run.
This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error: Worker exited unexpectedly
❯ ChildProcess.<anonymous> ../../node_modules/.pnpm/[email protected]/node_modules/tinypool/dist/index.js:136:34
❯ ChildProcess.emit node:events:531:35
❯ ChildProcess._handle.onexit node:internal/child_process:293:12
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Test Files (1)
Tests (1)
Errors 1 error
Start at 09:34:59
Duration 683ms (transform 43ms, setup 0ms, collect 161ms, tests 0ms, environment 0ms, prepare 46ms)
ELIFECYCLE Test failed. See above for more details. |
Oh wow, does Node Edit: Nope, it's much more stable but crashes after couple of minutes of re-running |
afb83f4
to
29d82bf
Compare
Description
To run the reproduction:
pnpm run node-error-repro
. This should run tests and create files with all the output from those tests.What happens:
child_process
in the reproduction, becauseworker_thread
crashes the whole process) crashes while trying to import something. I've addedconsole
logs in our module runner implementation - it only logs the module if it's not cached already. Every time it crashes it imports the same file it looks like (because the end of the debug is always the same in all files -node_modules/loupe/lib/helpers.js
). I don't think that file is the problem, but one of its parents maybe? Usually, it happens at least on the second test run after we create a new executor:vitest/packages/vitest/src/runtime/workers/vm.ts
Line 77 in 0499a31
Vitest never manually clears the cache, we rely on gc, but we also reuse
fileMap
cache:vitest/packages/vitest/src/runtime/workers/vm.ts
Line 15 in 0499a31