-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Hitting Segmentation fault when running Vitest . #3143
Comments
Facing the same here. Really blocking our build flows. In our case we're facing this issue when running the tests on a github action |
My work around at the moment has been to run it with the --no-threads flag when in circleci, but that slows down the workflow a lot. |
Potentially similar root cause/duplicate of #3106 Do you have a promise that sometimes rejects in your tests, similar to the reproduction on the linked issue? EDIT: Fix link to other issue |
We're potentially hitting this in Github Actions as well, works fine locally though... @nakleiderer did you mean to link to a different issue? |
@adrianisk Yes, apologies, I've updated the original comment. This is the link I meant to use: #3106 |
We have the same issue. Works fine locally, but in CI on GitHub Actions we have to run sequentially with the --no-threads flag. |
We're also hitting this issue which happened when we introduced an @AWS-SDK dependency. I happened to stumble upon awslabs/aws-crt-nodejs#452 while looking into something else, might be related? |
Pretty much the same thing is happening, update to AWS-SDK v3 imports, and now we are getting segfaults on GithubActions. |
Same here. |
Can also be fixed by setting |
Instead of disabling Use the import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
poolMatchGlobs: [
// Run AWS tests in child_process - @aws-sdk crashes when run in 'node:worker_threads'
['**/tests/aws-infra-etc-pattern/**', 'child_process'],
]
}
}) |
On repeatability, I can repeat this in a docker container with just 1 test.And indeed using @AWS-SDK. |
This avoids a segmentation fault when executing tests. Refs: vitest-dev/vitest#3143
This avoids a segmentation fault when executing tests. Refs: vitest-dev/vitest#3143
This avoids a segmentation fault when executing tests. Refs: vitest-dev/vitest#3143
This avoids a segmentation fault when executing tests. Refs: vitest-dev/vitest#3143
Vitest 1.0.0-beta has now If the code you are testing is incompatible with |
Describe the bug
When I run vitest on without limiting the threads, the process will crash half way through with the following output:
Reproduction
https://github.com/OpenQDev/OpenQ-Frontend/tree/vite-staging
I can't really provide a minimal reproduction because it seems to depend on the number of tests you run. To reproduce it with this repo just run
yarn
then, runyarn json-server
in one terminal and thenyarn vitest
in another.System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: