Skip to content

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

@igchor

Description

@igchor

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).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions