Repository navigation
tests: the stop tests' connect probe gives up after 100 ms, so a SYN the closing listener drops no longer outlasts the stop - #657
Merged
Conversation
…the closing listener drops no longer outlasts the stop "stop: a datagram that reaches a socket the stop closed is dropped" failed on arm64 with "the stop ended with a handler still holding its connection", on #654 and again on #656, each time 1.26 s into the test. Its probe connects to the port until it is refused, while the stop closes the listener. A SYN that lands as the listener closes is dropped without an answer, connect waits a second for TCP to send it again, and the stop's one-second drain is over by the time the test looks for the reactor. Looping that step on main: 34 of 4,244 stops were refused after a second (1,062 ms at worst). With the probe giving up on a connect that has no answer in 100 ms: none of 4,914, 101 ms at worst.
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.
"stop: a datagram that reaches a socket the stop closed is dropped, not handed to OnDatagram" failed on arm64 with "the stop ended with a handler still holding its connection", on #654 and again on #656. Neither PR reaches it: #656 changes version numbers only. Both times it failed about 1.26 s in.
Its probe (
Refuses) connects to the port in a loop until it is refused, while the stop is closing the listener. A SYN that lands as the listener closes is dropped without an answer, so that connect waits a second for TCP to send it again. The stop's own drain is one second, so by the time the test looks, the reactor has ended. 1 s plus the test's 200 ms sleep accounts for it.The probe now gives up on a connect with no answer in 100 ms and tries again, and the next one is refused at once.
Tests
StopDrainTests: 25 of 25 clean runs, and 3 of 3 on one core shared with four busy loops. The other test that uses the probe ("from the stop on its listener refuses connections, while a handler still holds one") makes the same check, so it could fail the same way; it passed too.Test code only.
Overlap
None of the open PRs touches
StopDrainTests.cs.🤖 Generated with Claude Code