Repository navigation
parallel/test-debugger-run-after-quit-restart is flaky on macOS #64005
Description
Activity
- addedmacosIssues and PRs related to the macOS platform.Issues and PRs related to the macOS platform.flaky-testIssues and PRs involving tests that fail intermittently in CI.Issues and PRs involving tests that fail intermittently in CI.
on Jun 19, 2026 Thanks for opening the issue. I took look at the failure logs. I don't think this is the same race fixed by #62807.
(another log: https://github.com/nodejs/node/actions/runs/27702868250)The new logs already include
connecting ... okandDebugger attached., so the test has passed the reconnect /oksynchronization point.One remaining weak spot seems to be the gap between
Runtime.runIfWaitingForDebugger()and the CLI actually printing the initialbreak ... in ...output. TheDebugger.pausedhandler first awaits the async pause formatting path, includingselectedFrame.list(contextLineNumber)/Debugger.getScriptSource, and only then prints the break line:node/lib/internal/debugger/inspect_repl.js
Lines 913 to 921 in 81e93df
inspector.suspendReplWhile(() => PromisePrototypeThen( SafePromiseAllReturnArrayLike([formatWatchers(true), selectedFrame.list(contextLineNumber)]), ({ 0: watcherList, 1: context }) => { const breakContext = watcherList ? `${watcherList}\n${inspect(context)}` : inspect(context); print(`${header}\n${breakContext}`); })); Runtime.runIfWaitingForDebugger()is awaited here, but that does not appear to wait for the paused-event output formatting to complete:node/lib/internal/debugger/inspect_repl.js
Line 1197 in 81e93df
return Runtime.runIfWaitingForDebugger(); So the next fix direction might be to make
run/restartresolve only after the initial pause output has been displayed. I tried a local prototype of that approach and the relevant debugger tests pass locally.That said, this changes
node inspectcommand-completion semantics rather than only the test, so it would be good to confirm whether that behavior is desired. Is this direction reasonable? (cc: @mcollina @trivikr)I can help test/review or share details from the local prototype.
- added a commit that references this issue
on Jun 20, 2026 - added a commit that references this issue
on Jun 20, 2026 - added a commit that references this issue
on Jun 20, 2026 - added a commit that references this issue
on Jun 25, 2026 - added 3 commits that reference this issue
on Jul 21, 2026 - added a commit that references this issue
on Jul 30, 2026 Update: Based on #65194 and the subsequent stress results,
run-after-quit-restartfailure now appears more likely to have been caused byRuntime.runIfWaitingForDebugger()being sent before the target entered its frontend wait.The render-order gap described in #64005 (comment) is still valid, but it should be treated as a separate follow-up rather than the primary cause of this flake.
I also ran
run-after-quit-restart1,000 times with-j16on macOS 15:- the implementation commit (821e267): 1,000/1,000 passed
- its parent commit (404b0cf): 38/1,000 failed, all timing out while waiting for the initial break
This provides further evidence that #65194 may also fix this flake.
- added a commit that references this issue
on Aug 23, 2026 - added 2 commits that reference this issue
on Sep 7, 2026
Flaky Test: parallel/test-debugger-run-after-quit-restart
Platform: macOS
Failed run: https://github.com/nodejs/node/actions/runs/27749999537/job/82367922179?pr=63973
Error:
Output:
Root cause: The debugger inspector round-trip can be slow under CI load on macOS, causing the 15s timeout to be exceeded when waiting for the initial break after restart.