KhronosGroup / KhronosGroup/Vulkan-ValidationLayers

DebugPrintf/GPU-AV preset results in access violation in amdvlk64.dll/nvoglv64.dll

Open
#10,106 4 comments 0 reactions 1 assignee Claimed by @spencer-lunarg View on GitHub
GPU-AV
Dominant language
C++
Stars
1k
Forks
504
Avg merge
11h 35m
Merged PRs (30d)
224

Description

**Environment:**
- OS: Win11 24H2
- GPU and driver version: 9950X3D igpu, 25.5.1
- SDK or header version if building from repo: 1.4.309
- Options enabled (synchronization, best practices, etc.): GPU-AV Preset

**Describe the Issue**

When creating a mesh shader pipeline and a certain shader the AMD driver crashes when GPU-AV is enabled.
With modifications to the shader code or descriptor access or without gpu-av it runs fine.
I can provide a repro project through share.lunarg.com

```
Exception thrown at 0x00007FFC57671370 (amdvlk64.dll): 0xC0000005: Access violation reading location 0x0000000000000008.
at amdvlk64.dll!00007ffc57671370() Unknown
at amdvlk64.dll!00007ffc5740f262() Unknown
at amdvlk64.dll!00007ffc574104ca() Unknown
at amdvlk64.dll!00007ffc5742f662() Unknown
at amdvlk64.dll!00007ffc57418ede() Unknown
at amdvlk64.dll!00007ffc5739692e() Unknown
at amdvlk64.dll!00007ffc573a9544() Unknown
at amdvlk64.dll!00007ffc573a78b7() Unknown
at amdvlk64.dll!00007ffc573ddc50() Unknown
at amdvlk64.dll!00007ffc5739cf86() Unknown
at amdvlk64.dll!00007ffc57397da2() Unknown
at amdvlk64.dll!00007ffc570e369e() Unknown
at amdvlk64.dll!00007ffc570e2515() Unknown
at amdvlk64.dll!00007ffc56fdfd6d() Unknown
at amdvlk64.dll!00007ffc57059d86() Unknown
at amdvlk64.dll!00007ffc5705bee2() Unknown
at amdvlk64.dll!00007ffc56ff152c() Unknown
at amdvlk64.dll!00007ffc570367a9() Unknown
at VkLayer_khronos_validation.dll!vvl::dispatch::Device::CreateGraphicsPipelines(VkDevice_T * device, VkPipelineCache_T * pipelineCache, unsigned int createInfoCount, const VkGraphicsPipelineCreateInfo * pCreateInfos, const VkAllocationCallbacks * pAllocator, VkPipeline_T * * pPipelines) Line 895 C++
at VkLayer_khronos_validation.dll!vulkan_layer_chassis::CreateGraphicsPipelines(VkDevice_T * device, VkPipelineCache_T * pipelineCache, unsigned int createInfoCount, const VkGraphicsPipelineCreateInfo * pCreateInfos, const VkAllocationCallbacks * pAllocator, VkPipeline_T * * pPipelines) Line 490 C++
at vulkan-1.dll!00007ffc6f4622a7() Unknown
at [Managed to Native Transition]
at Silk.NET.Vulkan.dll!Silk.NET.Vulkan.Vk.CreateGraphicsPipelines(Silk.NET.Vulkan.Device device, Silk.NET.Vulkan.PipelineCache pipelineCache, uint createInfoCount, Silk.NET.Vulkan.GraphicsPipelineCreateInfo pCreateInfos, Silk.NET.Vulkan.AllocationCallbacks* pAllocator, Silk.NET.Vulkan.Pipeline* pPipelines) Unknown
at Silk.NET.Vulkan.dll!Silk.NET.Vulkan.Vk.CreateGraphicsPipelines(Silk.NET.Vulkan.Device device, Silk.NET.Vulkan.PipelineCache pipelineCache, System.ReadOnlySpan pCreateInfos, Silk.NET.Vulkan.AllocationCallbacks* pAllocator, Silk.NET.Vulkan.Pipeline* pPipelines) Unknown
[snip]
```

