Skip to content

UCP/EP: fix discard_lanes_arg leak and OOO discard refcounter - #11446

Merged
evgeny-leksikov merged 3 commits into
openucx:masterfrom
evgeny-leksikov:ft-split/02-discard-flow-fixes
May 14, 2026
Merged

evgeny-leksikov merged 3 commits into
openucx:masterfrom
evgeny-leksikov:ft-split/02-discard-flow-fixes

Conversation

@evgeny-leksikov

Copy link
Copy Markdown
Contributor

What?

fix EP discard_lanes_arg leak and Out-of-Order (OOO) discard refcounter

Why?

Discovered with #11379 , but upstreamed as independent bugfix

How?

  • EP discard_lanes_arg leak: destroy failed stub EP directly to take ownership of uct_ep from the caller
  • OOO discard refcounter: activate ifaces for the new configuration upfront before discard callback completion to avoid race condition which leads to negative EP reference counter when discard callbacks run out of order.

Comment thread src/ucp/core/ucp_worker.c Resolved
Build a uct_iface_t whose ep_flush matches ucp_failed_tl_iface so that
ucp_is_uct_ep_failed() returns true, then verify ucp_worker_discard_uct_ep
calls uct_ep_destroy on the input (fixes leak addressed by PR openucx#11446).
Comment thread src/ucp/core/ucp_ep.h Resolved

@gleon99 gleon99 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@evgeny-leksikov
evgeny-leksikov merged commit c58a60b into openucx:master May 14, 2026
154 checks passed
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.

2 participants