-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
[v22.x] Revert "v8: enable maglev on supported architectures" #54384
Conversation
The
notable-change
Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There appears to be a consistent crash in node-test-commit-arm-debug with this PR,
which isn't occurring on v22.x-staging: https://ci.nodejs.org/job/node-test-commit-arm-debug/14291/ |
It needs a handle scope for the context handle. Since the FastApiCallbackOptions struct doesn't have isolate on it in V8 12.4 on Node.js 22, use Isolate::TryGetCurrent() to get to the isolate needed for the handle scope creation and fallback to the slow callback if no isolate is entered.
This reverts commit 1a5acd0. Reason to revert: we have seen several crashes/unexpected JS behaviors with maglev on v22 (which ships V8 v12.4). The bugs lie in the codegen so it would be difficult for users to work around them or even figure out where the bugs are coming from. Some bugs are fixed in the upstream while some others probably remain. As v22 will get stuck with V8 v12.4 as LTS, it will be increasingly difficult to backport patches for them even if the bugs are fixed. So disable it by default on v22 to reduce the churn and troubles for users.
c38e136
to
1729d1e
Compare
Added another commit to handle the missing handle scope assertion, this fixes the npm install crash locally for me - on the other hand does this mean that the fast path had been rarely called on v22 when maglev was still enabled by default? Yikes.. |
I was planning to land it on the next 22 proposal, but CI seems flaky. I will need to update v22.x-staging and then you'll need to rebase on top of it. If we get a green CI tomorrow (Monday 19) I can cherry-pick it. |
@RafaelGSS I am not seeing any merge conflicts, has v22.x-staging been updated? |
The CI is green, although actually it looks like the commit queue doesn't work for staging branches, so it'll need to be merged manually by a releaser? @RafaelGSS |
I'll land it asap |
It needs a handle scope for the context handle. Since the FastApiCallbackOptions struct doesn't have isolate on it in V8 12.4 on Node.js 22, use Isolate::TryGetCurrent() to get to the isolate needed for the handle scope creation and fallback to the slow callback if no isolate is entered. PR-URL: #54384 Refs: #52797 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This reverts commit 1a5acd0. Reason to revert: we have seen several crashes/unexpected JS behaviors with maglev on v22 (which ships V8 v12.4). The bugs lie in the codegen so it would be difficult for users to work around them or even figure out where the bugs are coming from. Some bugs are fixed in the upstream while some others probably remain. As v22 will get stuck with V8 v12.4 as LTS, it will be increasingly difficult to backport patches for them even if the bugs are fixed. So disable it by default on v22 to reduce the churn and troubles for users. PR-URL: #54384 Refs: #52797 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 99e5abc...5243e32 |
Notable changes: lib: * (SEMVER-MINOR) add util.getCallSite() API (Rafael Gonzaga) #54380 repl: * doc-deprecate instantiating `node:repl` classes without `new` (Aviv Keller) #54842 src: * create handle scope in FastInternalModuleStat (Joyee Cheung) #54384 stream: * (SEMVER-MINOR) relocate the status checking code in the onwritecomplete (YoonSoo_Shin) #54032 tls: * (SEMVER-MINOR) add `allowPartialTrustChain` flag (Anna Henningsen) #54790 v8: * Revert "v8: enable maglev on supported architectures (Joyee Cheung) #54384 PR-URL: TODO
Notable changes: lib: * (SEMVER-MINOR) add util.getCallSite() API (Rafael Gonzaga) #54380 repl: * doc-deprecate instantiating `node:repl` classes without `new` (Aviv Keller) #54842 src: * create handle scope in FastInternalModuleStat (Joyee Cheung) #54384 stream: * (SEMVER-MINOR) relocate the status checking code in the onwritecomplete (YoonSoo_Shin) #54032 tls: * (SEMVER-MINOR) add `allowPartialTrustChain` flag (Anna Henningsen) #54790 v8: * Revert "v8: enable maglev on supported architectures (Joyee Cheung) #54384 PR-URL: #54966
Notable changes: lib: * (SEMVER-MINOR) add util.getCallSite() API (Rafael Gonzaga) #54380 repl: * doc-deprecate instantiating `node:repl` classes without `new` (Aviv Keller) #54842 src: * create handle scope in FastInternalModuleStat (Joyee Cheung) #54384 stream: * (SEMVER-MINOR) relocate the status checking code in the onwritecomplete (YoonSoo_Shin) #54032 tls: * (SEMVER-MINOR) add `allowPartialTrustChain` flag (Anna Henningsen) #54790 v8: * Revert "v8: enable maglev on supported architectures (Joyee Cheung) #54384 PR-URL: #54966
Notable changes: lib: * (SEMVER-MINOR) add util.getCallSite() API (Rafael Gonzaga) #54380 repl: * doc-deprecate instantiating `node:repl` classes without `new` (Aviv Keller) #54842 src: * create handle scope in FastInternalModuleStat (Joyee Cheung) #54384 stream: * (SEMVER-MINOR) relocate the status checking code in the onwritecomplete (YoonSoo_Shin) #54032 tls: * (SEMVER-MINOR) add `allowPartialTrustChain` flag (Anna Henningsen) #54790 v8: * Revert "v8: enable maglev on supported architectures (Joyee Cheung) #54384 PR-URL: #54966
Notable changes: lib: * (SEMVER-MINOR) add util.getCallSite() API (Rafael Gonzaga) #54380 repl: * doc-deprecate instantiating `node:repl` classes without `new` (Aviv Keller) #54842 src: * create handle scope in FastInternalModuleStat (Joyee Cheung) #54384 stream: * (SEMVER-MINOR) relocate the status checking code in the onwritecomplete (YoonSoo_Shin) #54032 tls: * (SEMVER-MINOR) add `allowPartialTrustChain` flag (Anna Henningsen) #54790 v8: * Revert "v8: enable maglev on supported architectures (Joyee Cheung) #54384 PR-URL: #54966
Notable changes: lib: * (SEMVER-MINOR) add util.getCallSite() API (Rafael Gonzaga) #54380 repl: * doc-deprecate instantiating `node:repl` classes without `new` (Aviv Keller) #54842 src: * create handle scope in FastInternalModuleStat (Joyee Cheung) #54384 stream: * (SEMVER-MINOR) relocate the status checking code in the onwritecomplete (YoonSoo_Shin) #54032 tls: * (SEMVER-MINOR) add `allowPartialTrustChain` flag (Anna Henningsen) #54790 v8: * Revert "v8: enable maglev on supported architectures (Joyee Cheung) #54384 PR-URL: #54966
Notable changes: lib: * (SEMVER-MINOR) add util.getCallSite() API (Rafael Gonzaga) #54380 repl: * doc-deprecate instantiating `node:repl` classes without `new` (Aviv Keller) #54842 src: * create handle scope in FastInternalModuleStat (Joyee Cheung) #54384 stream: * (SEMVER-MINOR) relocate the status checking code in the onwritecomplete (YoonSoo_Shin) #54032 tls: * (SEMVER-MINOR) add `allowPartialTrustChain` flag (Anna Henningsen) #54790 v8: * Revert "v8: enable maglev on supported architectures (Joyee Cheung) #54384 PR-URL: #54966
Notable changes: lib: * (SEMVER-MINOR) add util.getCallSite() API (Rafael Gonzaga) #54380 repl: * doc-deprecate instantiating `node:repl` classes without `new` (Aviv Keller) #54842 src: * create handle scope in FastInternalModuleStat (Joyee Cheung) #54384 stream: * (SEMVER-MINOR) relocate the status checking code in the onwritecomplete (YoonSoo_Shin) #54032 tls: * (SEMVER-MINOR) add `allowPartialTrustChain` flag (Anna Henningsen) #54790 v8: * Revert "v8: enable maglev on supported architectures (Joyee Cheung) #54384 PR-URL: #54966
Notable changes: lib: * (SEMVER-MINOR) add util.getCallSite() API (Rafael Gonzaga) #54380 repl: * doc-deprecate instantiating `node:repl` classes without `new` (Aviv Keller) #54842 src: * create handle scope in FastInternalModuleStat (Joyee Cheung) #54384 stream: * (SEMVER-MINOR) relocate the status checking code in the onwritecomplete (YoonSoo_Shin) #54032 tls: * (SEMVER-MINOR) add `allowPartialTrustChain` flag (Anna Henningsen) #54790 v8: * Revert "v8: enable maglev on supported architectures (Joyee Cheung) #54384 PR-URL: #54966
Notable changes: lib: * (SEMVER-MINOR) add util.getCallSite() API (Rafael Gonzaga) #54380 repl: * doc-deprecate instantiating `node:repl` classes without `new` (Aviv Keller) #54842 src: * create handle scope in FastInternalModuleStat (Joyee Cheung) #54384 stream: * (SEMVER-MINOR) relocate the status checking code in the onwritecomplete (YoonSoo_Shin) #54032 tls: * (SEMVER-MINOR) add `allowPartialTrustChain` flag (Anna Henningsen) #54790 v8: * Revert "v8: enable maglev on supported architectures (Joyee Cheung) #54384 PR-URL: #54966
Notable changes: lib: * (SEMVER-MINOR) add util.getCallSite() API (Rafael Gonzaga) #54380 repl: * doc-deprecate instantiating `node:repl` classes without `new` (Aviv Keller) #54842 src: * create handle scope in FastInternalModuleStat (Joyee Cheung) #54384 stream: * (SEMVER-MINOR) relocate the status checking code in the onwritecomplete (YoonSoo_Shin) #54032 tls: * (SEMVER-MINOR) add `allowPartialTrustChain` flag (Anna Henningsen) #54790 v8: * Revert "v8: enable maglev on supported architectures (Joyee Cheung) #54384 PR-URL: #54966
Notable changes: lib: * (SEMVER-MINOR) add util.getCallSite() API (Rafael Gonzaga) nodejs#54380 repl: * doc-deprecate instantiating `node:repl` classes without `new` (Aviv Keller) nodejs#54842 src: * create handle scope in FastInternalModuleStat (Joyee Cheung) nodejs#54384 stream: * (SEMVER-MINOR) relocate the status checking code in the onwritecomplete (YoonSoo_Shin) nodejs#54032 tls: * (SEMVER-MINOR) add `allowPartialTrustChain` flag (Anna Henningsen) nodejs#54790 v8: * Revert "v8: enable maglev on supported architectures (Joyee Cheung) nodejs#54384 PR-URL: nodejs#54966
Notable changes: lib: * (SEMVER-MINOR) add util.getCallSite() API (Rafael Gonzaga) nodejs#54380 repl: * doc-deprecate instantiating `node:repl` classes without `new` (Aviv Keller) nodejs#54842 src: * create handle scope in FastInternalModuleStat (Joyee Cheung) nodejs#54384 stream: * (SEMVER-MINOR) relocate the status checking code in the onwritecomplete (YoonSoo_Shin) nodejs#54032 tls: * (SEMVER-MINOR) add `allowPartialTrustChain` flag (Anna Henningsen) nodejs#54790 v8: * Revert "v8: enable maglev on supported architectures (Joyee Cheung) nodejs#54384 PR-URL: nodejs#54966
* chore: bump node in DEPS to v22.13.1 * chore: fixup GN build file * nodejs/node#55529 * nodejs/node#55798 * nodejs/node#55530 * module: simplify --inspect-brk handling nodejs/node#55679 * src: fix outdated js2c.cc references nodejs/node#56133 * crypto: include openssl/rand.h explicitly nodejs/node#55425 * build: use variable for crypto dep path nodejs/node#55928 * crypto: fix RSA_PKCS1_PADDING error message nodejs/node#55629 * build: use variable for simdutf path nodejs/node#56196 * test,crypto: make crypto tests work with BoringSSL nodejs/node#55491 * fix: suppress clang -Wdeprecated-declarations in libuv libuv/libuv#4486 * deps: update libuv to 1.49.1 nodejs/node#55114 * test: make test-node-output-v8-warning more flexible nodejs/node#55401 * [v22.x] Revert "v8: enable maglev on supported architectures" nodejs/node#54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition c-ares/c-ares#869 * deps: update nghttp2 to 1.64.0 nodejs/node#55559 * src: provide workaround for container-overflow nodejs/node#55591 * build: use variable for simdutf path nodejs/node#56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async nodejs/node#56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes nodejs/node#55714 This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 nodejs/node#55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
src: create handle scope in FastInternalModuleStat
It needs a handle scope for the context handle. Since the
FastApiCallbackOptions struct doesn't have isolate on it
in V8 12.4 on Node.js 22, use Isolate::TryGetCurrent() to
get to the isolate needed for the handle scope creation and
fallback to the slow callback if no isolate is entered.
Revert "v8: enable maglev on supported architectures"
This reverts commit 1a5acd0.
Reason to revert: we have seen several crashes/unexpected JS behaviors with maglev on v22 (which ships V8 v12.4). The bugs lie in the codegen so it would be difficult for users to work around them or even figure out where the bugs are coming from. Some bugs are fixed in the upstream while some others probably remain. As v22 will get stuck with V8 v12.4 as LTS, it will be increasingly difficult to backport patches for them even if the bugs are fixed. So disable it by default on v22 to reduce the churn and troubles for users.
Refs: #52797