Occasionally OptixLaunch errors only for first frame

I was getting occasional errors when synchronizing after optixLaunch, so I turned on full exceptionFlags (minus user exceptions). Now I get this error printed:

( 504, 24, 0) error: invalid traversable 0x1e00220
( 72, 8, 0) error: invalid traversable 0x1e00220
( 24, 0, 0) error: invalid traversable 0x1e00220
( 216, 16, 0) error: invalid traversable 0x1e00220
( 216, 0, 0) error: invalid traversable 0x1e00220
( 72, 8, 0) transform list of size 0:
( 216, 16, 0) transform list of size 0:
( 504, 24, 0) transform list of size 0:
( 216, 0, 0) transform list of size 0:
( 24, 0, 0) transform list of size 0:

Based on my quick visual inspection of optix_7_device_impl_exception.h, these appear to be coming from the device side, right?

If I print all the GAS handles I use to create my IAS, I get:

I0525 16:20:24.048274 1643249664 OptiXGeometryEngineAdapter.cpp:241] Trav Handle: 0x7f35da1d5e0c
I0525 16:20:24.048275 1643249664 OptiXGeometryEngineAdapter.cpp:241] Trav Handle: 0x7f35da3b2a0c
I0525 16:20:24.048277 1643249664 OptiXGeometryEngineAdapter.cpp:241] Trav Handle: 0x7f35da4f500c
I0525 16:20:24.048280 1643249664 OptiXGeometryEngineAdapter.cpp:241] Trav Handle: 0x7f35da60000c
I0525 16:20:24.048280 1643249664 OptiXGeometryEngineAdapter.cpp:241] Trav Handle: 0x7f35da80000c
I0525 16:20:24.048282 1643249664 OptiXGeometryEngineAdapter.cpp:241] Trav Handle: 0x7f35dac0000c
I0525 16:20:24.048285 1643249664 OptiXGeometryEngineAdapter.cpp:241] Trav Handle: 0x7f35db20000c
I0525 16:20:24.048285 1643249664 OptiXGeometryEngineAdapter.cpp:241] Trav Handle: 0x7f35da62820c
I0525 16:20:24.048287 1643249664 OptiXGeometryEngineAdapter.cpp:241] Trav Handle: 0x7f35da3dac0c
I0525 16:20:24.048288 1643249664 OptiXGeometryEngineAdapter.cpp:241] Trav Handle: 0x7f35db60000c
I0525 16:20:24.048290 1643249664 OptiXGeometryEngineAdapter.cpp:241] Trav Handle: 0x7f35dba0000c
I0525 16:20:24.048291 1643249664 OptiXGeometryEngineAdapter.cpp:241] Trav Handle: 0x7f35da69f60c
I0525 16:20:24.048293 1643249664 OptiXGeometryEngineAdapter.cpp:241] Trav Handle: 0x7f35da6e360c
I0525 16:20:24.048295 1643249664 OptiXGeometryEngineAdapter.cpp:241] Trav Handle: 0x7f35dbe0000c
I0525 16:20:24.048295 1643249664 OptiXGeometryEngineAdapter.cpp:241] Trav Handle: 0x7f35c200000c
I0525 16:20:24.048297 1643249664 OptiXGeometryEngineAdapter.cpp:241] Trav Handle: 0x7f35da7a400c

And if I print the IAS handle, I get 0x7f35da3fe804. None of these look remotely like 0x1e00220.

Interestingly, I only ever seem to have issues the very first frame. If I get past the first frame without this, I never see this issue, and even if I encounter this on the first frame, I don’t think I ever see it again (unless further debug output is suppressed globally, and not per launch).

Any ideas for how to track this down the cause of this would be much appreciated.

Hey Brian,

Yes those exceptions are coming from the device side. Before we dive deeper, have you turned on validation mode? If not, can you turn on validation mode and see if it catches anything new? This is different than the exception flags, see the OptixDeviceContextOptions.validationMode input to optixDeviceContextCreate().

(Set a reminder for later to disable validation mode along with exceptions, it’s for debugging only and it can affect performance.)


David.

It does fail slightly faster. Now it fails with
Check failed: resultCode == OPTIX_SUCCESS (7053 vs. 0) Error during validation mode run
inside of optixLaunch instead of during synchronization.

Is there a way to get more validation information about what isn’t kosher? Like can it be set up to invoke the callback with more info?

Ah usually there is a message sent to standard error I think. Is it possible the standard stream output is being suppressed in your environment?


David.

Thanks for the suggestions Dave. Yep, it was going into my logs instead of onto stderr or stdout. I realized that when I changed some code that I was adding the traversable to the param set after I copied it to device. (facepalm emoji goes here)

1 Like