Debug-enabled very simple kernel weirdly crashes


I met a kernel crash only when I create a module including that kernel for debugging.
I attached a reproducer for this issue:

Debug build creates the module for debugging, release build does not.

Weirdly, this issue started to happen after I modified the closest-hit kernel to very simple one. (Try to toggle the #if switch in The original kernel runs without the crash in my environment)
Non-debugging build works as expected.

Error reported at the crash is:

[ 2][       ERROR]: Error recording event to prevent concurrent launches on the same OptixPipeline (CUDA error string: unspecified launch failure, CUDA error code: 719)
Error recording resource event on user stream (CUDA error string: unspecified launch failure, CUDA error code: 719)

If I launch the program with NSIGHT VSE, the program stops during the RG kernel. At that time I can see “PhysicalStackOverflow” exception in the Lanes window.


Windows 11 Pro 22H2, 22621.2215
Visual Studio Community 2022, 17.7.2
OptiX 8.0.0
CUDA 12.2 Update 2
Ryzen 9 7950X
RTX 4080
Driver: 537.13

Hello OptiX dev team.
Could you take a look the repro?


I filed an internal bug report about it.

I couldn’t build the project myself, yet, because I don’t have CUDA 12.2 installed.
EDIT: I reproduced it now after installing CUDA 12.2 Update 2 which allowed to build the solution.

1 Like