Open ldorau opened 8 months ago
I wonder if this can be fixed if the lib proxy always links a static version of umf?
I think this just masks some other problem with proxy library. With dynamic libumf.so, we should only have single tracker and base_alloc instance so it should work fine.
It looks like jemalloc might be partially responsible for the failure. I just replaced jemalloc in proxy_lib with proxy_pool (slightly modified to support realloc and calloc) and I don't see segfaults anymore. See this branch: https://github.com/igchor/unified-memory-framework/tree/Add_proxy_library_checks
Yes, The proxy library with scalable pool works well. Those issues occur only with jemalloc pool, so there can be an issue with jemalloc pool.
The proxy library with jemalloc pool can work incorrectly if the app it is loaded for links dynamically with
libumf.so
, because both the proxy library and the app use one and the same TRACKER and one and the same global base allocator:Ref: #226 See: https://github.com/oneapi-src/unified-memory-framework/pull/226#issuecomment-1946312900
Without the proxy library (with debug logs):
With the proxy library (with debug logs):