Skip to content

Allow disable node v8 maglev jit compiler on node24. - #4447

Merged
TingluoHuang merged 2 commits into
mainfrom
users/tihuang/nodemaglev
May 26, 2026
Merged

Allow disable node v8 maglev jit compiler on node24.#4447
TingluoHuang merged 2 commits into
mainfrom
users/tihuang/nodemaglev

Conversation

@TingluoHuang

@TingluoHuangTingluoHuang commented May 22, 2026

Copy link
Copy Markdown
Member

Try to workaround nodejs/node#62260 for actions/runner on Windows

Setting machine level env ACTIONS_RUNNER_DISABLE_NODE_MAGLEV=1 or step level env ACTIONS_RUNNER_DISABLE_NODE_MAGLEV=1

@TingluoHuang
TingluoHuang requested a review from a team as a code ownerMay 22, 2026 22:30
CopilotAI review requested due to automatic review settings May 22, 2026 22:30

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a targeted workaround in the JavaScript action handler to mitigate a Node.js 24 / V8 Maglev issue on Windows runners by conditionally disabling Maglev JIT at process startup, with an opt-out via an environment variable.

Changes:

  • Detect Node 24 runtime on Windows x64 and prepend --no-maglev to the Node invocation arguments.
  • Allow re-enabling Maglev via ACTIONS_RUNNER_REENABLE_NODE_MAGLEV set either at the machine/process level or step-level env.
Show a summary per file
FileDescription
src/Runner.Worker/Handlers/NodeScriptActionHandler.csConditionally adds --no-maglev to Node 24 invocation on Windows x64, with env-var override.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment on lines +134 to +138
if (nodeRuntimeVersion.StartsWith("node24", StringComparison.OrdinalIgnoreCase) &&
Constants.Runner.Platform == Constants.OSPlatform.Windows &&
Constants.Runner.PlatformArchitecture == Constants.Architecture.X64 &&
!StringUtil.ConvertToBoolean(System.Environment.GetEnvironmentVariable("ACTIONS_RUNNER_REENABLE_NODE_MAGLEV")) &&
!StringUtil.ConvertToBoolean(Environment.GetValueOrDefault("ACTIONS_RUNNER_REENABLE_NODE_MAGLEV")))
yacaovsnc
yacaovsnc previously approved these changes May 26, 2026
@yacaovsnc

Copy link
Copy Markdown
Contributor

Do you want to change behavior after the env is set? Up to you.

yacaovsnc
yacaovsnc previously approved these changes May 26, 2026
@TingluoHuang
TingluoHuangforce-pushed the users/tihuang/nodemaglev branch from 3059c43 to c01332aCompareMay 26, 2026 15:10
@TingluoHuangTingluoHuang changed the title Disable node v8 maglev jit compiler on Windows.Allow disable node v8 maglev jit compiler on node24.May 26, 2026
@TingluoHuang
TingluoHuangforce-pushed the users/tihuang/nodemaglev branch from c01332a to 0663c69CompareMay 26, 2026 19:01
@TingluoHuang
TingluoHuang enabled auto-merge (squash) May 26, 2026 19:01
@TingluoHuang
TingluoHuang merged commit 3ff2186 into mainMay 26, 2026
11 checks passed
@TingluoHuang
TingluoHuang deleted the users/tihuang/nodemaglev branch May 26, 2026 19:05
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@TingluoHuang@yacaovsnc@lokesh755@Reinaldotec