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
clinfo segfaults with AMD ROCm OpenCL stuff installed #97311
I see that you are running release 20.03. So, I should ask in addition if you are mixing packages from different nixpkgs revisions. Because e.g. using clinfo from NixOS 20.03 with ROCm from unstable will not work. The OpenCL ICD mechanism relies on dlopen()ing libraries and this does not work well when there is a mixture of e.g. glibc versions.
Thanks! This is where it blows up, the ICD loader mechanism is built against a different version of glibc than the OpenCL runtime.
When the ICD library is loaded, it dynamically links against glibc 2.30. The ICD loader then dlopens the ROCm OpenCL runtime which results in loading libpthread from glibc 2.31. However, libpthread is tightly coupled to glibc and uses private symbols, so it fails with the older glibc.
This is something that is never going to work well in general, because the ROCm OpenCL runtime (or one of its dependencies) may also depend on symbols that are not available in older glibc versions.
To make things work correctly, the vendor-specific OpenCL runtime and the ICD loader should always be from the same nixpkgs revision.
This issue is has also recently been added to the NixOS manual:
Activity
danieldk commentedon Sep 7, 2020
Thanks for your bug report!
Odd, works here on a Radeon VII:
Could you give the output of?
Also, it would be useful to get a backtrace of the segmentation fault:
danieldk commentedon Sep 7, 2020
I see that you are running release 20.03. So, I should ask in addition if you are mixing packages from different nixpkgs revisions. Because e.g. using
clinfofrom NixOS 20.03 with ROCm from unstable will not work. The OpenCL ICD mechanism relies ondlopen()ing libraries and this does not work well when there is a mixture of e.g. glibc versions.danieldk commentedon Sep 7, 2020
Thanks! This is where it blows up, the ICD loader mechanism is built against a different version of glibc than the OpenCL runtime.
When the ICD library is loaded, it dynamically links against glibc 2.30. The ICD loader then
dlopens the ROCm OpenCL runtime which results in loading libpthread from glibc 2.31. However, libpthread is tightly coupled to glibc and uses private symbols, so it fails with the older glibc.This is something that is never going to work well in general, because the ROCm OpenCL runtime (or one of its dependencies) may also depend on symbols that are not available in older glibc versions.
To make things work correctly, the vendor-specific OpenCL runtime and the ICD loader should always be from the same
nixpkgsrevision.This issue is has also recently been added to the NixOS manual:
https://hydra.nixos.org/build/126561910/download/2/nixos/index.html#sec-gpu-accel-common-issues