Fix racy assertion in inbound admission openssl_server_test - #8406
Open
Amaury Chamayou (achamayou) wants to merge 1 commit into
Open
Amaury Chamayou (achamayou) wants to merge 1 commit into
Amaury Chamayou (achamayou) wants to merge 1 commit into
Conversation
InboundAdmission::consumed() wakes the transport synchronously, so the loop thread can read and re-saturate the 64KiB budget before the test thread evaluates REQUIRE_FALSE(admission->saturated()). Drop the check; resumption is already proven by the drain loop that follows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Amaury Chamayou (achamayou)
September 18, 2026 16:27
View session
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The test-only change removes the race while preserving validation of eventual data delivery.
Pull request overview
Fixes a scheduler-racy assertion in the inbound admission OpenSSL test without affecting runtime behavior.
Changes:
- Removes the unreliable immediate saturation check.
- Retains drain-loop validation of resumed reads and complete delivery.
File summaries
| File | Description |
|---|---|
src/tls/test/openssl_server_test.cpp |
Removes the racy assertion and documents the synchronization behavior. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Motivation
The
Coverageworkflow has been failing onmain(e.g. run 35362158919, and the run before it) inopenssl_server_test:in
"Reads pause while the node-wide inbound budget is exhausted", added in #8117. This is a test race, not a transport bug.Implementation summary
InboundAdmission::consumed()callswake_all()synchronously when the budget drops back under the limit, so the server's loop thread resumes reading immediately. The client thread still has ~4 MiB buffered against a 64 KiB limit, so the server can read and re-saturate the budget betweenconsumed()returning and the test thread evaluatingREQUIRE_FALSE(admission->saturated()).The check is dropped and the comment explains why an immediate check is not valid. Resumption is already proven by the drain loop directly after it, which keeps releasing and requires
received == to_send.Reproduced locally by pinning the test to a single CPU so the loop thread preempts the test thread: the original fails 33/40 runs, all at line 2348; with this change it passes 40/40 under the same conditions, and the full
openssl_server_testbinary passes.Note: like several other tests in this file, a failed
REQUIREhere unwinds past a joinablestd::thread, which is why the failure surfaced as SIGABRT ("terminate called without an active exception") and skipped the remaining test case. That pattern is file-wide and left unchanged.Safety and compatibility
Test-only change; no runtime impact.