This repository was archived by the owner on Sep 11, 2026. It is now read-only.
Repository navigation
Fix UDP stress test hang on SendToError - #399
Closed
SeanTAllen wants to merge 1 commit into
Closed
SeanTAllen wants to merge 1 commit into
SeanTAllen wants to merge 1 commit into
Conversation
The server's echo path silently dropped datagrams when send_to returned SendToError. The client waited forever for echoes that never came. Server: stash SendToError the same as SendToWouldBlock and retry via _drain_stash. Drop with a diagnostic after 100 consecutive errors on the same datagram so a permanent error can't loop forever. Client: a periodic stall timer closes the socket and reports failure when no echoes arrive for an extended period. Safety net for any cause of missing echoes, not just SendToError.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The server's echo path silently dropped datagrams when
send_toreturnedSendToError. The client waited forever for echoes that never came — the CI hang at run 34036971999 (5 Windows failures, 1 Linux failure out of 2730 runs per platform).Two changes, both in the stress test:
Server retry.
SendToErrorin_on_receivednow stashes the datagram and retries via_drain_stash, same asSendToWouldBlock. In_drain_stash, a bounded retry counter drops the datagram with a stderr diagnostic after 100 consecutive errors so a permanent error can't loop.Client stall timer. A periodic timer closes the client and reports failure when no echoes arrive for an extended period. Safety net for any cause of missing echoes beyond
SendToError.No lori library changes — the ASIO edge-trigger semantics (EPOLLET, PSN, EV_CLEAR) and the
_pending_reads/_read_againchain were traced and verified correct across all three platforms.