Skip to content

net_ib: add missing break in printIbWcStatusHint switch - #2265

Open
EylonKrause wants to merge 1 commit into
NVIDIA:masterfrom
EylonKrause:fix/ib-wc-status-hint-break
Open

net_ib: add missing break in printIbWcStatusHint switch#2265
EylonKrause wants to merge 1 commit into
NVIDIA:masterfrom
EylonKrause:fix/ib-wc-status-hint-break

Conversation

@EylonKrause

Copy link
Copy Markdown

Description

printIbWcStatusHint is a switch on the IB work-completion status whose IBV_WC_LOC_PROT_ERR, IBV_WC_WR_FLUSH_ERR and IBV_WC_RETRY_EXC_ERR cases lack a break. Because they fall through, a single completion error prints its own hint plus the hints of every case below it — e.g. a local protection error (IBV_WC_LOC_PROT_ERR) also advises that "NCCL_IB_TIMEOUT is set too short", which is unrelated and misleading when debugging.

Related Issues

None.

Changes & Impact

  • src/transport/net_ib/common.h (printIbWcStatusHint): add break; to each of the three cases so only the hint matching the actual completion status is printed. Diagnostic output only; no behavior change beyond the log text. Non-breaking.

Performance Impact

None.

Testing

  • Builds clean with make src.build; all_reduce_perf regression: Out of bounds values : 0 OK.
  • The fall-through is evident from the missing break;; the fix limits each completion status to its own hint.

The IBV_WC_LOC_PROT_ERR, IBV_WC_WR_FLUSH_ERR and IBV_WC_RETRY_EXC_ERR
cases fell through, so a single completion error printed the hints for
its own status plus every status below it (e.g. a protection error also
told the user to raise NCCL_IB_TIMEOUT). Add break; to each case so only
the matching hint is printed.

Signed-off-by: EylonKrause <eylon1909@gmail.com>
@EylonKrause

Copy link
Copy Markdown
Author

Disclosure: this contribution was authored with an AI coding assistant (Claude) and reviewed before submission.

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