[Jetson Orin AGX | CUDA 12.6] cuda-gdb causes SIGSEGV in libcudadebugger.so.1 when entering kernel

Hello,

I’m encountering a segmentation fault when debugging even the simplest CUDA program using cuda-gdb on Jetson Orin AGX.
The program crashes immediately when entering the kernel function.


Reproducible code

#include <cuda_runtime.h>
#include <iostream>

__global__ void hello() {
    printf("Hello CUDA World !!\n");
}

int main() {
    hello<<<2, 4>>>();
    cudaDeviceSynchronize();
    return 0;
}

Behavior

When launching the program under cuda-gdb, execution stops inside
/usr/local/cuda/include/cuda_runtime.h at this line:

return ::cudaLaunchKernel((const void *)func, gridDim, blockDim, args, sharedMem, stream);

and then immediately receives a segmentation fault:

Thread 1 "00_hello_world" received signal SIGSEGV, Segmentation fault.
0x0000fffff46c168c in ?? () from /lib/aarch64-linux-gnu/libcudadebugger.so.1

This happens even without any breakpoints.
CPU-side code runs fine, but as soon as the kernel is launched, cuda-gdb crashes.


Environment

Hardware: Jetson Orin AGX 64GB Developer Kit
JetPack: 6.1.2 (L4T 36.4.7)
CUDA Toolkit: 12.6 (build V12.6.68)
cuda-gdb version:

NVIDIA (R) cuda-gdb 12.6
Based on GNU gdb 13.2
Configured as "aarch64-elf-linux-gnu"

nvcc build command:

nvcc -G -g -O0 hello_world.cu -o hello_world

launch.json (VS Code / Nsight VS Code Edition):

{
  "type": "cuda-gdb",
  "request": "launch",
  "program": "${fileDirname}/${fileBasenameNoExtension}",
  "cwd": "${fileDirname}",
  "args": [],
  "stopAtEntry": false
}

What I’ve confirmed

  • The same code and setup work correctly on x86_64 Ubuntu with CUDA 12.6 (no crash).

  • The crash only occurs on Jetson Orin (aarch64).

  • Happens regardless of breakpoints — just running under cuda-gdb triggers it.


Question

Is this a known issue with cuda-gdb or libcudadebugger.so.1 on JetPack 6.1.2 / CUDA 12.6 (aarch64)?
Are there any workarounds or specific flags required for debugging kernels on Jetson?

Thanks in advance for your help.

Hi @yuki.akimoto.sub
Thank you for reporting the issue! Could you please collect and share additional information to help us identify the issue?

  • Output of the groups command on target.
  • Do you see the same issue when running the debugging session as root?
  • Please try running the debugging session (as normal user) with additional logging enabled:
    • Add NVLOG_CONFIG_FILE variable pointing the nvlog.config file (attached
      nvlog.config (539 Bytes)). E.g.: NVLOG_CONFIG_FILE=${HOME}/nvlog.config
    • Run the debugging session.
    • You should see the /tmp/debugger.log file created - could you share it with us?

Also any chance you can try the same scenario with Jetpack 7?

Check out this.

In my case it works.

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