Skip to content

GTEST: Skip rdmacm netdevs whose RDMA device is not visible - #12395

Open
tvegas1 wants to merge 2 commits into
openucx:masterfrom
tvegas1:gtest_skip_ib_dev
Open

tvegas1 wants to merge 2 commits into
openucx:masterfrom
tvegas1:gtest_skip_ib_dev

Conversation

@tvegas1

@tvegas1 tvegas1 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

What?

Skip a netdev in get_all_rdmacm_net_devices() when its RDMA device is not listed in /sys/class/infiniband.

Why?

In a container that exposes only some RDMA devices, /sys/class/net/<if>/device/infiniband still points to the hidden devices, so their interfaces were reported as rdmacm-capable. UCT rdmacm tests failed on them, and UCP sockaddr tests over IB hung until the watchdog. On Vera Rubin nodes, this cost about 23% of the gtest run time.

How?

Check that /sys/class/infiniband/<dev> exists before adding the netdev. Nothing changes when all devices are visible. On a Vera Rubin node in a container: rdmacm/* 528/528 pass, and UCP IB sockaddr tests 1085/1085 pass with no hangs.

In a container which exposes only some of the RDMA devices, the netdev
of a hidden device still points to it in sysfs. Tests which selected
such an interface for rdmacm failed or hung until the watchdog timeout.
@tvegas1
tvegas1 requested a review from a team as a code owner November 19, 2026 13:08
@svc-nvidia-pr-review

Copy link
Copy Markdown

🤖 Starting review — findings will be posted here when done.

Comment thread test/gtest/common/test_helpers.cc Resolved
@svc-nvidia-pr-review

Copy link
Copy Markdown

Coverage note: this path cannot be regression-tested in CI (it depends on a container with partially exposed RDMA devices), so the change relies on manual verification in such an environment.

@svc-ucx

svc-ucx commented Nov 20, 2026

Copy link
Copy Markdown

🤖 CI Triage Agent — UCX PR (Tests new on worker 2) · commit b426c8f9

TL;DR: The build failed on a single gtest, tcp/test_ucp_rma.put_nonblocking/2 (user_memh), with "data validation failed" after a 2-lane non-blocking PUT + worker flush — a data-integrity/flush race in the multi-lane RMA PUT path on the merge base, not something PR #12395 (gtest rdmacm netdev skipping) can cause. Re-run to confirm the flake and investigate the freshly merged multi-lane PUT fragment balancing (#12362) / the open flush fix (#12266).

Full analysis

Summary: make test in the "Tests new on worker 2" job exited non-zero because 1 of 9134 gtests failed: tcp/test_ucp_rma.put_nonblocking/2, where GetParam() = tcp,cuda_copy,rocm_copy/user_memh — test/gtest/ucp/test_ucp_memheap.cc:115: Failure ... data validation failed.

Root cause: The log shows the failure is a payload-integrity mismatch, not a timeout or crash: the test issues 100 ucp_put_nbx() operations (non-blocking, request released immediately), flushes the worker, then compares sender/receiver buffers, and the compare failed at the ~57 KB size step (host->host 100x128 100x479 100x726 100x7101 100x2022 100x57756). All other 9133 tests passed, including the other two variants of the same test (flush_worker/flush_ep), so this is a timing-dependent race in the multi-lane PUT + flush path (the fixture forces MAX_RMA_LANES=2, and TCP PUT uses put/offload/zcopy — consistent with the log skipping only get_zcopy is not supported). Either a fragment posted on one of the two RMA lanes was not covered by the completing flush, or the lane split posted/short-posted a fragment. The branch under test (gtest_skip_ib_dev, PR #12395 "GTEST: Skip rdmacm netdevs whose RDMA device is not visible") only touches gtest device enumeration and cannot corrupt RMA data, so the defect is in the merged base. The two hottest base changes in exactly this code path are 4748c2a0 (multi-lane PUT fragment balancing, merged 2 days before this run, which added lane skipping/weight re-scaling in ucp_proto_rma_split_lane) and the pending-lane flush handling in flush.c, where ucp_ep_flush_progress() breaks out of the lane loop and leaves the remaining lanes unflushed when the flush request is already pending on another lane — the subject of open PR #12266.

Implicated commit: 4748c2a0 "UCP/RMA: Balance PUT fragments by measured path bandwidth (#12362)" — dmitrygx (prime suspect; related: 48795b8b "UCP: Keep measured path bandwidth per endpoint", dmitrygx). Not the PR's own commit [REDACTED:Hex High Entropy String].

File: test/gtest/ucp/test_ucp_memheap.cc:115 (failure site); suspect code: src/ucp/proto/proto_multi.c:69-129 (ucp_proto_rma_split_lane, lane skip + weight/max_frag rescale) and src/ucp/rma/flush.c:190-197 (flush loop break when already pending on another lane)

Suggested fix: Re-run the job to confirm this is a flake unrelated to PR #12395 (it is not a legitimate failure of this PR, so don't block on it). For the real defect: (1) in ucp_proto_rma_split_lane, clamp the adjusted max_frag to at least mpriv->min_frag / the TL min_zcopy and assert that the skip-lane path (return NULL → ucp_proto_rma_skip_lane) can never be taken for all lanes of a round, so no fragment is dropped or posted below the transport minimum; temporarily validate by disabling the path-bandwidth-based split (static split) and re-running tcp/test_ucp_rma.put_nonblocking in a loop with UCX_MAX_RMA_LANES=2. (2) Land/review PR #12266 so ucp_ep_flush_progress() continues flushing the remaining lanes instead of breaking when the request is already pending on another lane.

Related: #12266 (UCP/FLUSH: Flush the other lanes after the pending lane), #12362 (UCP/RMA: Balance PUT fragments by measured path bandwidth), #12395 (PR under test)

🛡️ This comment had 1 potential secret(s) redacted (Hex High Entropy String). See request_id d90f6c29-6a54-41d1-bd32-ab05e8a2ce55 in the triage console for the audit trail.

@tvegas1

tvegas1 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

tcp/test_ucp_rma.put_nonblocking/2 ... data validation failed

unrelated to this PR, which only changes gtest netdev enumeration; this failure is fixed by #12381.

@svc-nvidia-pr-review

Copy link
Copy Markdown

🤖 Starting review — findings will be posted here when done.

continue;
}

std::string ib_port = ib_ports.front();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

minor: read_dir returns readdir order, so on a dual-port device front() may give the wrong port for this netdev. can we pick the lowest port number instead?

The resulting ib_device:port string ends up in UCX_NET_DEVICES, so a wrong port can make the device unselectable. Note: this is pre-existing behavior, not introduced here — it is only worth raising because the line is being touched. Not a blocker, and a lexicographic min_element would be subtly wrong for ports ≥ 10, so I'd leave the fix choice to you.

@svc-nvidia-pr-review

Copy link
Copy Markdown

Residual coverage gap (as already noted in the previous review): this path cannot be regression-tested in CI, since it needs a container exposing only part of the RDMA devices.

This branch has not been deployed

No deployments
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.

3 participants