Skip to content

libsircl_ep: resolve sirclP2pChannelExec dynamically to avoid libnccl.so.2 SONAME collision - #412

Merged
FujitsuPolycom merged 1 commit into
mainfrom
fix/libsircl-ep-soname-resolution
Nov 30, 2026
Merged

FujitsuPolycom merged 1 commit into
mainfrom
fix/libsircl-ep-soname-resolution

Conversation

@FujitsuPolycom

Copy link
Copy Markdown
Owner

Why

When libsircl_ep.so declared DT_NEEDED: libnccl.so.2, loading it inside a serving container where stock NVIDIA libnccl.so.2 was already preloaded (or loaded by import torch) resolved libnccl.so.2 to stock NVIDIA NCCL and failed with undefined symbol: sirclP2pChannelExec.

What Changed

  • Dynamic bridge resolution (spark_transport/libsircl/src/ep.c): Resolve sirclP2pChannelExec dynamically at runtime via RTLD_DEFAULT → dl_iterate_phdr (matching already-loaded libsircl.so* / libnccl.so.2 containing the symbol) → sibling libsircl.so fallback, avoiding the libnccl.so.2 SONAME collision.
  • Build & ABI checks (Makefile, CMakeLists.txt, tests/test_abi.py, tests/test_libsircl_hardening.py): Drop DT_NEEDED: libnccl.so.2 from libsircl_ep.so and add regression tests verifying libsircl_ep.so loads cleanly even when a non-libsircl libnccl.so.2 is present.

Verification

  • Verified live on 4× GB10 (sm_121) Ring 0–3 (Hosts 1, 2, 4, 6) inside the real serving container with default LD_PRELOAD (19/19 make check suites passing) and live 4-Spark cooperative EP dispatch/combine without LD_PRELOAD (64.6 µs min / 106.5–107.8 µs p50, zero deadlock under 12 concurrent aux-stream 2048×2048 GEMMs).

Risks / Follow-Ups

  • None — keeps libsircl.so ABI completely unchanged (0 sirclEp* symbols) while making libsircl_ep.so safe in arbitrary stock PyTorch/vLLM/SGLang containers.

@FujitsuPolycom
FujitsuPolycom merged commit 2dd9642 into main Nov 30, 2026
10 checks passed
@FujitsuPolycom
FujitsuPolycom deleted the fix/libsircl-ep-soname-resolution branch November 30, 2026 15:51
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