Repository navigation
Investigate flaky test-http-server-request-timeout-keepalive #42741
Description
Activity
- addedflaky-testIssues and PRs involving tests that fail intermittently in CI.Issues and PRs involving tests that fail intermittently in CI.
on Apr 14, 2022 I will take care of that tomorrow morning.
Out of the box I just have to fine tune timers.
@nodejs/build Can I get access to that BSD machine?
- added a commit that references this issue
on Apr 24, 2022 - added a commit that references this issue
on Apr 25, 2022 Looks like #42846 reduced the error rate by some amount but it's still flaky. We can probably further increase the base timeout and see if that helps, even if the test will become unbearably slow.
I have a further change in #42812 which should reduce it even more.
I'd suggest to wait for that to land and see what happens.Anyway given the success rate is above 99% I think we might think about closing this (since retries in CI are normal) and reopen only if there is consistent failure.
I have a further change in #42812 which should reduce it even more. I'd suggest to wait for that to land and see what happens.
Anyway given the success rate is above 99% I think we might think about closing this (since retries in CI are normal) and reopen only if there is consistent failure.
This issue is tracking that the test is flaky, which it still appears to be so I'm reopening.
It's interesting that it seems to only happen on macOS and FreeBSD. I might run a few stress tests.
Reacted by Richard LauPatch (assuming the issue is timing-related):
diff --git a/test/parallel/test-http-server-headers-timeout-keepalive.js b/test/parallel/test-http-server-headers-timeout-keepalive.js index 05531087ed83..ba82cb0e0c9c 100644 --- a/test/parallel/test-http-server-headers-timeout-keepalive.js +++ b/test/parallel/test-http-server-headers-timeout-keepalive.js @@ -24,7 +24,7 @@ function performRequestWithDelay(client, firstDelay, secondDelay, closeAfter) { }, firstDelay + secondDelay).unref(); } -const headersTimeout = common.platformTimeout(2000); +const headersTimeout = common.platformTimeout(5000); const server = createServer({ headersTimeout, requestTimeout: 0, diff --git a/test/parallel/test-http-server-request-timeout-keepalive.js b/test/parallel/test-http-server-request-timeout-keepalive.js index 2466e1ee7a95..eb6d64b2f2bb 100644 --- a/test/parallel/test-http-server-request-timeout-keepalive.js +++ b/test/parallel/test-http-server-request-timeout-keepalive.js @@ -24,7 +24,7 @@ function performRequestWithDelay(client, firstDelay, secondDelay, closeAfter) { }, firstDelay + secondDelay).unref(); } -const requestTimeout = common.platformTimeout(2000); +const requestTimeout = common.platformTimeout(5000); const server = createServer({ headersTimeout: 0, requestTimeout,
First run (master and with patch):
osx11 freebsd12-x64 master OK: 902 NOT OK: 98 TOTAL: 1000OK: 863 NOT OK: 137 TOTAL: 1000increased timeout OK: 676 NOT OK: 324 TOTAL: 1000OK: 1000 NOT OK: 0 TOTAL: 1000Second run (master and with patch):
osx11 freebsd12-x64 master OK: 910 NOT OK: 90 TOTAL: 1000OK: 819 NOT OK: 181 TOTAL: 1000increased timeout OK: 713 NOT OK: 287 TOTAL: 1000OK: 1000 NOT OK: 0 TOTAL: 1000Unless I'm mistaken, increasing the timeout fixes the issues on FreeBSD but somehow makes it worse on macOS?
I started a third run with fresh revisions because I find this hard to believe (master and with patch).
Update: Third run (master and with patch):
osx11 freebsd12-x64 master OK: 916 NOT OK: 84 TOTAL: 1000OK: 838 NOT OK: 162 TOTAL: 1000increased timeout OK: 721 NOT OK: 279 TOTAL: 1000OK: 1000 NOT OK: 0 TOTAL: 1000Median success rate (refer to patch and separate tables above):
osx11 freebsd12-x64 master (2000ms) 91.0 % 83.8 % patched (5000ms) 71.3 % 100 % @richardlau Thanks, I think one commit closed this by mistake.
13 remaining items
- added a commit that references this issue
on May 10, 2022 It seems the flake is still there: nodejs/reliability#273
Reason parallel/test-http-server-request-timeouts-mixedType JS_TEST_FAILURE Failed PR 13 (#42960, #42963, #42623, #42968, #42867, #37769, #42423, #42601, #43005, #42970, #43036, #42725, #43023) Appeared test-orka-macos10.15-x64-1, test-macstadium-macos11.0-arm64-3, test-orka-macos11-x64-2, test-nearform-macos10.15-x64-1, test-orka-macos11-x64-1 First CI https://ci.nodejs.org/job/node-test-pull-request/43865/ Last CI https://ci.nodejs.org/job/node-test-pull-request/43960/ Example
not ok 1166 parallel/test-http-server-request-timeouts-mixed --- duration_ms: 3.255 severity: fail exitcode: 1 stack: |- node:assert:399 throw err; ^ AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value: assert(request2.completed) at Timeout._onTimeout (/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/test/parallel/test-http-server-request-timeouts-mixed.js:106:5) at listOnTimeout (node:internal/timers:564:17) at process.processTimers (node:internal/timers:507:7) { generatedMessage: true, code: 'ERR_ASSERTION', actual: false, expected: true, operator: '==' } Node.js v19.0.0-pre ...- added a commit that references this issue
on May 31, 2022 I just comprehended what had happened here.
The issue was mistakenly closed by cross-connection via pushing in another repository a commit havingFixes:reference.
The push contained up to 567 latest commits (starting from 2022-04-01) fromnoderepository, rebased on top of test commits.Checking with
curl https://github.com/proxy/api.github.com/users/LiviaMedeiros/events?per_page=100 | jq '.[]|select(.type=="IssuesEvent")'confirmed that only this issue was affected.I deeply apologize for this embarassing incident. In the future, I'll keep anything like that on a separate GitHub account.
Please let me know if there are other side effects or something to undo.@aduh95 thanks for reopening this.
Pinging you as a TSC member (ifI made a mistakeis applicable).I got a failure in #44741 (comment)
Getting some failures again on osx11 ([test-http-server-request-timeouts-mixed](https://ci.nodejs.org/job/node-test-pull-request/59813/, https://ci.nodejs.org/job/node-test-pull-request/59820/)
github-actions commented
on Jun 25, 2026 on Jun 25, 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 Jun 25, 2026 github-actions commented
on Jul 26, 2026 on Jul 26, 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 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.- added a commit that references this issue
on Sep 30, 2026 - added 2 commits that reference this issue
on Oct 3, 2026
Test
test-http-server-request-timeout-keepalivePlatform
FreeBSD, macOS
Console output
Build links
Additional information
Test was recently updated by #41263.
cc @ShogunPanda