Why my gdb shows ?() when i use CUDA COREDUMP?

Normally, if I not set CUDA_ENABLE_COREDUMP_ON_EXCEPTION and my program crashed. I can use gdb my_program coredump_file to see the stack perfectly(using gdb 8.3). But when i set CUDA_ENABLE_COREDUMP_ON_EXCEPTION=1, then my program crashed and no matter when i use cuda-gdb my_program coredump_file or gdb my_program coredump_file . It all shows #2 0x00007f5875dfde21 in ?? () from /usr/lib64/libcuda.so.1 .My cuda-gdb version is 12.2 and the internal gdb is 12.1. Is it because my gdb version different ?

Hi @qq934603493,

Thank you for reporting the issue! To help us better identify the problem could you provide a few more details:

  • How was the application compiled? For GPU coredumps both -g and -G are recommended. More details: 1. Introduction — CUDA-GDB 13.0 documentation
  • Can you see other threads when examining the coredump generated with CUDA_ENABLE_COREDUMP_ON_EXCEPTION?

Also, you need to use a different command to load the GPU coredump:

Inspecting GPU and GPU+CPU core dumps in cuda-gdb

Use the following command to load the GPU core dump into the debugger

(cuda-gdb) target cudacore core.cuda.localhost.1234

This will open the core dump file and print the exception encountered during program execution. Then, issue standard cuda-gdb commands to further investigate application state on the device at the moment it was aborted.

Use the following command to load CPU and GPU core dumps into the debugger

(cuda-gdb) target core core.cpu core.cuda

This will open the core dump file and print the exception encountered during program execution. Then, issue standard cuda-gdb commands to further investigate application state on the host and the device at the moment it was aborted.

More details: 1. Introduction — CUDA-GDB 13.0 documentation
(check the “Inspecting GPU and GPU+CPU core dumps in cuda-gdb” section.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.