Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
fs: don't end fs promises on Isolate termination#42910
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as outdated.
This comment was marked as outdated.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
RaisinTen commented Apr 30, 2022
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
|
santigimeno commented Apr 30, 2022
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: |
santigimeno commented Apr 30, 2022
And this is the 3rd one: |
santigimeno commented Apr 30, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@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: |
RaisinTen commented May 1, 2022
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? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
RaisinTen commented May 1, 2022
Tbh, I was curious to know why pending exceptions caused |
Uh oh!
There was an error while loading. Please reload this page.
RaisinTen commented May 3, 2022
To answer my question, this crashes because of this exception - node/deps/v8/src/execution/isolate.cc Line 1612 in ce29d28
|
260c189 to 2ab9f9aComparenodejs-github-bot commented Jun 17, 2022
This comment was marked as duplicate.
This comment was marked as duplicate.
nodejs-github-bot commented Jun 18, 2022
nodejs-github-bot commented Jun 18, 2022
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 |
nodejs-github-bot commented Jun 18, 2022
Landed in 4c077b0 |
joyeecheung commented Jun 22, 2022
This has introduced a flake in the CI: #43499 should we revert this? |
santigimeno commented Jun 22, 2022
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