Im trying to debug a kernel that is launched using cudaLaunchCooperativeKernel
since the kernel uses grid syncs. But when I try to run it inside cuda-gdb after setting a breakpoint inside the kernel, it crashes with the following stack trace
cuda-gdb/12/gdb/cuda/cuda-kernel.c:545: internal-error: kernels_start_kernel: Assertion `module' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
----- Backtrace -----
0x62e137 gdb_internal_backtrace()
0x9e2a04 internal_vproblem(internal_problem*, char const*, int, char const*, __va_list_tag*)
0x9e2d5c internal_verror(char const*, int, char const*, __va_list_tag*)
0xb96181 internal_error(char const*, int, char const*, ...)
0x6e3159 kernels_start_kernel(unsigned int, unsigned long, unsigned long, unsigned long, unsigned long, CuDim3, CuDim3, CUDBGKernelType, unsigned long, CUDBGKernelOrigin, bool, CuDim3)
0x6ed309 warp_get_kernel(unsigned int, unsigned int, unsigned int)
0x6e143c cuda_iterator_step(cuda_iterator_t*)
0x6e1c4e cuda_iterator_end(cuda_iterator_t*)
0x6f2ca2 cuda_breakpoint_hit_p(cuda_coords_t&)
0x5b3d57 cuda_nat_linux<amd64_linux_nat_target>::wait(ptid_t, target_waitstatus*, enum_flags<target_wait_flag>)
0x817002 thread_db_target::wait(ptid_t, target_waitstatus*, enum_flags<target_wait_flag>)
0x9b7b5a target_wait(ptid_t, target_waitstatus*, enum_flags<target_wait_flag>)
0x7d76b9 do_target_wait_1(inferior*, ptid_t, target_waitstatus*, enum_flags<target_wait_flag>)
0x7e66c3 fetch_inferior_event()
0xb96c0c gdb_wait_for_event(int)
0xb96df6 gdb_do_one_event()
0x828b24 captured_command_loop()
0x82a3d4 gdb_main(captured_main_args*)
0x5689a4 main
---------------------
cuda-gdb/12/gdb/cuda/cuda-kernel.c:545: internal-error: kernels_start_kernel: Assertion `module' failed.
Tried with all cuda-11.7, cuda-12.0 and cuda-12.1 (nvcc and cuda-gdb both). But the result is the same.
Any help to work around this issue is appreciated