-
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
[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 <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
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
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