Skip to content

UCT/UD: Remove stale private UD connections - #11822

Open
iyastreb wants to merge 2 commits into
openucx:masterfrom
iyastreb:iyastreb/ud_match_stale_conn
Open

UCT/UD: Remove stale private UD connections#11822
iyastreb wants to merge 2 commits into
openucx:masterfrom
iyastreb:iyastreb/ud_match_stale_conn

Conversation

@iyastreb

Copy link
Copy Markdown
Contributor

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 completes

How?

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.

@iyastreb
iyastreb force-pushed the iyastreb/ud_match_stale_conn branch from d7a9d80 to c47656a Compare August 25, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant