Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

L0 provider cannot find L0 symbols when dlopen is used. #926

Open
igchor opened this issue Nov 22, 2024 · 0 comments
Open

L0 provider cannot find L0 symbols when dlopen is used. #926

igchor opened this issue Nov 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@igchor
Copy link
Member

igchor commented Nov 22, 2024

Problematic scenario:
L0 UR adapter uses L0 provider from UMF. L0 UR adapter is being dlopened by the loader (which application links to). When application itself also links with UMF and uses umfPoolGetMemoryProvider (or perahps any UMF symbol?) then L0 provider cannot find symbols.

How to reproduce:

git clone https://github.com/igchor/umf_repro
cd umf_repro
mkdir build
cd build
# uncomment include_directories and link_directories from CMakeLists.txt and change them to point to a proper directory
cmake ..
make
LD_DEBUG=files LD_LIBRARY_PATH=. ./test

Output:

...

   1159394:     /home/igchor/unified-memory-framework/build/lib/libumf.so.0: error: symbol lookup error: undefined symbol: zeMemAllocHost (fatal)
   1159394:     /home/igchor/unified-memory-framework/build/lib/libumf.so.0: error: symbol lookup error: undefined symbol: zeMemAllocDevice (fatal)
   1159394:     /home/igchor/unified-memory-framework/build/lib/libumf.so.0: error: symbol lookup error: undefined symbol: zeMemAllocShared (fatal)
   1159394:     /home/igchor/unified-memory-framework/build/lib/libumf.so.0: error: symbol lookup error: undefined symbol: zeMemFree (fatal)
   1159394:     /home/igchor/unified-memory-framework/build/lib/libumf.so.0: error: symbol lookup error: undefined symbol: zeMemGetIpcHandle (fatal)
   1159394:     /home/igchor/unified-memory-framework/build/lib/libumf.so.0: error: symbol lookup error: undefined symbol: zeMemPutIpcHandle (fatal)
   1159394:     /home/igchor/unified-memory-framework/build/lib/libumf.so.0: error: symbol lookup error: undefined symbol: zeMemOpenIpcHandle (fatal)
   1159394:     /home/igchor/unified-memory-framework/build/lib/libumf.so.0: error: symbol lookup error: undefined symbol: zeMemCloseIpcHandle (fatal)
   1159394:     /home/igchor/unified-memory-framework/build/lib/libumf.so.0: error: symbol lookup error: undefined symbol: zeContextMakeMemoryResident (fatal)
   1159394:     /home/igchor/unified-memory-framework/build/lib/libumf.so.0: error: symbol lookup error: undefined symbol: zeDeviceGetProperties (fatal)
ERROR: umfMemoryProviderCreate
Segmentation fault (core dumped)

If I remove the call to umfPoolByPtr from main.c then the binary works (allocates memory).

@igchor igchor added the bug Something isn't working label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant