You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Issue] Linux ASAN CI: storage-libs / hipfile build fails — "undefined symbols pthread_getspecific/pthread_key_create/pthread_setspecific/pthread_key_delete (missing Threads::Threads linkage in hipfile test CMakeLists)" #5898
The storage-libs / hipfile stage fails during the link phase for all three test executables (hipfile_tests, hipfile_system_tests, test/amd_detail/internal_tests) with undefined symbol errors from libgtest.a / libgmock.a:
The hipfile test CMakeLists files in rocm-systems (pinned at 7ced1a6) do not link Threads::Threads (i.e., -lpthread) for the test executables:
projects/hipfile/test/CMakeLists.txt — hipfile_tests and hipfile_system_tests link only against GTest::gtest (and GTest::gtest_main), with no Threads::Threads
projects/hipfile/test/amd_detail/CMakeLists.txt — calls find_package(Threads REQUIRED) but does not add target_link_libraries(internal_tests PRIVATE Threads::Threads)
ld.lld (LLVM's linker, used in the ASAN toolchain) is strict about undefined symbols in static archives. GTest's ThreadLocal<T> implementation uses POSIX thread-key APIs (pthread_key_create, etc.) from gtest-port.h:1774–1819, which require explicit -lpthread linkage under lld. GNU ld resolves these transitively from glibc, masking the bug in non-ASAN builds.
Given that ASan builds are not running by default on PRs I'm comfortable attempting a fix-forward before we jump straight to a revert in this case. Note that since any fixes would probably be in rocm-systems, we could carry a patch (https://github.com/ROCm/TheRock/tree/main/patches) here while we wait for a rocm-systems submodule update
To test changes on CI...
Here in TheRock it looks like ASan builds run on PRs if the PR modifies submodules, with no label to force it enabled:
changed the title [-][Issue] Linux ASAN CI: storage-libs / hipfile build fails — `undefined symbols pthread_getspecific/pthread_key_create/pthread_setspecific/pthread_key_delete (missing Threads::Threads linkage in hipfile test CMakeLists)`[/-][+][Issue] Linux ASAN CI: storage-libs / hipfile build fails — "undefined symbols pthread_getspecific/pthread_key_create/pthread_setspecific/pthread_key_delete (missing Threads::Threads linkage in hipfile test CMakeLists)"[/+]on Jun 17, 2026
[hipfile install] /__w/TheRock/TheRock/build/storage-libs/hipfile/build/test/hipfile_tests: error while loading shared libraries: librocm_sysdeps_mount.so.1: cannot open shared object file: No such file or directory
FYI - In the case of the hipfile_tests mount dependency issue, @derobins has reverted the change that caused this new 2nd issue: ROCm/rocm-systems#7484 Unblocks theRock CI. Will need to do a proper fix.
Activity
amd-chiranjeevi commentedon Jun 17, 2026
@derobins
created revert: #5899
derobins commentedon Jun 17, 2026
Can we just fix this instead of reverting? Reverting seems a bit harsh.
ScottTodd commentedon Jun 17, 2026
Given that ASan builds are not running by default on PRs I'm comfortable attempting a fix-forward before we jump straight to a revert in this case. Note that since any fixes would probably be in rocm-systems, we could carry a patch (https://github.com/ROCm/TheRock/tree/main/patches) here while we wait for a rocm-systems submodule update
To test changes on CI...
Here in TheRock it looks like ASan builds run on PRs if the PR modifies submodules, with no label to force it enabled:
TheRock/build_tools/github_actions/configure_multi_arch_ci.py
Lines 507 to 521 in 50082e1
https://github.com/ROCm/TheRock/blob/main/.github/workflows/multi_arch_ci_asan.yml can be triggered directly with workflow_dispatch from a branch though.
Over in rocm-systems, there is a "multi arch CI asan" workflow drafted at ROCm/rocm-systems#6610
ScottTodd commentedon Jun 17, 2026
Another option would be:
[hipfile] Link Threads::Threads to GTest targets to fix lld build (#7387
[-][Issue] Linux ASAN CI: storage-libs / hipfile build fails — `undefined symbols pthread_getspecific/pthread_key_create/pthread_setspecific/pthread_key_delete (missing Threads::Threads linkage in hipfile test CMakeLists)`[/-][+][Issue] Linux ASAN CI: storage-libs / hipfile build fails — "undefined symbols pthread_getspecific/pthread_key_create/pthread_setspecific/pthread_key_delete (missing Threads::Threads linkage in hipfile test CMakeLists)"[/+]gaoikawa commentedon Jun 17, 2026
Merged PR ROCm/rocm-systems#7387, presumably we will need a successful rocm-systems bump PR for TheRock to pickup the change.
amd-chiranjeevi commentedon Jun 18, 2026
@derobins @gaoikawa
Still noticing these failures in rocm-systems bump(#5946) which is carrying the fix rocm-system#7387
commit diff: ROCm/rocm-systems@7ced1a6...c59673f
log: https://github.com/ROCm/TheRock/actions/runs/27729666076/job/82053632711?pr=5946
gaoikawa commentedon Jun 18, 2026
@amd-chiranjeevi - Acknowledging - will look into it - thanks.
rahulc-gh commentedon Jun 18, 2026
Just confirming latest bump still showing failure - https://github.com/ROCm/TheRock/actions/runs/27792443951/job/82247396030?pr=5969#step:14:97
gaoikawa commentedon Jun 19, 2026
We are getting a different error now though.
[hipfile install] /__w/TheRock/TheRock/build/storage-libs/hipfile/build/test/hipfile_tests: error while loading shared libraries: librocm_sysdeps_mount.so.1: cannot open shared object file: No such file or directoryUpdate - was caused by ROCm/rocm-systems#7431
gaoikawa commentedon Jun 19, 2026
FYI - In the case of the hipfile_tests mount dependency issue, @derobins has reverted the change that caused this new 2nd issue: ROCm/rocm-systems#7484 Unblocks theRock CI. Will need to do a proper fix.
[hipfile] Force -pthread when building hipFile tests (#7519)
gaoikawa commentedon Jun 19, 2026
We think that ROCm/rocm-systems#7519 fixes this. Waiting for bumpPR + asan CI signal to confirm. Thanks.
Re-open this if it's still not fixed.
derobins commentedon Jun 20, 2026
FWIW, TheRock still hasn't done a submodule bump that would bring our changes in, so we can't tell if it's fixed.
derobins commentedon Jun 20, 2026
It looks like everything is fine now, given the results of this rocm-systems bump PR's CI:
https://github.com/ROCm/TheRock/actions/runs/27855298319/job/82463564195