Skip to content

[BUG] RDMA cross-host SEND immediately fails with transport_retry_exceeded and the server never posts receives #113

Closed

Description

@chloecrozier

RDMA between two DGX Sparks back-to-back dies on the first SEND with IBV_WC_RETRY_EXC_ERR. The RDMA-CM handshake finishes fine (both sides hit RDMA_CM_EVENT_ESTABLISHED), but right after the server creates its listener it logs [CRITICAL] Couldn't find server params for address 169.254.95.47 — so whatever posts the receive WRs after establish never runs, and the client's first SEND has nothing to land in.

Single-host RDMA works on the same build, and ib_send_bw over the same cable runs at ~212 Gb/s, so I don't think it's the wire.

Looks like an address-key mismatch between where server_params gets inserted (listener-create path around daqiri_rdma_mgr.cpp:1056) and where it gets looked up (:692) — probably string-vs-binary or INADDR_ANY-vs-explicit.

Steps/Code to reproduce bug

Two Sparks back-to-back on ConnectX-7 p0, server on 169.254.95.47, client on 169.254.100.253. Build per docs/tutorials/bare-metal-cmake-build.md. Start the server first:

# server (spark-201a)
sudo build/.../daqiri_bench_rdma examples/daqiri_bench_rdma_server_spark_xhost.yaml --mode server --seconds 30

# client (spark-960b)
sudo build/.../daqiri_bench_rdma examples/daqiri_bench_rdma_client_spark_xhost.yaml --mode client --seconds 30

Client tail:

[ERROR] daqiri_rdma_mgr.cpp:489: CQ error on client: transport retry counter exceeded (12) for WRID 4660 ...
Client received messages: 0

Server tail (one line after the listener gets created at :1056):

[CRITICAL] daqiri_rdma_mgr.cpp:692: Couldn't find server params for address 169.254.95.47
[CRITICAL] daqiri_rdma_mgr.cpp:718: Couldn't find an available queue ID for server 169.254.95.47:4096 ...

Full logs attached: logs/spark_rdma_tx.log, logs/spark_rdma_rx.log.

Expected behavior

Server posts receives at RDMA_CM_EVENT_ESTABLISHED, client SENDs land, both sides report non-zero throughput, no RETRY_EXC_ERR. Single-host daqiri_bench_rdma_tx_rx_spark.yaml keeps working.

Environment overview

  • Environment location: Bare-metal
  • Method of DAQIRI install: source, branch docs/bare-metal-cmake-build, configured with -DDAQIRI_MGR="dpdk socket rdma"

Environment details

  • OS: IGX OS / Ubuntu 24.04 ARM (aarch64), kernel 6.14
  • Hardware: 2x DGX Spark (GB10), ConnectX-7 fw 28.45.4028, back-to-back on enp1s0f0np0
  • CUDA 13.0, driver 580.95.05, DPDK 25.11 patched with dmabuf.patch + dpdk.nvidia.patch, libibverbs-dev/librdmacm-dev 2510.0.11-1
  • nvidia-peermem not loaded (dma-buf path); YAMLs use kind: host_pinned

Additional context

Raw GPUDirect cross-host works on the same hosts/YAMLs, so this is RDMA-specific. There's also a server-side segfault that shows up on stderr but didn't make it into my log capture — it seems like it's downstream of the missing receive-provisioning state, not a separate bug, but worth confirming once the lookup is fixed.

Activity

  1. added
    bug
    on Jun 2, 2026
  2. self-assigned this
    on Jun 2, 2026
  3. added a commit that references this issue on Jun 2, 2026
  4. theherrovn commented on Jun 3, 2026

    @theherrovn

    Not directly assigned but I've been investigating this since I have access to DGX Spark hardware (GB10 + ConnectX-7).

    Root Cause Analysis

    After reviewing daqiri_rdma_mgr.cpp, the most likely root cause is a race between the CM event loop and listener map population.

    Evidence

    1. server_q_params_[s_id] is populated at L1117-1122, BEFORE rdma_bind_addr + rdma_listen complete (L1129-1139)
    2. server_str_to_id_ is populated at L1141, AFTER the listener is fully active
    3. The CM event loop starts at L1146, immediately after L1144

    On single-host (ib_send_bw / local loopback), the CM event loop processes ESTABLISHED events synchronously within the same thread after rdma_get_cm_event() returns. Both maps are fully populated by then.

    On cross-host with ConnectX-7 however:

    • rdma_listen() immediately makes the listener visible on the wire
    • The remote client's RDMA CM handshake can complete and fire RDMA_CM_EVENT_ESTABLISHED
    • If the server's CM thread picks up this event before the rdma_bind_addr/rdma_listen call chain returns and L1141 executes, the event handler calls rdma_get_server_conn_id() which finds server_str_to_id_ empty or stale

    But the log shows the opposite — server_str_to_id_ lookup SUCCEEDS while server_q_params_ fails. This suggests a more subtle issue:

    Pointer validity window

    rdma_create_id() returns a struct rdma_cm_id*. If rdma_destroy_id() is called (e.g., in an error path, cleanup, or race) between L1117 and L1141, the pointer becomes dangling. A subsequent rdma_create_id() could reuse the same address for a different ID, overwriting the old entry via operator[].

    The fix should ensure:

    1. Both maps are populated atomically before rdma_listen() makes the listener visible
    2. Or server_str_to_id_ is populated immediately after rdma_create_id() (before bind/listen)
    3. Or add a mutex/flag that blocks CM event processing until listener setup is complete

    Minimal Fix (untested, based on code review)

    Move server_str_to_id_ insertion to immediately after server_q_params_ insertion, before bind/listen:

      auto& vec = server_q_params_[s_id];
      vec.resize(intf.rx_.queues_.size());
    + server_str_to_id_[intf.address_ + ":" + std::to_string(intf.rdma_.port_)] = s_id;
      
      ret = rdma_bind_addr(s_id, ...);
      ...
    - server_str_to_id_[intf.address_ + ":" + std::to_string(intf.rdma_.port_)] = s_id;

    This ensures the string→pointer mapping exists before the listener is visible on the network.

    Would be great to hear from @chloecrozier if this matches their investigation.

  5. added 2 commits that reference this issue on Jun 4, 2026
  6. added a commit that references this issue on Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions