MMU Fault Error when binding a sparse image page during a disptach

Hello,

I have shader that is reading from a sparse image (Vulkan® 1.3.253 - A Specification (with all registered Vulkan extensions)). If I update the sparse image page binding using vkQueueBindSparse while the shader is running, the GPU halts. Vulkan just return DEVICE_LOST, and Aftermath tells me that it is an “MMU Fault Error”, with fault type “Failed to translate the virtual address”, and access type “Read”.

I’m running an A4000 on Ubuntu 20.04 with the 530 proprietary driver (also crashes on 525).

I’m not sure if binging a page while a shader is accessing it is supported behavior, but it seems like a natural application for sparse resources. I would not be surprised if it just caused the returned color to be undefined, but crashing seems a bit excessive.

What do you think of this ?

(PS: I can provide a test program if you really want to.)

Hi there @antoinerichermoz and welcome to the NVIDIA developer forums.

From the spec you linked:

This binding must be done before the resource is used, and the binding is immutable for the lifetime of the resource.

Immutable in this context means that any change during the lifetime of the resource will lead to undefined behaviour.

Modifying the binding during access is a bit like messing around with page tables, so I am not surprised this causes an error.