Repository navigation
Flaky test-stream-readable-unpipe-resume #54133
Description
Activity
- addedflaky-testIssues and PRs involving tests that fail intermittently in CI.Issues and PRs involving tests that fail intermittently in CI.
on Jul 31, 2024 - addedlinuxIssues and PRs related to the Linux platform.Issues and PRs related to the Linux platform.
on Jul 31, 2024 I can reproduce on Ubuntu.
diff --git a/test/parallel/test-stream-readable-unpipe-resume.js b/test/parallel/test-stream-readable-unpipe-resume.js index b40f724bcc..3eeae52f5f 100644 --- a/test/parallel/test-stream-readable-unpipe-resume.js +++ b/test/parallel/test-stream-readable-unpipe-resume.js @@ -13,7 +13,9 @@ const transformStream = new stream.Transform({ }) }); -readStream.on('end', common.mustCall()); +readStream.on('end', common.mustCall(function () { + console.log('end'); +})); readStream .pipe(transformStream)
$ ./tools/test.py --repeat=10000 test/parallel/test-stream-readable-unpipe-resume === release test-stream-readable-unpipe-resume === Path: parallel/test-stream-readable-unpipe-resume end Command: out/Release/node /home/luigi/node/test/parallel/test-stream-readable-unpipe-resume.js --- TIMEOUT --- [05:21|% 100|+ 9999|- 1]: Done Failed tests: out/Release/node /home/luigi/node/test/parallel/test-stream-readable-unpipe-resume.jsThis is yet another case (see #52550 (comment)) where the test correctly finishes (note "end" in the output) but the process does not exit.
I wish we were able to reproduce these more reliably, because I don't know how to debug something that only happens once or twice every 10k runs!
Reacted by Luigi PincaIt might be only a coincidence or a reduced failure rate, but even in this case I get no failures with the
--jitlessflag.Hypothetically, as a short-term solution, we could call
process.exit()from these tests, but that acts like a bandaid, and not a patch.- readStream.on('end', common.mustCall()); + readStream.on('end', common.mustCall(() => process.exit()));
@redyetidev it does not help, see #52964 (comment).
Reacted by Aviv KellerInsterestingly, it seems to not fail if you change the line to:
readStream.on('end', common.mustCall(() => queueMicrotask(process.exit)));
I ran 10,000 runs with this change: 0 failures
I ran 2,000 runs without this change: 4 failuresAlthough this could be a coincidence?
Although this could be a coincidence?
Yes, I think so. For example, this
diff --git a/test/parallel/test-net-write-fully-async-hex-string.js b/test/parallel/test-net-write-fully-async-hex-string.js index 37b5cd75c1..b37f2acefc 100644 --- a/test/parallel/test-net-write-fully-async-hex-string.js +++ b/test/parallel/test-net-write-fully-async-hex-string.js @@ -30,3 +30,7 @@ const server = net.createServer(common.mustCall(function(conn) { writeLoop(); })); })); + +server.on('close', function () { + queueMicrotask(process.exit); +});
makes no difference.
This whole issue is strange. I wonder what task is hanging the process 🤔
github-actions commented
on Apr 29, 2026 on Apr 29, 2026 – with GitHub ActionsContributorMore actionsThis issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Apr 29, 2026 github-actions commented
on May 30, 2026 on May 30, 2026 – with GitHub ActionsContributorMore actionsThis issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 240 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
Test
test-stream-readable-unpipe-resumePlatform
Linux x64
Console output
Build links
Additional information
No response