Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue]: ROCm 6.3.x: segfault in ihipMallocManaged when no devices are available #3712

Open
BenWibking opened this issue Dec 27, 2024 · 1 comment

Comments

@BenWibking
Copy link

BenWibking commented Dec 27, 2024

Problem Description

Any HIP program that uses managed variables crashes immediately with a segmentation fault and shows the following backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff69448a8 in ihipMallocManaged(void**, unsigned long, unsigned int) () from /opt/rocm-6.0.0/lib/libamdhip64.so.6
#0  0x00007ffff69448a8 in ihipMallocManaged(void**, unsigned long, unsigned int) () from /opt/rocm-6.0.0/lib/libamdhip64.so.6
#1  0x00007ffff6a140ec in __hipRegisterManagedVar () from /opt/rocm-6.0.0/lib/libamdhip64.so.6
#2  0x0000000000209cc1 in __hip_module_ctor ()
#3  0x00007ffff60296fb in __libc_start_main_impl () from /lib64/libc.so.6
#4  0x0000000000209bc5 in _start ()

Operating System

Rocky Linux 9.5 (Blue Onyx)

CPU

AMD EPYC 7413 24-Core Processor

GPU

AMD Instinct MI210

ROCm Version

ROCm 6.3.0

ROCm Component

HIP

Steps to Reproduce

Complete reproducer:

#!/bin/sh

cat <<EOF >> reproducer_hip.cpp
__managed__ int managed_var;
int main()
{
  return 0;
}
EOF

hipcc -g --offload-arch=gfx90a reproducer_hip.cpp
gdb.minimal -batch -ex "run" -ex "bt" ./a.out 2>&1 | grep -v ^"No stack."$

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

ROCk module version 6.10.5 is loaded
Unable to open /dev/kfd read-write: Permission denied
bwibking is not member of "video" group, the default DRM access group. Users must be a member of the "video" group or another DRM access group in order for ROCm applications to run successfully.

Additional Information

No response

@BenWibking BenWibking changed the title [Issue]: ROCm 6.3.x: segfault in ihipMallocManaged when managed variables are used [Issue]: ROCm 6.3.x: segfault in ihipMallocManaged when no devices are available Dec 27, 2024
@ppanchad-amd
Copy link

Hi @BenWibking. Internal ticket has been created to investigate your issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants