Repository navigation
[Cherry-pick release/2.15] [xccl] WA: resolve libccl.so.1 next to the already loaded libccl.so.2 - #5676
Merged
Conversation
…#5670) #5648 preloaded libccl.so.1 by soname, assuming libtorch_xpu.so's RPATH would locate it the same way it locates libccl.so.2. It does not, so the workaround never took effect and PYTORCHDGQ-10126 still reproduces. LD_DEBUG on a PyPI/venv install shows only three RPATHs ever being used -- numpy's extension module, torch/_C.cpython-*.so and libtorch_global_deps.so -- all objects that were dlopen'd directly. libtorch_xpu.so is pulled in as an indirect dependency, so glibc resolves our dlopen() against those, never against ours. libccl.so.2 is found only because it is a DT_NEEDED of libtorch_global_deps.so: find library=libccl.so.2 ... (RPATH from file .../libtorch_global_deps.so) find library=libccl.so.1 ... search cache=/etc/ld.so.cache ... (system search path) Ask the loader for the resolved path of libccl.so.2 and open libccl.so.1 from the same directory instead, which does not depend on any search path. (cherry picked from commit d44bbbc)
This was referenced Oct 12, 2026
chuanqi129
approved these changes
Oct 13, 2026
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.
#5648 preloaded libccl.so.1 by soname, assuming libtorch_xpu.so's RPATH would locate it the same way it locates libccl.so.2. It does not, so the workaround never took effect and PYTORCHDGQ-10126 still reproduces.
LD_DEBUG on a PyPI/venv install shows only three RPATHs ever being used -- numpy's extension module, torch/_C.cpython-*.so and libtorch_global_deps.so -- all objects that were dlopen'd directly. libtorch_xpu.so is pulled in as an indirect dependency, so glibc resolves our dlopen() against those, never against ours. libccl.so.2 is found only because it is a DT_NEEDED of libtorch_global_deps.so:
find library=libccl.so.2 ... (RPATH from file .../libtorch_global_deps.so)
find library=libccl.so.1 ... search cache=/etc/ld.so.cache
... (system search path)
Ask the loader for the resolved path of libccl.so.2 and open libccl.so.1 from the same directory instead, which does not depend on any search path.
Cherry-pick of #5670 to
release/2.15.Cherry-picked from commit d44bbbc.