-
-
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
There are X handle(s) keeping the process running; FILEHANDLE #4415
Comments
Happy to look into this but we need a reproduction case. |
Hello @gajus. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
I wouldn't even know where to start. This happens in our large repository with thousands of tests, and doesn't happen every time. |
Seeing Tinypool in the listed resources indicates that some test file is preventing it from shutting down. Without What's the reason why you are using |
Without it it just occasionally times out. The test suite never completes. It is not a single file. Keeps popping up on random files, e.g.
I am trying to replicate this issue locally. I installed while [ true ]; do vitest run queries/productizedServiceById.test.ts; done But so far nothing. |
Is it at all possible that this is somehow hardware/OS specific? These tests have ran now at least 50 times on my machine without a single hitch. On CI I keep seeing them fail every other build. Will try to create a VM that replicates the CI env. |
Without seeing the test cases, dependencies and Vitest configuration it's impossible to point out the root cause. But here's some things to try at least:
|
Starting to suspect that we are hitting this nodejs/undici#2026 |
You could try if using |
ah, literally just did this a second ago. |
Note that you could be hitting nodejs/node#49344. |
This would be only an issue if coverage is enabled, right? We have coverage explicitly disabled in our tests. Our config, for reference: export default defineConfig({
resolve: {
alias: {
'#': path.resolve(__dirname, './test'),
$: path.resolve(__dirname, './testV2'),
'@': path.resolve(__dirname, './src'),
},
},
test: {
coverage: {
enabled: false,
},
environment: 'node',
// Note that we are intentionally using *.test.ts suffix because
// *.test.{ts,tsx} suffix is used by ESLint to identify vitest files.
// Do not add non-*.test.{ts,tsx} files to the list below.
include: ['./{src,test,testV2}/**/*.test.ts'],
maxThreads: isCi ? Math.ceil(os.cpus().length * 0.8) : 4,
minThreads: 1,
mockReset: true,
outputFile: './src/__generated__/vitest/results.xml',
reporters: ['verbose'],
setupFiles: path.resolve(__dirname, './test/vitest.setup.ts'),
testTimeout: 60_000,
},
}); |
Something more to try, set UV_USE_IO_URING=0. |
Vitest moved from using |
Describe the bug
This might be not a bug, but where does one even start debugging this?
Reproduction
Running our entire test suite.
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: