From af0fab825af274b3bc782a8901aa663aa82ddfc5 Mon Sep 17 00:00:00 2001 From: Tingluo Huang Date: Fri, 22 May 2026 18:28:37 -0400 Subject: [PATCH 1/2] Disable node v8 maglev jit compiler on Windows. --- .../Handlers/NodeScriptActionHandler.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs index 668ca95f6df..d3839eb791f 100644 --- a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs +++ b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs @@ -12,6 +12,7 @@ using GitHub.Runner.Sdk; using GitHub.Runner.Worker.Container; using GitHub.Runner.Worker.Container.ContainerHooks; +using GitHub.Services.Common; namespace GitHub.Runner.Worker.Handlers { @@ -128,6 +129,17 @@ public async Task RunAsync(ActionRunStage stage) // file name character on Linux. string arguments = StepHost.ResolvePathForStepHost(ExecutionContext, StringUtil.Format(@"""{0}""", target.Replace(@"""", @"\"""))); + // Disable maglev jit compiler in node.js 24.x.x on x64 Windows until the node.js bug is fixed. + // https://github.com/nodejs/node/issues/62260 + 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"))) + { + arguments = $"--no-maglev {arguments}"; + } + #if OS_WINDOWS // It appears that node.exe outputs UTF8 when not in TTY mode. Encoding outputEncoding = Encoding.UTF8; From 0663c693120cb6bc1c3b146e5e594b0324de704b Mon Sep 17 00:00:00 2001 From: Tingluo Huang Date: Tue, 26 May 2026 10:26:55 -0400 Subject: [PATCH 2/2] feedback. --- .gitignore | 3 ++- src/Runner.Worker/Handlers/NodeScriptActionHandler.cs | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 411fe4011a5..a7a57dc42bd 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,5 @@ TestResults TestLogs .DS_Store .mono -**/*.DotSettings.user \ No newline at end of file +**/*.DotSettings.user +**/*.lscache \ No newline at end of file diff --git a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs index d3839eb791f..29def039f99 100644 --- a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs +++ b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs @@ -132,11 +132,9 @@ public async Task RunAsync(ActionRunStage stage) // Disable maglev jit compiler in node.js 24.x.x on x64 Windows until the node.js bug is fixed. // https://github.com/nodejs/node/issues/62260 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"))) + (StringUtil.ConvertToBoolean(System.Environment.GetEnvironmentVariable("ACTIONS_RUNNER_DISABLE_NODE_MAGLEV")) || StringUtil.ConvertToBoolean(Environment.GetValueOrDefault("ACTIONS_RUNNER_DISABLE_NODE_MAGLEV")))) { + Trace.Info("Disable maglev jit compiler in node.js"); arguments = $"--no-maglev {arguments}"; }