UCT/UD: Remove stale private UD connections - #11822
Open
iyastreb wants to merge 2 commits into
Open
Conversation
iyastreb
force-pushed
the
iyastreb/ud_match_stale_conn
branch
from
August 25, 2026 13:51
d7a9d80 to
c47656a
Compare
iyastreb
force-pushed
the
iyastreb/ud_match_stale_conn
branch
from
August 25, 2026 14:03
c47656a to
183a66d
Compare
iyastreb
marked this pull request as ready for review
August 25, 2026 14:06
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.
What?
Release a UD private endpoint once its peer is gone, instead of keeping it forever.
Why?
On first UCP wireup request:
A private endpoint is created internally on CREQ, has no UCP endpoint above it => so keepalive never checks it => and UD never signals a closed remote endpoint.
When remote peer connection dies => private UD connection stays forever pointing at a dead ep_id
On UCP wireup reconnect request =>
uct_ep_create()matches that stale endpoint by addr+conn_sn => reuses it as is => wireup reply goes to the dead ep_id => connection never completesHow?
Probe an idle private endpoint from the UD timer with the existing
uct_ud_ep_check(), skipping it while the peer keeps sending. The threshold is the upper layer's keepalive interval. An alive peer acks; otherwise peer_timeout fires and the endpoint leaves connection matching immediately.