opensm/osm_multicast.c: Treat send only full members like full members on partial leave to avoid MLID leak - #43
Open
myurasov-nv wants to merge 1 commit into
Conversation
…s on partial leave to avoid MLID leak Signed-off-by: Mikhail Yurasov <[email protected]>
myurasov-nv
force-pushed
the
fix-sendonly-full-mlid-leak
branch
from
August 13, 2026 04:02
d5ea3f4 to
125c2f9
Compare
myurasov-nv
marked this pull request as ready for review
August 13, 2026 05:02
andrewyu-hub
approved these changes
Aug 14, 2026
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.
Description
osm_mgrp_add_port()countsfull_membersusingIB_JOIN_STATE_FULL | IB_JOIN_STATE_SEND_ONLY_FULL(since 0dc7b6d, "Add support for send only full member multicast joins"), but the keep-vs-remove condition inosm_mgrp_remove_port()still testsIB_JOIN_STATE_FULLonly. A port that joins with JoinState 0x9 and partially leaves with 0x1 is removed entirely while thefull_membersdecrement is skipped: the group stays empty withfull_membersstuck at 1,osm_mgrp_cleanup()never runs, and the MLID is pinned until SM restart. The fix uses the same mask in the keep condition, so such a member remains as send-only-full and its final leave takes the normal remove/decrement/cleanup path.full_membersstuck at 1, MLID leaked until SM restart; ~1018 cycles exhaust the MLID space and every new group creation fails with ERR 1B19 (SA status NO_RESOURCES) despite no active membersReproduction
LD_PRELOAD=umad2sim.so opensm -f opensm.log.mcmr_rcv_create_new_mgrp: ERR 1B19: get_new_mlid failed request mlid 0x0000, while SA MCMemberRecord queries confirm the pinned groups have no members. Only an SM restart recovers. Patched: the same loop runs 1100 cycles clean and each final leave reclaims its MLID.