Repository navigation
libsircl_ep: resolve sirclP2pChannelExec dynamically to avoid libnccl.so.2 SONAME collision - #412
Merged
Merged
Conversation
….so.2 SONAME collision
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
When
libsircl_ep.sodeclaredDT_NEEDED: libnccl.so.2, loading it inside a serving container where stock NVIDIAlibnccl.so.2was already preloaded (or loaded byimport torch) resolvedlibnccl.so.2to stock NVIDIA NCCL and failed withundefined symbol: sirclP2pChannelExec.What Changed
spark_transport/libsircl/src/ep.c): ResolvesirclP2pChannelExecdynamically at runtime viaRTLD_DEFAULT→dl_iterate_phdr(matching already-loadedlibsircl.so*/libnccl.so.2containing the symbol) → siblinglibsircl.sofallback, avoiding thelibnccl.so.2SONAME collision.Makefile,CMakeLists.txt,tests/test_abi.py,tests/test_libsircl_hardening.py): DropDT_NEEDED: libnccl.so.2fromlibsircl_ep.soand add regression tests verifyinglibsircl_ep.soloads cleanly even when a non-libsircllibnccl.so.2is present.Verification
sm_121) Ring 0–3 (Hosts 1, 2, 4, 6) inside the real serving container with defaultLD_PRELOAD(19/19make checksuites passing) and live 4-Spark cooperative EP dispatch/combine withoutLD_PRELOAD(64.6 µsmin /106.5–107.8 µsp50, zero deadlock under 12 concurrent aux-stream2048×2048GEMMs).Risks / Follow-Ups
libsircl.soABI completely unchanged (0sirclEp*symbols) while makinglibsircl_ep.sosafe in arbitrary stock PyTorch/vLLM/SGLang containers.