-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
fs: don't end fs promises on Isolate termination #42910
fs: don't end fs promises on Isolate termination #42910
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Do you know which exception is getting scheduled and causing V8 to return empty Maybes? I tried to run the test without the fix and it's always coming from one of these Check() calls for me: Lines 141 to 149 in 02e0c17
|
This is the other exception, which doesn't occur that often, in fact I could try to devise a different test which exercises that path more often:
|
And this is the 3rd one:
|
@RaisinTen if you want to test it on your side, applying this patch to the current test makes the 2 other errors appear mostly all the time:
|
Sure, feel free to add more tests for those paths though I don't think it's strictly necessary for this PR. The crash sites are indeed spread over multiple places. However, I was curious to know which JS exception (not C++ crash) caused this. Do worker threads throw an exception if we interact with the isolate during termination? If so, what's the source? |
Tbh, I was curious to know why pending exceptions caused |
To answer my question, this crashes because of this exception - node/deps/v8/src/execution/isolate.cc Line 1612 in ce29d28
|
260c189
to
2ab9f9a
Compare
This comment was marked as duplicate.
This comment was marked as duplicate.
Commit Queue failed- Loading data for nodejs/node/pull/42910 ✔ Done loading data for nodejs/node/pull/42910 ----------------------------------- PR info ------------------------------------ Title fs: don't end fs promises on Isolate termination (#42910) Author Santiago Gimeno (@santigimeno) Branch santigimeno:santi/some_filehandle_fixes -> nodejs:main Labels c++, fs, author ready, needs-ci Commits 1 - fs: don't end fs promises on Isolate termination Committers 1 - Santiago Gimeno PR-URL: https://github.com/nodejs/node/pull/42910 Fixes: https://github.com/nodejs/node/issues/42829 Reviewed-By: Antoine du Hamel Reviewed-By: Darshan Sen ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/42910 Fixes: https://github.com/nodejs/node/issues/42829 Reviewed-By: Antoine du Hamel Reviewed-By: Darshan Sen -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last review: ⚠ - fs: don't end fs promises on Isolate termination ℹ This PR was created on Fri, 29 Apr 2022 14:06:18 GMT ✔ Approvals: 2 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/42910#pullrequestreview-958012346 ✔ - Darshan Sen (@RaisinTen) (TSC): https://github.com/nodejs/node/pull/42910#pullrequestreview-962848317 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2022-06-18T00:22:32Z: https://ci.nodejs.org/job/node-test-pull-request/44668/ - Querying data for job/node-test-pull-request/44668/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/2519886079 |
Landed in 4c077b0 |
This has introduced a flake in the CI: #43499 should we revert this? |
Please, hold on a bit. I'm investigating this and post a fix shortly. |
This is specially prevalent in the case of having in-progress FileHandle operations in a worker thread while the Worker is exiting. Fixes: #42829 PR-URL: #42910 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
This is specially prevalent in the case of having in-progress FileHandle operations in a worker thread while the Worker is exiting. Fixes: #42829 PR-URL: #42910 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
This is specially prevalent in the case of having in-progress FileHandle operations in a worker thread while the Worker is exiting. Fixes: #42829 PR-URL: #42910 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
This is specially prevalent in the case of having in-progress FileHandle operations in a worker thread while the Worker is exiting. Fixes: nodejs/node#42829 PR-URL: nodejs/node#42910 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
This is specially prevalent in the case of having in-progress FileHandle
operations in a worker thread while the Worker is exiting.
Fixes: #42829