Cuda-gdb crashing in OptiX application

Hi all

I have a problem using the cuda-gdb debugger for an OptiX code running on a RTX3090.
The code execution stops at the breakpoints as expected, but i don’t see any values of the variables in the __device__ kernels.


This is some output from the Debug Console, maybe it’s useful:
random_sample=<error reading variable: Unable to access DWARF register number 21041>

I can also continue the execution and the code stops at the next breakpoint. But if i only step to the next line, i get an error and the code crashes:

cuda-gdb has received a SIGSEGV and will attempt to get its own backtrace.

...bin/cuda-gdb| ?????
...nu/libc.so.6| ?????

This is the launch.json:

        {
            "name": "OptiX: Build/Launch",
            "type": "cuda-gdb",
            "request": "launch",
            "program": "${workspaceFolder}/build/bin/optixPlanetaryRaytracer",
            "preLaunchTask": "Build",
        }

The binaries i compile run both in Debug and Release builds without issues.

Any idea how i can debug this?

I run Driver Version: 560.35.03 CUDA Version: 12.6 on Ubuntu 22.04.05 LTS.

Thanks in advance
Rafael

Hi, @rafael.ottersberg

Sorry for the issue you met. Is it possible for you providing your mini-repro source code?

Hi @veraj

Since it happens in an OptiX application it is a little bit harder to provide a mini-repro code because the OptiX headers are needed. However, the problem occurs in the OptiX Examples that are shipped with the OptiX SDK by NVIDIA. For example, the optixTriangle example when built in Debug mode.

In this example, I set a breakpoint in the __raygen_rg() program in the optixTriangle.cu file.
I cannot inspect any variables.

Does this help?

Best,
Rafael

Hi, @rafael.ottersberg

Thanks for reporting this. We have identified it is the same issue as an internal bug we tracked.
And this requires support from compiler.
Our dev will work on it. Anything update, I will let you know.

Hi, @veraj

Thanks for the update. I look forward to hear from you!

Best,
Rafael

Hi @rafael.ottersberg can you confirm which version of cuda-gdb is found within your path?

Hi @agontarek

it is:

NVIDIA (R) cuda-gdb 12.6
Portions Copyright (C) 2007-2024 NVIDIA Corporation
Based on GNU gdb 13.2