Repository navigation
[core][tests] Fixes around DROPREQ and handling the broken links - #3461
Merged
ethouris merged 10 commits intoNov 30, 2026
Merged
Conversation
…roup members Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…g group Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… without loss Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…he last one broke Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #3461 +/- ##
===========================================
- Coverage 71.12% 59.36% -11.76%
===========================================
Files 101 120 +19
Lines 19776 28594 +8818
Branches 0 4341 +4341
===========================================
+ Hits 14065 16976 +2911
- Misses 5711 9929 +4218
- Partials 0 1689 +1689 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
CUDTSocket::setBrokenClosed() set SSS_BROKEN and then called setClosed(), which overwrote it with SSS_CLOSED. checkBrokenSockets() collects only BROKEN sockets, so such sockets were never removed from their group as long as the application kept the group in use. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The peer group may still be alive and expecting the same sequence domain, and the group sender buffer still holds packets in it. Regenerating the sequence caused the new member's stream to be in a different domain than the receiver, which stalled the delivery. Added a test for a new link attached to a group with no members. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… off Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Behavior change
The DROPREQ message shall never be sent in live mode - this is handled because any peer can send it by any reason, but normally there should be no reason for it. Therefore if it happens to be received, it is still handled with the following premises:
(Fixes done by Copilot)
Core fixes
6fddd31f, DROPREQ NULL crash: a group member has no receive buffer of its own, so the DROPREQ handler dereferenced a null pointer. It now reads the oldest sequence from the group's buffer and only touches a socket buffer when one exists.7cef309e, dead members never removed (api.cpp):setBrokenClosed()set BROKEN and then overwrote it with CLOSED, so broken sockets were never collected while the application kept sending. BROKEN is now set last.c147c9ca, empty group (group.h):remove()regenerated the scheduled sequence when the group became empty. A replacement link then ended up in a different sequence domain and delivery stalled. The sequence is now kept.f770d1b7, DROPREQ semantics: applies only with TSBPD on and TLPKTDROP off.CRcvBuffer::hasMissingInRangefor a plain socket, orCUDTGroup::hasMissingInRangeagainst the group buffer for a member.SRTO_TLPKTDROPinAPI-socket-options.mddescribes the behavior.Tests
bd7f4fef:Bonding.JoinRunningGroupSequence.f847af73:Bonding.BackupFailoverNoLoss.f5c11fe7:Bonding.BackupLastLinkReplaced.c147c9ca: also addsBonding.BackupLastLinkReplacedEmptyGroup(and theBackupLastLinkReplacedImplhelper).0a554feb: movesLinkBreaker, a UDP relay that can cut a link on demand, intotest_env.hwith usage documentation.f770d1b7: also adds the buffer unit testCRcvBufferReadMsg.MissingInRange.The tests I ran passed: all 16
Bonding.*plusCRcvBufferReadMsg.*. The only test for the DROPREQ change is theMissingInRangebuffer unit test, so the break path itself is not tested end to end.