Repository navigation
macOS: pin the RPC RDMA transport off instead of auto-detecting it - #131
Conversation
ggml-rpc auto-detects RDMA. On Apple it find_library(rdma)s and, when the runner has one, defaults GGML_RPC_RDMA to ON and links /usr/lib/librdma.dylib into libggml-rpc. That library ships with the runner image, not with macOS, so b10639-mix-f6f92fe -- the first release carrying upstream b114b47 -- loaded on the builder and died everywhere else: dyld: Library not loaded: /usr/lib/librdma.dylib Referenced from: .../libggml-rpc.0.dylib llama-server failed to launch on macOS 15.7.7 The existing load gate could not catch it. It does launch the binary, but on the one host where the library exists. A redistributable must not have its configuration decided by whatever happened to be installed where it was built, so the value is pinned. OFF specifically, because RDMA-over-Thunderbolt is not something the prebuilt's consumers can use. The new gate checks both what was asked for (CMakeCache) and what was linked (otool), since those can disagree. Verified all three paths: cache ON fails, cache OFF with a clean link passes, and cache OFF with a binary that still links librdma fails.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb8c7be2d4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # ggml-rpc AUTO-DETECTS RDMA: on Apple it find_library(rdma)s and, when the | ||
| # runner has one, defaults GGML_RPC_RDMA to ON and links /usr/lib/librdma.dylib | ||
| # into libggml-rpc. That library ships with the runner image, not with macOS, | ||
| # so the bundle loaded on the builder and died everywhere else: | ||
| # |
There was a problem hiding this comment.
Condense the incident narrative in this comment
This 13-line block hard-wraps several sentences and repeats details already conveyed by -DGGML_RPC_RDMA=OFF and the assertion step, while embedding release-specific incident history that will quickly become stale. Keep only a short, durable explanation of why RDMA must remain disabled; the repository explicitly requires concise, nonredundant comments without fixed-column wrapping.
AGENTS.md reference: AGENTS.md:L74-L78
Useful? React with 👍 / 👎.
The break
Every macOS lane in
unslothai/unslothCI, and every macOS user who installed afterb10639-mix-f6f92fewent out:Cause
ggml/src/ggml-rpc/CMakeLists.txtauto-detects the transport:This workflow passes
-DGGML_RPC=ONand leaves RDMA to that detection. The runner resolvedlibrdma, so the option defaulted ON and/usr/lib/librdma.dylibwas linked intolibggml-rpc. That library comes with the runner image, not with macOS.b10639-mix-f6f92fe(2026-08-27) is the first release carrying upstreamb114b4739(2026-08-25, "rpc: support apple RDMA as an RPC transport").b10472-mix-4b653dbpredates it and is unaffected.Why the load gate missed it
assert_macho_minos.shdoes launch the binaries -llama-cli --versionforces dyld to resolve the full link graph. But it runs on the build host, which is the one machine wherelibrdmaexists. A build-host-only dependency is invisible to any check that runs on the build host.The change
-DGGML_RPC_RDMA=OFFon the cmake line. A redistributable must not have its configuration decided by whatever happened to be installed where it was built. OFF specifically, because RDMA-over-Thunderbolt is not something a downloaded prebuilt's consumers can use; RPC itself stays ON.CMakeCache.txt) and what was actually linked (otool -L), because those can disagree - a stale cache or a future transitive link would satisfy one and not the other.Only the macOS legs are touched. Linux/Windows RPC builds are unaffected.
Verification
I have no macOS host, so the dyld behaviour is argued from the CI log above rather than reproduced. What I did verify locally, by extracting the step and driving it against fixtures:
GGML_RPC_RDMA:BOOL=ONGGML_RPC_RDMA:BOOL=OFFGGML_RPC_RDMA:BOOL=OFFlibrdmaAlso
bash -nclean, and the workflow YAML parses with the new step landing between Build and the load gate.xargs -ris deliberately not used - it is a GNU extension and these are BSD userland runners.Still needed after this
This fixes the build.
b10639-mix-f6f92festill needs rebuilding and republishing - until then, installs continue to pick up the broken bundle. The same release also broke whisper.cpp pairing, which now reports it wantsb10472-mix-4b653db.Related: unslothai/unsloth#9843 makes the installer refuse a bundle like this rather than logging "prebuilt installed and validated" and failing at first launch.
Not addressed
The general class - a release artifact silently picking up a dependency that only exists on the builder - is only closed for RDMA here. An allowlist of permitted absolute install names, diffed per release, would close it properly; I did not attempt that without a macOS host to derive the baseline from.