**Expected behavior**

There shouldnt be a crash in the driver.

**Additional context**

This was another exception i was encountering but there was a core validation check complaining before. (Ive used an empty setlayout but the shader has bindings specified)

```
Exception thrown: read access violation.
this->module_.set_index_to_bindings_layout_lut_._Mypair._Myval2._Myfirst->_Mypair._Myval2._Myfirst was 0x111011101110122.

at VkLayer_khronos_validation.dll!gpuav::spirv::DescriptorClassGeneralBufferPass::CreateFunctionCall(gpuav::spirv::BasicBlock & block, std::_Vector_iterator>>>> * inst_it, const gpuav::spirv::InjectionData & injection_data) Line 56 C++
at VkLayer_khronos_validation.dll!gpuav::spirv::DescriptorClassGeneralBufferPass::Instrument() Line 203 C++
at [Inline Frame] VkLayer_khronos_validation.dll!gpuav::spirv::Pass::Run() Line 28 C++
at VkLayer_khronos_validation.dll!gpuav::GpuShaderInstrumentor::InstrumentShader(const vvl::enumeration & input_spirv, unsigned int unique_shader_id, const gpuav::GpuShaderInstrumentor::InstrumentationDescriptorSetLayouts & instrumentation_dsl, const Location & loc, std::vector> & out_instrumented_spirv) Line 1195 C++
at VkLayer_khronos_validation.dll!gpuav::GpuShaderInstrumentor::PreCallRecordPipelineCreationShaderInstrumentation(const VkAllocationCallbacks * pAllocator, vvl::Pipeline & pipeline_state, vku::safe_VkGraphicsPipelineCreateInfo & modified_pipeline_ci, const Location & loc, std::vector> & shader_instrumentation_metadata) Line 899 C++
at VkLayer_khronos_validation.dll!gpuav::GpuShaderInstrumentor::PreCallRecordCreateGraphicsPipelines(VkDevice_T * device, VkPipelineCache_T * pipelineCache, unsigned int count, const VkGraphicsPipelineCreateInfo * pCreateInfos, const VkAllocationCallbacks * pAllocator, VkPipeline_T * * pPipelines, const RecordObject & record_obj, std::vector,std::allocator>> & pipeline_states, chassis::CreateGraphicsPipelines & chassis_state) Line 424 C++
at VkLayer_khronos_validation.dll!vulkan_layer_chassis::CreateGraphicsPipelines(VkDevice_T * device, VkPipelineCache_T * pipelineCache, unsigned int createInfoCount, const VkGraphicsPipelineCreateInfo * pCreateInfos, const VkAllocationCallbacks * pAllocator, VkPipeline_T * * pPipelines) Line 482 C++
at vulkan-1.dll!00007ffc6f4622a7() Unknown
at [Managed to Native Transition]
at Silk.NET.Vulkan.dll!Silk.NET.Vulkan.Vk.CreateGraphicsPipelines(Silk.NET.Vulkan.Device device, Silk.NET.Vulkan.PipelineCache pipelineCache, uint createInfoCount, Silk.NET.Vulkan.GraphicsPipelineCreateInfo pCreateInfos, Silk.NET.Vulkan.AllocationCallbacks* pAllocator, Silk.NET.Vulkan.Pipeline* pPipelines) Unknown
at Silk.NET.Vulkan.dll!Silk.NET.Vulkan.Vk.CreateGraphicsPipelines(Silk.NET.Vulkan.Device device, Silk.NET.Vulkan.PipelineCache pipelineCache, System.ReadOnlySpan pCreateInfos, Silk.NET.Vulkan.AllocationCallbacks* pAllocator, Silk.NET.Vulkan.Pipeline* pPipelines) Unknown
[snip]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.