Reset the ready-file wait counter on each server start - #11091
Merged
Conversation
The scripts that wait for a server to publish its ready file declare counter at file scope and never reset it, so the retry budget is shared by every server start in the script instead of applying to each one. Once the early cases have used it up, every later create_port() falls straight through to "NO ready file ending test", kills a server that was starting normally, and the client then fails with "port number cannot be 0". Retry loops do not help, since the budget is already spent when they run. The failure needs only a build whose server start-up is slow enough to consume a few tenths of a second each time. It showed up in the FIPS dev-no-POST kernel-settings-all-pqc-asm job, where the server pays for the CASTs, the PQC algorithms and the vector-register fallback fuzzer: psk.test gave up after exactly 20 waits and tls13.test after exactly 51, both the full script budget rather than a per-case one. Reset counter where the wait begins, which is what the ocsp-stapling scripts already do. Reproduced with a wrapper that delays the server by one second: psk.test then fails on its third case before the change and passes after it.
douzzer
approved these changes
Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Seven test scripts wait for the example server to publish its ready file, but they declare
counterat file scope and never reset it. The retry budget (20 waits of 0.1s, 50 intls13.test) is therefore shared across every server start in the script instead of applying to each one. Once the early cases have consumed it, every latercreate_port()/run_test()falls straight through toNO ready file ending test, kills a server that was starting up normally, and the client then fails withport number cannot be 0. Retry loops around the failing case do not help, because the budget is already spent by the time they run.This only needs a build whose server start-up is slow enough to burn a few tenths of a second per case. It surfaced in the FIPS
dev-no-POSTkernel-settings-all-pqc-asmjob (introduced in #11031), where the server pays for the CASTs, the PQC algorithms and the vector-register fallback fuzzer. The signature is unmistakable:psk.testgave up after exactly 20 waits andtls13.testafter exactly 51 — the whole script budget, not a per-case one.The fix is to reset
counterwhere the wait begins, which is whatscripts/ocsp-stapling*.testalready does in itswait_for_readyFile()helper.Changes
scripts/crl-revoked.testrun_test()andrun_hashdir_test()scripts/openssl.testcheck_server_ready()scripts/pkcallbacks.testrun_test()scripts/psk.testcreate_port()scripts/resume.testdo_test()scripts/tls13.testcreate_port()scripts/trusted_peer.testcreate_port()Test-script only — no library code is touched, and the retry limits themselves are unchanged.
Testing
Reproduced with a wrapper that delays the example server by one second on start-up, so each case eats the full budget:
psk.testfails on its third case withNO ready file ending test/port number cannot be 0.