Open sheremet-va opened 2 years ago
Assertion failed: (napi_create_external(env, fseenv, fse_environment_destroy, NULL, &result) == napi_ok), function fse_environment_create, file ../src/fsevents.c, line 87
I wasn't able to find this file in Node repo.
It looks like this is from fsevents?
FSReqPromise
errors
These may be fixed by nodejs/node#42910, which will be in Node.js v16.17.0. But I'm not sure.
Based on previous issues, it feels likely the race here is between the shutdown & the other actions trying to call into Javascript.
Version
16.16.0
Platform
macOS 11.6.8 5 20G730
Subsystem
No response
What steps will reproduce the bug?
Examples in our CI:
After all tests are done, we are getting the error:
I wasn't able to find this file in Node repo.
We are also getting
Empty MaybeLocal
error sometimes, which might be connected:I am not able to reproduce it on smaller scale for now, unfortunately. It seems, there is some kind of race condition.
Code that fires up workers:
You can also notice that errors happen with "close with time out", this code is triggered here:
I am able to reproduce it almost consistently in Vitest core tests:
node/reproduce
branch is needed)If you comment out
this.pool?.close()
(which is an async noop), you should see error less time. But I got a new error with it:Run it a few times, if you don't see an error.
If I comment out
this.close
entirely, I get this error:If I call
pool.destroy()
insidepool.close
, I also get the error quite often:What do you see instead?
Cannot read properties of undefined (reading 'slice') 216
examples/vue test: Assertion failed: (napi_create_external(env, fseenv, fse_environment_destroy, NULL, &result) == napi_ok), function fse_environment_create, file ../src/fsevents.c, line 87. 218
Additional information
No response