Repository navigation
investigate flaky test-child-process-exec-abortcontroller-promisified on Windows CI #37568
Description
Activity
This seems likely to have been introduced by #37325. @Linkgoron @benjamingr
@nodejs/testing @nodejs/platform-windows @nodejs/child_process
- addedchild_processIssues and PRs related to the child_process subsystem.Issues and PRs related to the child_process subsystem.flaky-testIssues and PRs involving tests that fail intermittently in CI.Issues and PRs involving tests that fail intermittently in CI.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
on Mar 2, 2021 Yes, this is obviously my added test. Looks an issue with background timeout:
https://www.ibm.com/support/pages/timeout-command-run-batch-job-exits-immediately-and-returns-error-input-redirection-not-supported-exiting-process-immediatelyI'd be happy to replace the timeout command with anything long-running. The test needs something long-running enough to give the node process time to kill it. The above suggests using
ping -n 10 127.0.0.1 >NUL(for a 10 second pause). Another option on Windows would be executing a node process with the "never-ending"jsfixture. Originally, that was how I wanted to write the test but it doesn't work on Linux (as killing thecpthat's created with exec on linux doesn't kill the underlying Node process because of the shell, but on windows it works as expected).Have you seen any issues with the
sleepcommand, which is what I used on Linux?Could we use
node -e 'setTimeout(()=>{}, 9999)'? It shouldbe cross platformwork on Windows.Could we use
node -e 'setTimeout(()=>{}, 9999)'? It should be cross plateform.Or even
node -e 'setInterval(()=>{}, 9999)'? (The overall test timeout is handled bytools/test.pyso we can rely on that for platform-specific timeouts automatically.)Could we use
node -e 'setTimeout(()=>{}, 9999)'? It should be cross plateform.Yes, but it needs something with a low enough timeout, so that it would die close enough to the end of the test but also high enough so that it would 100% get killed by the node process (test) before the timeout is up. The issue is that at the end of the tests, the tests use
ps awwxto check if there's a node process that's still running.@Trott setInterval didn't work for me, that was my original solution - before relying on TIMEOUT/sleep. see #37518
Could we use
node -e 'setTimeout(()=>{}, 9999)'? It shouldbe cross platformwork on Windows.On Windows, even setInterval would work
A potential fix would be to keep using
sleepon linux, and usesetIntervaleverywhere else, right?I'm not sure why we would change everything if the issue is only on windows, but your fix should work.
- added a commit that references this issue
on Mar 4, 2021 - added a commit that references this issue
on Mar 16, 2021 - added a commit that references this issue
on Sep 7, 2021 - added a commit that references this issue
on May 22, 2026
Surprised there isn't already an issue for this one. It's been happening a lot lately. I think it is only on the 32-bit Windows in CI.
Here's an example: