Repository navigation
[release/1.5.2] libfabric: serialize all endpoint/CQ/AV calls with the rail EP lock - #2542
Merged
Merged
Conversation
…2308) ## What? Hold the rail's `ep_mutex_` around every libfabric call on its endpoint, CQ and AV, including the progress-thread (PT) paths `drainPostQueue()` and `pollForCompletions()`, which bypassed it. Also lock AV insert/remove and endpoint-bound MR bind/enable/close. ## Why? Rails use `FI_THREAD_COMPLETION`, so the application must serialize endpoint and CQ access. With the PT enabled, the PT posts transfers and reads the CQ while the caller's thread posts control messages on rail 0 (`postSend()`, which took the lock). On libfabric 2.7.x (EFA RDM path) this race corrupts provider state and hangs nixlbench --enable-pt VRAM-initiator WRITE. ## How? Lock only the `fi_*` call itself, never an `FI_EAGAIN` retry loop, and run completion handling and callbacks outside the lock. Signed-off-by: Rongbing Zhou <rongbiz@amazon.com> (cherry picked from commit 2c1f6ef)
nv-nmailhot
requested review from
akkart-aws,
amitrad-aws and
fengjica
as code owners
October 28, 2026 16:45
|
👋 Hi nv-nmailhot! Thank you for contributing to ai-dynamo/nixl. Your PR reviewers will review your contribution then trigger the CI to test your changes. 🚀 |
5 of 6 tasks
This branch had an error being deployed
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?
Cherry-pick of #2308 (
2c1f6eff): serialize all endpoint/CQ/AV calls with the rail EP lock in the libfabric backend.Why?
Listed as pending for 1.5.2. Already on
mainandrelease/1.6.0; applies cleanly on top of the #2494 cherry-pick (both touchlibfabric_rail.cpp).🤖 Generated with Claude Code