Vscode debug matrixMul example fails with CUDA driver has hit an internal error

I’m trying to run the example debug application matrixMul from the documentation Getting Started with the CUDA Debugger :: NVIDIA Nsight VSCE Documentation

When I run the launch task as described in the document I do not hit any breakpoints and instead get the following error in the debug console.

[New Thread 0x7fffefa78000 (LWP 1221608)]
The CUDA driver has hit an internal error.
Error code: 0x1012400000001c
Further execution or debugging is unreliable.
Please ensure that your temporary directory is mounted with write and exec permissions.

The program hangs and never returns after launching the debugger in vscode.
Running the same example exectuable matrixMul runs fine when not trying to debug the kernel code in vscode.

I am running on debian 11 and have CUDA 12 and driver 525.60.13 which should be compatible from the documentation.

Im running this on a laptop with the following GPU
product: GA106M [GeForce RTX 3060 Mobile / Max-Q] [10DE:2520]

I tried the suggestion of changing the $TMPDIR to a location with write access by adding a envFile in the launch.json configuration from this issue. This did not have any affect. My launch.json is below and I added a file
vscode_var_env.env with TMPDIR=~/Documents/projects/neural_nets/cuda-samples/tmp

{
    "configurations": [
        {
            "name": "CUDA C++: Launch",
            "type": "cuda-gdb",
            "request": "launch",
            "program": "${workspaceFolder}/matrixMul",
            "envFile": "${workspaceFolder}/vscode_var_env.env",
        }
    ]
}

What else can I try to get cuda-gdb debugging working in vscode to debug kernel code?

Damn it nvidia the problem is the same as this issue.

Can you fix this already so everyone trying to use cuda-gdb and vscode doesn’t spit at your name, its been over a month already just add the damn missing library.

As suggested in the other issue just adding the environment variable CUDBG_USE_LEGACY_DEBUGGER=1 to vscode. So my launch.json file is the same as above and I added the additional file vscode_var_env.env in the directory where the example matrixMul project is located.

vscode_var_env.env

CUDBG_USE_LEGACY_DEBUGGER=1

Hi @calum047
We are aware of the problem and we are working on getting it fixed. In the meantime please use one of the workarounds provided in Can't use Cuda-gdb

  • Use CUDBG_USE_LEGACY_DEBUGGER=1 (what you are using right now)
  • Install debugger lib manually (if using official Nvidia GPU driver installer)
sudo apt install libcudadebugger1

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