Open
Description
Problem Description
clinfo and clpeak crash when mesa-libOpenCL
and rocm-opencl
are both installed. Removing one of them fixes the issue. I decided to file an issue towards rocm because segfault seem to occur in rocm code.
Thread 1 "clinfo" received signal SIGSEGV, Segmentation fault.
0x00007ffff7e1343b in __memset_sse2_unaligned_erms () from /lib64/libc.so.6
Missing rpms, try: dnf --enablerepo='*debug*' install ocl-icd-debuginfo-2.3.2-7.fc41.x86_64 glibc-debuginfo-2.40-23.fc41.x86_64 rocm-opencl-debuginfo-6.2.1-5.fc41.x86_64 rocm-comgr-debuginfo-18-10.rocm6.2.1.fc41.x86_64 rocm-runtime-debuginfo-6.2.1-2.fc41.x86_64 numactl-libs-debuginfo-2.0.19-1.fc41.x86_64 libstdc++-debuginfo-14.2.1-7.fc41.x86_64 libgcc-debuginfo-14.2.1-7.fc41.x86_64 lld18-libs-debuginfo-18.1.8-6.fc41.x86_64 clang18-libs-debuginfo-18.1.8-5.fc41.x86_64 llvm18-libs-debuginfo-18.1.8-4.fc41.x86_64 elfutils-libelf-debuginfo-0.192-9.fc41.x86_64 hsakmt-debuginfo-1.0.6-46.rocm6.2.1.fc41.x86_64 libdrm-debuginfo-2.4.124-1.fc41.x86_64 zlib-ng-compat-debuginfo-2.2.3-2.fc41.x86_64 libffi-debuginfo-3.4.6-3.fc41.x86_64 libedit-debuginfo-3.1-54.20250104cvs.fc41.x86_64 ncurses-libs-debuginfo-6.5-2.20240629.fc41.x86_64 libzstd-debuginfo-1.5.7-1.fc41.x86_64 mesa-libOpenCL-debuginfo-25.0.3-2.fc41.x86_64 clang-libs-debuginfo-19.1.7-3.fc41.x86_64 expat-debuginfo-2.7.1-1.fc41.x86_64 llvm-libs-debuginfo-19.1.7-3.fc41.x86_64 libxml2-debuginfo-2.12.10-1.fc41.x86_64 xz-libs-debuginfo-5.6.2-2.fc41.x86_64 mesa-dri-drivers-debuginfo-25.0.3-2.fc41.x86_64 spirv-tools-libs-debuginfo-2025.1-1.fc41.x86_64 spirv-llvm-translator-debuginfo-19.1.5-1.fc41.x86_64
(gdb) bt
#0 0x00007ffff7e1343b in __memset_sse2_unaligned_erms () from /lib64/libc.so.6
#1 0x00007ffff6e2cfe0 in rocr::AMD::GpuAgent::AssembleShader(char const*, rocr::AMD::GpuAgent::AssembleTarget, void*&, unsigned long&) const () from /lib64/libhsa-runtime64.so.1
#2 0x00007ffff6e2f0ab in rocr::AMD::GpuAgent::PostToolsInit() () from /lib64/libhsa-runtime64.so.1
#3 0x00007ffff6e4650d in rocr::HSA::hsa_init() () from /lib64/libhsa-runtime64.so.1
#4 0x00007ffff7cbe634 in ?? () from /lib64/libamdocl64.so.6.2
#5 0x00007ffff7d20aa3 in ?? () from /lib64/libamdocl64.so.6.2
#6 0x00007ffff7c8b1bd in ?? () from /lib64/libamdocl64.so.6.2
#7 0x00007ffff7dfbf3b in __pthread_once_slow.isra.0 () from /lib64/libc.so.6
#8 0x00007ffff7dfbfa9 in pthread_once@GLIBC_2.2.5 () from /lib64/libc.so.6
#9 0x00007ffff7c8b02a in clIcdGetPlatformIDsKHR () from /lib64/libamdocl64.so.6.2
#10 0x00007ffff7f86445 in _initClIcd_real.lto_priv.0 () from /lib64/libOpenCL.so.1
#11 0x00007ffff7f8866c in clGetPlatformIDs () from /lib64/libOpenCL.so.1
#12 0x000055555555680e in main ()
Operating System
Fedora 41
CPU
Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz
GPU
AMD Radeon RX 570 Series
ROCm Version
6.2.1-5.fc41
ROCm Component
No response
Steps to Reproduce
On Fedora 41 install mesa-libOpenCL
and rocm-opencl
then try to execute clpeak or clinfo
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
rocminfo --support
ROCk module is loaded
=====================
HSA System Attributes
=====================
Runtime Version: 1.1
Runtime Ext Version: 1.6
System Timestamp Freq.: 1000.000000MHz
Sig. Max Wait Duration: 18446744073709551615 (0xFFFFFFFFFFFFFFFF) (timestamp count)
Machine Model: LARGE
System Endianness: LITTLE
Mwaitx: DISABLED
DMAbuf Support: YES
==========
HSA Agents
==========
*******
Agent 1
*******
Name: Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz
Uuid: CPU-XX
Marketing Name: Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz
Vendor Name: CPU
Feature: None specified
Profile: FULL_PROFILE
Float Round Mode: NEAR
Max Queue Number: 0(0x0)
Queue Min Size: 0(0x0)
Queue Max Size: 0(0x0)
Queue Type: MULTI
Node: 0
Device Type: CPU
Cache Info:
L1: 32768(0x8000) KB
Chip ID: 0(0x0)
ASIC Revision: 0(0x0)
Cacheline Size: 64(0x40)
Max Clock Freq. (MHz): 3900
BDFID: 0
Internal Node ID: 0
Compute Unit: 12
SIMDs per CU: 0
Shader Engines: 0
Shader Arrs. per Eng.: 0
WatchPts on Addr. Ranges:1
Memory Properties:
Features: None
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: FINE GRAINED
Size: 16289124(0xf88d64) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 2
Segment: GLOBAL; FLAGS: KERNARG, FINE GRAINED
Size: 16289124(0xf88d64) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 3
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 16289124(0xf88d64) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
ISA Info:
*******
Agent 2
*******
Name: gfx803
Uuid: GPU-XX
Marketing Name: AMD Radeon RX 570 Series
Vendor Name: AMD
Feature: KERNEL_DISPATCH
Profile: BASE_PROFILE
Float Round Mode: NEAR
Max Queue Number: 128(0x80)
Queue Min Size: 64(0x40)
Queue Max Size: 131072(0x20000)
Queue Type: MULTI
Node: 1
Device Type: GPU
Cache Info:
L1: 16(0x10) KB
Chip ID: 26591(0x67df)
ASIC Revision: 1(0x1)
Cacheline Size: 64(0x40)
Max Clock Freq. (MHz): 1268
BDFID: 1024
Internal Node ID: 1
Compute Unit: 32
SIMDs per CU: 4
Shader Engines: 4
Shader Arrs. per Eng.: 1
WatchPts on Addr. Ranges:4
Coherent Host Access: FALSE
Memory Properties:
Features: KERNEL_DISPATCH
Fast F16 Operation: TRUE
Wavefront Size: 64(0x40)
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Max Waves Per CU: 40(0x28)
Max Work-item Per CU: 2560(0xa00)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 4294967295(0xffffffff)
y 4294967295(0xffffffff)
z 4294967295(0xffffffff)
Max fbarriers/Workgrp: 32
Packet Processor uCode:: 730
SDMA engine uCode:: 58
IOMMU Support:: None
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 8388608(0x800000) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:2048KB
Alloc Alignment: 4KB
Accessible by all: FALSE
Pool 2
Segment: GLOBAL; FLAGS: EXTENDED FINE GRAINED
Size: 8388608(0x800000) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:2048KB
Alloc Alignment: 4KB
Accessible by all: FALSE
Pool 3
Segment: GROUP
Size: 64(0x40) KB
Allocatable: FALSE
Alloc Granule: 0KB
Alloc Recommended Granule:0KB
Alloc Alignment: 0KB
Accessible by all: FALSE
ISA Info:
ISA 1
Name: amdgcn-amd-amdhsa--gfx803
Machine Models: HSA_MACHINE_MODEL_LARGE
Profiles: HSA_PROFILE_BASE
Default Rounding Mode: NEAR
Default Rounding Mode: NEAR
Fast f16: TRUE
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 4294967295(0xffffffff)
y 4294967295(0xffffffff)
z 4294967295(0xffffffff)
FBarrier Max Size: 32
*** Done ***
Additional Information
No response