KhronosGroup / Vulkan-ValidationLayers

Vulkan Validation Layers (VVL)
https://vulkan.lunarg.com/doc/sdk/latest/linux/khronos_validation_layer.html
Other
768 stars 404 forks source link

False VUID-vkCmdDraw-format-07753 (and 07752) #8263

Open StefanPoelloth opened 4 months ago

StefanPoelloth commented 4 months ago

Environment:

Describe the Issue

The validation error says that Set 1 Binding 7 called "RoughnessMetallic" is of type float. But the compute shader using the descriptor set 0x26c066af5c8 is defining: layout(set = 1, binding = 7, rg32ui) uniform readonly uimage2D Visibility; And a 'RoughnessMetallic' doesnt exist in that shader, however in the next vkCmdDispatch that uses a different shader and descriptor set (not 0x26c066af5c8) uses RoughnessMetallic in Set 1 Binding 7.

validation layer: Validation Error: [ VUID-vkCmdDraw-format-07753 ] Object 0: handle = 0x26c066af5c8, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 1: handle = 0x26c1032f0d0, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x7be8f3b5 | vkCmdDraw(): the descriptor VkDescriptorSet 0x26c066af5c8[] [Set 1, Binding 7, Index 0, variable "RoughnessMetallic"] requires FLOAT component type, but bound descriptor format is VK_FORMAT_R32G32_UINT. The Vulkan spec states: If a VkImageView is accessed as a result of this command, then the numeric type of the image view's format and the Sampled Type operand of the OpTypeImage must match (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDraw-format-07753)

Expected behavior

There shouldnt be a validation error.

Additional context There seems to be a similar issue with VUID-vkCmdDraw-viewType-07752, It complains about TonemapLut being wrong but the descriptor set is some internal stuff from FSR2 that we use. "TonemapLut" is used in our postprocess vkCmdDispatch which is executed after FSR2.

validation layer: Validation Error: [ VUID-vkCmdDraw-viewType-07752 ] Object 0: handle = 0x54193b0000000384, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 1: handle = 0xad17c80000000339, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x73ed4ff5 | vkCmdDraw(): the descriptor VkDescriptorSet 0x54193b0000000384[] [Set 1, Binding 1, Index 0, variable "TonemapLut"] ImageView type is VK_IMAGE_VIEW_TYPE_2D but the OpTypeImage has (Dim = 3D) and (Arrayed = 0). The Vulkan spec states: If a VkImageView is accessed as a result of this command, then the image view's viewType must match the Dim operand of the OpTypeImage as described in Instruction/Sampler/Image View Validation (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDraw-viewType-07752)

spencer-lunarg commented 4 months ago

so the issue is there seems to be some issue between the compute vs graphics

just to get a confirmation from your side, when you call vkCmdBindPipeline and vkCmdBindDescriptorSets you are not mixing up the VK_PIPELINE_BIND_POINT_COMPUTE and VK_PIPELINE_BIND_POINT_GRAPHICS on them

StefanPoelloth commented 4 months ago

No, the passes resulting in VUID-vkCmdDraw-format-07753 are all vkCmdDispatch and vkCmdBindDescriptorSets only use VK_PIPELINE_BIND_POINT_COMPUTE.

Im not sure if FSR uses graphics internally.

Heres some pseudocode of the called functions where Execute is a vkCmdDispatch and Draw is a vkCmdDraw... Our passes hold the descriptor sets privately, the sets are not shared between passes.

PrimaryCullPass.Execute();
PrimaryVisibilityPass.Draw();
BuildTempHzbPass.Execute(c);
SecondaryCullPass.Execute();
SecondaryVisibilityPass.Draw();
BuildFinalHzbPass.Execute();
AttributePass.Execute(); # uses descriptor set 0x26c066af5c8 
ShadingPass.Execute(); # uses RoughnessMetallic in compute shader
FSR2Pass.Execute();
PostProcessPass.Execute();
DebugDisplayPass.Execute();
ImguiPass.Draw();
spencer-lunarg commented 4 months ago

thanks, will need to try to reproduce in a unit test, unfortunately some other stuff is top priority atm, so might be a bit until I swing back to this

StefanPoelloth commented 4 months ago

thanks, will need to try to reproduce in a unit test, unfortunately some other stuff is top priority atm, so might be a bit until I swing back to this

Ive hacked together a repro in c#: repro.zip

StefanPoelloth commented 3 months ago

@spencer-lunarg did the repro help or can i provide more information like a dump or gfxreconstruct?

spencer-lunarg commented 3 months ago

I haven't had time to look at the repro, it should likely be fine, just backed up currently with GPU-AV stuff

glebov-andrey commented 3 weeks ago

Hi, I think we're seeing the same issue with GPU-AV. There are a lot of VUID-vkCmdDraw-format-07753 which VUID-vkCmdDraw-viewType-07752 which do not match the actual shaders mentioned, e.g. [Set 0, Binding 1, Index 0, variable "output_image"] requires UINT component type, but bound descriptor format is VK_FORMAT_R8G8_UNORM., when the mentioned descriptor set doesn't even have a binding named output_image, and none which would require a UINT component type.

I'm not sure if this is related, but TSAN reports a number of data races inside VVL when GPU-AV is enabled.

TSAN error ``` WARNING: ThreadSanitizer: data race (pid=25535) Read of size 8 at 0x721800046438 by thread T6 (mutexes: write M0): #0 VmaDeviceMemoryBlock::GetMappedData() const VVL/layers/external/vma/vk_mem_alloc.h:5950:42 (libVkLayer_khronos_validation.so+0x9f85ed) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #1 VmaBlockVector::AllocatePage(unsigned long, unsigned long, VmaAllocationCreateInfo const&, VmaSuballocationType, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:12504:64 (libVkLayer_khronos_validation.so+0x9d879c) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #2 VmaBlockVector::Allocate(unsigned long, unsigned long, VmaAllocationCreateInfo const&, VmaSuballocationType, unsigned long, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:12401:19 (libVkLayer_khronos_validation.so+0x9d8052) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #3 VmaAllocator_T::AllocateMemoryOfType(VmaPool_T*, unsigned long, unsigned long, bool, VkBuffer_T*, VkImage_T*, unsigned int, VmaAllocationCreateInfo const&, unsigned int, VmaSuballocationType, VmaDedicatedAllocationList&, VmaBlockVector&, unsigned long, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:14558:27 (libVkLayer_khronos_validation.so+0x9e65f0) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #4 VmaAllocator_T::AllocateMemory(VkMemoryRequirements const&, bool, bool, VkBuffer_T*, VkImage_T*, unsigned int, VmaAllocationCreateInfo const&, VmaSuballocationType, unsigned long, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:15077:19 (libVkLayer_khronos_validation.so+0x9e8e88) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #5 vmaCreateBuffer VVL/layers/external/vma/vk_mem_alloc.h:17067:26 (libVkLayer_khronos_validation.so+0x9f01e8) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #6 gpuav::DeviceMemoryBlock::CreateBuffer(Location const&, VkBufferCreateInfo const*, VmaAllocationCreateInfo const*) VVL/layers/gpu/resources/gpuav_resources.cpp:176:9 (libVkLayer_khronos_validation.so+0x108f6fa) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #7 gpuav::CommandBuffer::AllocateResources(Location const&) VVL/layers/gpu/resources/gpuav_subclasses.cpp:203:30 (libVkLayer_khronos_validation.so+0x107b540) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #8 gpuav::CommandBuffer::CommandBuffer(gpuav::Validator&, VkCommandBuffer_T*, VkCommandBufferAllocateInfo const*, vvl::CommandPool const*) VVL/layers/gpu/resources/gpuav_subclasses.cpp:132:5 (libVkLayer_khronos_validation.so+0x107b048) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #9 void std::_Construct(gpuav::CommandBuffer*, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:119:25 (libVkLayer_khronos_validation.so+0xff0dae) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #10 void std::allocator_traits>::construct(std::allocator&, gpuav::CommandBuffer*, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:661:4 (libVkLayer_khronos_validation.so+0xff07d9) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #11 std::_Sp_counted_ptr_inplace, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace(std::allocator, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:604:4 (libVkLayer_khronos_validation.so+0xff07d9) #12 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&>(gpuav::CommandBuffer*&, std::_Sp_alloc_shared_tag>, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:972:6 (libVkLayer_khronos_validation.so+0xff0464) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #13 std::__shared_ptr::__shared_ptr, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&>(std::_Sp_alloc_shared_tag>, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1712:14 (libVkLayer_khronos_validation.so+0xff0334) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #14 std::shared_ptr::shared_ptr, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&>(std::_Sp_alloc_shared_tag>, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:464:4 (libVkLayer_khronos_validation.so+0xff0252) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #15 std::shared_ptr::value, gpuav::CommandBuffer>::type> std::make_shared(gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:1009:14 (libVkLayer_khronos_validation.so+0xfe8561) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #16 gpuav::Validator::CreateCmdBufferState(VkCommandBuffer_T*, VkCommandBufferAllocateInfo const*, vvl::CommandPool const*) VVL/layers/gpu/core/gpuav_setup.cpp:72:57 (libVkLayer_khronos_validation.so+0xfe30c3) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #17 vvl::CommandPool::Allocate(VkCommandBufferAllocateInfo const*, VkCommandBuffer_T* const*) VVL/layers/state_tracker/cmd_buffer_state.cpp:131:32 (libVkLayer_khronos_validation.so+0x10bd072) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #18 ValidationStateTracker::PostCallRecordAllocateCommandBuffers(VkDevice_T*, VkCommandBufferAllocateInfo const*, VkCommandBuffer_T**, RecordObject const&) VVL/layers/state_tracker/state_tracker.cpp:2260:15 (libVkLayer_khronos_validation.so+0x1275cdb) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #19 vulkan_layer_chassis::AllocateCommandBuffers(VkDevice_T*, VkCommandBufferAllocateInfo const*, VkCommandBuffer_T**) VVL/layers/vulkan/generated/chassis.cpp:4227:24 (libVkLayer_khronos_validation.so+0xa83ed0) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) Previous write of size 8 at 0x721800046438 by thread T3 (mutexes: read M1, write M2): #0 VmaDeviceMemoryBlock::Unmap(VmaAllocator_T*, unsigned int) VVL/layers/external/vma/vk_mem_alloc.h:11881:27 (libVkLayer_khronos_validation.so+0x9d4e92) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #1 VmaAllocator_T::Unmap(VmaAllocation_T*) VVL/layers/external/vma/vk_mem_alloc.h:15595:21 (libVkLayer_khronos_validation.so+0x9ea8e9) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #2 vmaUnmapMemory VVL/layers/external/vma/vk_mem_alloc.h:16797:16 (libVkLayer_khronos_validation.so+0x9ef2a6) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #3 gpuav::DeviceMemoryBlock::UnmapMemory() const VVL/layers/gpu/resources/gpuav_resources.cpp:157:47 (libVkLayer_khronos_validation.so+0x108f25d) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #4 gpuav::CommandBuffer::UpdateBdaRangesBuffer(Location const&) VVL/layers/gpu/resources/gpuav_subclasses.cpp:334:26 (libVkLayer_khronos_validation.so+0x107c87d) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #5 gpuav::CommandBuffer::PreProcess(Location const&) VVL/layers/gpu/resources/gpuav_subclasses.cpp:438:17 (libVkLayer_khronos_validation.so+0x107d12e) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #6 gpuav::Queue::PreSubmit(std::vector>&&) VVL/layers/gpu/resources/gpuav_subclasses.cpp:625:21 (libVkLayer_khronos_validation.so+0x107e77f) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #7 ValidationStateTracker::PreCallRecordQueueSubmit2(VkQueue_T*, unsigned int, VkSubmitInfo2 const*, VkFence_T*, RecordObject const&) VVL/layers/state_tracker/state_tracker.cpp:1298:48 (libVkLayer_khronos_validation.so+0x126ce84) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #8 vulkan_layer_chassis::QueueSubmit2(VkQueue_T*, unsigned int, VkSubmitInfo2 const*, VkFence_T*) VVL/layers/vulkan/generated/chassis.cpp:7914:24 (libVkLayer_khronos_validation.so+0xaa8bb4) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) Location is heap block of size 96 at 0x7218000463e0 allocated by main thread: #0 aligned_alloc (libclang_rt.tsan-x86_64.so+0x673b8) (BuildId: 83a3c8d2530f3f7484f54738b3cc92e3ba2a603f) #1 vma_aligned_alloc(unsigned long, unsigned long) VVL/layers/external/vma/vk_mem_alloc.h:2786:12 (libVkLayer_khronos_validation.so+0x9f2b65) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #2 VmaMalloc(VkAllocationCallbacks const*, unsigned long, unsigned long) VVL/layers/external/vma/vk_mem_alloc.h:3791:18 (libVkLayer_khronos_validation.so+0x9f2ab3) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #3 VmaMalloc(VmaAllocator_T*, unsigned long, unsigned long) VVL/layers/external/vma/vk_mem_alloc.h:11673:12 (libVkLayer_khronos_validation.so+0x9f3559) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #4 VmaDeviceMemoryBlock* VmaAllocate(VmaAllocator_T*) VVL/layers/external/vma/vk_mem_alloc.h:11684:16 (libVkLayer_khronos_validation.so+0x9dbb4f) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #5 VmaBlockVector::CreateBlock(unsigned long, unsigned long*) VVL/layers/external/vma/vk_mem_alloc.h:12885:42 (libVkLayer_khronos_validation.so+0x9d77e9) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #6 VmaBlockVector::AllocatePage(unsigned long, unsigned long, VmaAllocationCreateInfo const&, VmaSuballocationType, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:12584:13 (libVkLayer_khronos_validation.so+0x9d8d68) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #7 VmaBlockVector::Allocate(unsigned long, unsigned long, VmaAllocationCreateInfo const&, VmaSuballocationType, unsigned long, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:12401:19 (libVkLayer_khronos_validation.so+0x9d8052) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #8 VmaAllocator_T::AllocateMemoryOfType(VmaPool_T*, unsigned long, unsigned long, bool, VkBuffer_T*, VkImage_T*, unsigned int, VmaAllocationCreateInfo const&, unsigned int, VmaSuballocationType, VmaDedicatedAllocationList&, VmaBlockVector&, unsigned long, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:14558:27 (libVkLayer_khronos_validation.so+0x9e65f0) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #9 VmaAllocator_T::AllocateMemory(VkMemoryRequirements const&, bool, bool, VkBuffer_T*, VkImage_T*, unsigned int, VmaAllocationCreateInfo const&, VmaSuballocationType, unsigned long, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:15077:19 (libVkLayer_khronos_validation.so+0x9e8e88) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #10 vmaCreateBuffer VVL/layers/external/vma/vk_mem_alloc.h:17067:26 (libVkLayer_khronos_validation.so+0x9f01e8) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #11 gpuav::DeviceMemoryBlock::CreateBuffer(Location const&, VkBufferCreateInfo const*, VmaAllocationCreateInfo const*) VVL/layers/gpu/resources/gpuav_resources.cpp:176:9 (libVkLayer_khronos_validation.so+0x108f6fa) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #12 gpuav::CommandBuffer::AllocateResources(Location const&) VVL/layers/gpu/resources/gpuav_subclasses.cpp:203:30 (libVkLayer_khronos_validation.so+0x107b540) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #13 gpuav::CommandBuffer::CommandBuffer(gpuav::Validator&, VkCommandBuffer_T*, VkCommandBufferAllocateInfo const*, vvl::CommandPool const*) VVL/layers/gpu/resources/gpuav_subclasses.cpp:132:5 (libVkLayer_khronos_validation.so+0x107b048) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #14 void std::_Construct(gpuav::CommandBuffer*, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:119:25 (libVkLayer_khronos_validation.so+0xff0dae) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #15 void std::allocator_traits>::construct(std::allocator&, gpuav::CommandBuffer*, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:661:4 (libVkLayer_khronos_validation.so+0xff07d9) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #16 std::_Sp_counted_ptr_inplace, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace(std::allocator, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:604:4 (libVkLayer_khronos_validation.so+0xff07d9) #17 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&>(gpuav::CommandBuffer*&, std::_Sp_alloc_shared_tag>, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:972:6 (libVkLayer_khronos_validation.so+0xff0464) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #18 std::__shared_ptr::__shared_ptr, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&>(std::_Sp_alloc_shared_tag>, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1712:14 (libVkLayer_khronos_validation.so+0xff0334) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #19 std::shared_ptr::shared_ptr, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&>(std::_Sp_alloc_shared_tag>, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:464:4 (libVkLayer_khronos_validation.so+0xff0252) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #20 std::shared_ptr::value, gpuav::CommandBuffer>::type> std::make_shared(gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:1009:14 (libVkLayer_khronos_validation.so+0xfe8561) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #21 gpuav::Validator::CreateCmdBufferState(VkCommandBuffer_T*, VkCommandBufferAllocateInfo const*, vvl::CommandPool const*) VVL/layers/gpu/core/gpuav_setup.cpp:72:57 (libVkLayer_khronos_validation.so+0xfe30c3) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #22 vvl::CommandPool::Allocate(VkCommandBufferAllocateInfo const*, VkCommandBuffer_T* const*) VVL/layers/state_tracker/cmd_buffer_state.cpp:131:32 (libVkLayer_khronos_validation.so+0x10bd072) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #23 ValidationStateTracker::PostCallRecordAllocateCommandBuffers(VkDevice_T*, VkCommandBufferAllocateInfo const*, VkCommandBuffer_T**, RecordObject const&) VVL/layers/state_tracker/state_tracker.cpp:2260:15 (libVkLayer_khronos_validation.so+0x1275cdb) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #24 vulkan_layer_chassis::AllocateCommandBuffers(VkDevice_T*, VkCommandBufferAllocateInfo const*, VkCommandBuffer_T**) VVL/layers/vulkan/generated/chassis.cpp:4227:24 (libVkLayer_khronos_validation.so+0xa83ed0) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) Mutex M0 (0x723000003a18) created at: #0 pthread_rwlock_wrlock (libclang_rt.tsan-x86_64.so+0x6b4c2) (BuildId: 83a3c8d2530f3f7484f54738b3cc92e3ba2a603f) #1 std::__glibcxx_rwlock_wrlock(pthread_rwlock_t*) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/shared_mutex:83:3 (libVkLayer_khronos_validation.so+0x3e948f) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #2 std::__shared_mutex_pthread::lock() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/shared_mutex:196:19 (libVkLayer_khronos_validation.so+0x415255) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #3 std::shared_mutex::lock() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/shared_mutex:423:27 (libVkLayer_khronos_validation.so+0x415205) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #4 VmaRWMutex::LockWrite() VVL/layers/external/vma/vk_mem_alloc.h:2927:40 (libVkLayer_khronos_validation.so+0x9fb2f5) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #5 VmaMutexLockWrite::VmaMutexLockWrite(VmaRWMutex&, bool) VVL/layers/external/vma/vk_mem_alloc.h:4008:35 (libVkLayer_khronos_validation.so+0x9f57c5) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #6 VmaBlockVector::Allocate(unsigned long, unsigned long, VmaAllocationCreateInfo const&, VmaSuballocationType, unsigned long, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:12398:27 (libVkLayer_khronos_validation.so+0x9d7ffe) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #7 VmaAllocator_T::AllocateMemoryOfType(VmaPool_T*, unsigned long, unsigned long, bool, VkBuffer_T*, VkImage_T*, unsigned int, VmaAllocationCreateInfo const&, unsigned int, VmaSuballocationType, VmaDedicatedAllocationList&, VmaBlockVector&, unsigned long, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:14558:27 (libVkLayer_khronos_validation.so+0x9e65f0) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #8 VmaAllocator_T::AllocateMemory(VkMemoryRequirements const&, bool, bool, VkBuffer_T*, VkImage_T*, unsigned int, VmaAllocationCreateInfo const&, VmaSuballocationType, unsigned long, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:15077:19 (libVkLayer_khronos_validation.so+0x9e8e88) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #9 vmaCreateBuffer VVL/layers/external/vma/vk_mem_alloc.h:17067:26 (libVkLayer_khronos_validation.so+0x9f01e8) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #10 gpuav::DeviceMemoryBlock::CreateBuffer(Location const&, VkBufferCreateInfo const*, VmaAllocationCreateInfo const*) VVL/layers/gpu/resources/gpuav_resources.cpp:176:9 (libVkLayer_khronos_validation.so+0x108f6fa) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #11 gpuav::CommandBuffer::AllocateResources(Location const&) VVL/layers/gpu/resources/gpuav_subclasses.cpp:203:30 (libVkLayer_khronos_validation.so+0x107b540) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #12 gpuav::CommandBuffer::CommandBuffer(gpuav::Validator&, VkCommandBuffer_T*, VkCommandBufferAllocateInfo const*, vvl::CommandPool const*) VVL/layers/gpu/resources/gpuav_subclasses.cpp:132:5 (libVkLayer_khronos_validation.so+0x107b048) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #13 void std::_Construct(gpuav::CommandBuffer*, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:119:25 (libVkLayer_khronos_validation.so+0xff0dae) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #14 void std::allocator_traits>::construct(std::allocator&, gpuav::CommandBuffer*, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:661:4 (libVkLayer_khronos_validation.so+0xff07d9) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #15 std::_Sp_counted_ptr_inplace, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace(std::allocator, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:604:4 (libVkLayer_khronos_validation.so+0xff07d9) #16 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&>(gpuav::CommandBuffer*&, std::_Sp_alloc_shared_tag>, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:972:6 (libVkLayer_khronos_validation.so+0xff0464) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #17 std::__shared_ptr::__shared_ptr, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&>(std::_Sp_alloc_shared_tag>, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1712:14 (libVkLayer_khronos_validation.so+0xff0334) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #18 std::shared_ptr::shared_ptr, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&>(std::_Sp_alloc_shared_tag>, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:464:4 (libVkLayer_khronos_validation.so+0xff0252) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #19 std::shared_ptr::value, gpuav::CommandBuffer>::type> std::make_shared(gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:1009:14 (libVkLayer_khronos_validation.so+0xfe8561) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #20 gpuav::Validator::CreateCmdBufferState(VkCommandBuffer_T*, VkCommandBufferAllocateInfo const*, vvl::CommandPool const*) VVL/layers/gpu/core/gpuav_setup.cpp:72:57 (libVkLayer_khronos_validation.so+0xfe30c3) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #21 vvl::CommandPool::Allocate(VkCommandBufferAllocateInfo const*, VkCommandBuffer_T* const*) VVL/layers/state_tracker/cmd_buffer_state.cpp:131:32 (libVkLayer_khronos_validation.so+0x10bd072) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #22 ValidationStateTracker::PostCallRecordAllocateCommandBuffers(VkDevice_T*, VkCommandBufferAllocateInfo const*, VkCommandBuffer_T**, RecordObject const&) VVL/layers/state_tracker/state_tracker.cpp:2260:15 (libVkLayer_khronos_validation.so+0x1275cdb) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #23 vulkan_layer_chassis::AllocateCommandBuffers(VkDevice_T*, VkCommandBufferAllocateInfo const*, VkCommandBuffer_T**) VVL/layers/vulkan/generated/chassis.cpp:4227:24 (libVkLayer_khronos_validation.so+0xa83ed0) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) Mutex M1 (0x728400265738) created at: #0 pthread_rwlock_wrlock (libclang_rt.tsan-x86_64.so+0x6b4c2) (BuildId: 83a3c8d2530f3f7484f54738b3cc92e3ba2a603f) #1 std::__glibcxx_rwlock_wrlock(pthread_rwlock_t*) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/shared_mutex:83:3 (libVkLayer_khronos_validation.so+0x3e948f) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #2 std::__shared_mutex_pthread::lock() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/shared_mutex:196:19 (libVkLayer_khronos_validation.so+0x415255) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #3 std::shared_mutex::lock() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/shared_mutex:423:27 (libVkLayer_khronos_validation.so+0x415205) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #4 std::unique_lock::lock() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_lock.h:141:17 (libVkLayer_khronos_validation.so+0x4151a7) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #5 std::unique_lock::unique_lock(std::shared_mutex&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_lock.h:71:2 (libVkLayer_khronos_validation.so+0x3ea63e) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #6 vvl::CommandBuffer::WriteLock() VVL/layers/./state_tracker/cmd_buffer_state.h:542:41 (libVkLayer_khronos_validation.so+0x4323cc) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #7 LockedSharedPtr> ValidationStateTracker::GetWrite, LockedSharedPtr>>(state_object::Traits::HandleType) VVL/layers/./state_tracker/state_tracker.h:379:31 (libVkLayer_khronos_validation.so+0x5a0cb2) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #8 ValidationStateTracker::PreCallRecordBeginCommandBuffer(VkCommandBuffer_T*, VkCommandBufferBeginInfo const*, RecordObject const&) VVL/layers/state_tracker/state_tracker.cpp:2267:21 (libVkLayer_khronos_validation.so+0x1275db4) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #9 vulkan_layer_chassis::BeginCommandBuffer(VkCommandBuffer_T*, VkCommandBufferBeginInfo const*) VVL/layers/vulkan/generated/chassis.cpp:1267:24 (libVkLayer_khronos_validation.so+0xa66d0b) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) Mutex M2 (0x721800046400) created at: #0 pthread_mutex_lock (libclang_rt.tsan-x86_64.so+0x69c62) (BuildId: 83a3c8d2530f3f7484f54738b3cc92e3ba2a603f) #1 __gthread_mutex_lock(pthread_mutex_t*) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/x86_64-linux-gnu/c++/13/bits/gthr-default.h:749:12 (libVkLayer_khronos_validation.so+0x7a4aaf) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #2 std::mutex::lock() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_mutex.h:113:17 (libVkLayer_khronos_validation.so+0x7b36c5) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #3 VmaMutex::Lock() VVL/layers/external/vma/vk_mem_alloc.h:2907:31 (libVkLayer_khronos_validation.so+0x9fb435) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #4 VmaMutexLock::VmaMutexLock(VmaMutex&, bool) VVL/layers/external/vma/vk_mem_alloc.h:3976:35 (libVkLayer_khronos_validation.so+0x9f7bd5) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #5 VmaDeviceMemoryBlock::PostAlloc(VmaAllocator_T*) VVL/layers/external/vma/vk_mem_alloc.h:11784:18 (libVkLayer_khronos_validation.so+0x9d462c) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #6 VmaBlockVector::CommitAllocationRequest(VmaAllocationRequest&, VmaDeviceMemoryBlock*, unsigned long, unsigned int, void*, VmaSuballocationType, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:12799:13 (libVkLayer_khronos_validation.so+0x9da61a) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #7 VmaBlockVector::AllocateFromBlock(VmaDeviceMemoryBlock*, unsigned long, unsigned long, unsigned int, void*, VmaSuballocationType, unsigned int, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:12780:16 (libVkLayer_khronos_validation.so+0x9d9ed2) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #8 VmaBlockVector::AllocatePage(unsigned long, unsigned long, VmaAllocationCreateInfo const&, VmaSuballocationType, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:12610:19 (libVkLayer_khronos_validation.so+0x9d8fdf) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #9 VmaBlockVector::Allocate(unsigned long, unsigned long, VmaAllocationCreateInfo const&, VmaSuballocationType, unsigned long, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:12401:19 (libVkLayer_khronos_validation.so+0x9d8052) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #10 VmaAllocator_T::AllocateMemoryOfType(VmaPool_T*, unsigned long, unsigned long, bool, VkBuffer_T*, VkImage_T*, unsigned int, VmaAllocationCreateInfo const&, unsigned int, VmaSuballocationType, VmaDedicatedAllocationList&, VmaBlockVector&, unsigned long, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:14558:27 (libVkLayer_khronos_validation.so+0x9e65f0) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #11 VmaAllocator_T::AllocateMemory(VkMemoryRequirements const&, bool, bool, VkBuffer_T*, VkImage_T*, unsigned int, VmaAllocationCreateInfo const&, VmaSuballocationType, unsigned long, VmaAllocation_T**) VVL/layers/external/vma/vk_mem_alloc.h:15077:19 (libVkLayer_khronos_validation.so+0x9e8e88) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #12 vmaCreateBuffer VVL/layers/external/vma/vk_mem_alloc.h:17067:26 (libVkLayer_khronos_validation.so+0x9f01e8) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #13 gpuav::DeviceMemoryBlock::CreateBuffer(Location const&, VkBufferCreateInfo const*, VmaAllocationCreateInfo const*) VVL/layers/gpu/resources/gpuav_resources.cpp:176:9 (libVkLayer_khronos_validation.so+0x108f6fa) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #14 gpuav::CommandBuffer::AllocateResources(Location const&) VVL/layers/gpu/resources/gpuav_subclasses.cpp:203:30 (libVkLayer_khronos_validation.so+0x107b540) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #15 gpuav::CommandBuffer::CommandBuffer(gpuav::Validator&, VkCommandBuffer_T*, VkCommandBufferAllocateInfo const*, vvl::CommandPool const*) VVL/layers/gpu/resources/gpuav_subclasses.cpp:132:5 (libVkLayer_khronos_validation.so+0x107b048) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #16 void std::_Construct(gpuav::CommandBuffer*, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:119:25 (libVkLayer_khronos_validation.so+0xff0dae) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #17 void std::allocator_traits>::construct(std::allocator&, gpuav::CommandBuffer*, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:661:4 (libVkLayer_khronos_validation.so+0xff07d9) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #18 std::_Sp_counted_ptr_inplace, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace(std::allocator, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:604:4 (libVkLayer_khronos_validation.so+0xff07d9) #19 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&>(gpuav::CommandBuffer*&, std::_Sp_alloc_shared_tag>, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:972:6 (libVkLayer_khronos_validation.so+0xff0464) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #20 std::__shared_ptr::__shared_ptr, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&>(std::_Sp_alloc_shared_tag>, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1712:14 (libVkLayer_khronos_validation.so+0xff0334) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #21 std::shared_ptr::shared_ptr, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&>(std::_Sp_alloc_shared_tag>, gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:464:4 (libVkLayer_khronos_validation.so+0xff0252) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #22 std::shared_ptr::value, gpuav::CommandBuffer>::type> std::make_shared(gpuav::Validator&, VkCommandBuffer_T*&, VkCommandBufferAllocateInfo const*&, vvl::CommandPool const*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:1009:14 (libVkLayer_khronos_validation.so+0xfe8561) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #23 gpuav::Validator::CreateCmdBufferState(VkCommandBuffer_T*, VkCommandBufferAllocateInfo const*, vvl::CommandPool const*) VVL/layers/gpu/core/gpuav_setup.cpp:72:57 (libVkLayer_khronos_validation.so+0xfe30c3) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #24 vvl::CommandPool::Allocate(VkCommandBufferAllocateInfo const*, VkCommandBuffer_T* const*) VVL/layers/state_tracker/cmd_buffer_state.cpp:131:32 (libVkLayer_khronos_validation.so+0x10bd072) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #25 ValidationStateTracker::PostCallRecordAllocateCommandBuffers(VkDevice_T*, VkCommandBufferAllocateInfo const*, VkCommandBuffer_T**, RecordObject const&) VVL/layers/state_tracker/state_tracker.cpp:2260:15 (libVkLayer_khronos_validation.so+0x1275cdb) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #26 vulkan_layer_chassis::AllocateCommandBuffers(VkDevice_T*, VkCommandBufferAllocateInfo const*, VkCommandBuffer_T**) VVL/layers/vulkan/generated/chassis.cpp:4227:24 (libVkLayer_khronos_validation.so+0xa83ed0) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) ```

It might also have somthing to do with the data race which I reported here: https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/4646#issuecomment-1988557333 Even with a single worker thread this data race still occurs because it's related to a VVL-internal thread

TSAN error ``` WARNING: ThreadSanitizer: data race (pid=26285) Write of size 8 at 0x725000957dc8 by main thread: #0 std::enable_if<__and_>, std::is_move_constructible, std::is_move_assignable>::value, void>::type std::swap(vvl::Image*&, vvl::Image*&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/move.h:199:11 (libVkLayer_khronos_validation.so+0x11959e5) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #1 std::__shared_ptr::swap(std::__shared_ptr&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1686:2 (libVkLayer_khronos_validation.so+0x1195939) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #2 std::__shared_ptr::operator=(std::__shared_ptr&&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1620:31 (libVkLayer_khronos_validation.so+0x11958da) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #3 std::shared_ptr::operator=(std::shared_ptr&&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:440:27 (libVkLayer_khronos_validation.so+0x118c5b9) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #4 vvl::ImageView::Destroy() VVL/layers/state_tracker/image_state.cpp:464:21 (libVkLayer_khronos_validation.so+0x1186e96) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #5 gpuav::ImageView::Destroy() VVL/layers/gpu/resources/gpuav_subclasses.cpp:70:21 (libVkLayer_khronos_validation.so+0x107a449) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #6 void ValidationStateTracker::Destroy>(state_object::Traits::HandleType) VVL/layers/./state_tracker/state_tracker.h:299:27 (libVkLayer_khronos_validation.so+0x129b0a6) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #7 ValidationStateTracker::PreCallRecordDestroyImageView(VkDevice_T*, VkImageView_T*, VkAllocationCallbacks const*, RecordObject const&) VVL/layers/state_tracker/state_tracker.cpp:514:5 (libVkLayer_khronos_validation.so+0x12651d9) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #8 vulkan_layer_chassis::DestroyImageView(VkDevice_T*, VkImageView_T*, VkAllocationCallbacks const*) VVL/layers/vulkan/generated/chassis.cpp:3265:24 (libVkLayer_khronos_validation.so+0xa7a490) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) Previous read of size 8 at 0x725000957dc8 by thread T18 (mutexes: write M0): #0 std::__shared_ptr::operator bool() const /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1670:16 (libVkLayer_khronos_validation.so+0x43f229) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #1 gpuav::Validator::VerifyImageLayout(vvl::CommandBuffer const&, vvl::ImageView const&, VkImageLayout, Location const&, char const*, bool*) const VVL/layers/gpu/descriptor_validation/gpuav_image_layout.cpp:331:10 (libVkLayer_khronos_validation.so+0xfd14e3) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #2 vvl::DescriptorValidator::ValidateDescriptor(std::pair>> const&, unsigned int, VkDescriptorType, vvl::ImageDescriptor const&) const VVL/layers/drawdispatch/descriptor_validator.cpp:437:19 (libVkLayer_khronos_validation.so+0x9812ac) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #3 bool vvl::DescriptorValidator::ValidateDescriptors>(std::pair>> const&, vvl::DescriptorBindingImpl const&, std::vector> const&) VVL/layers/drawdispatch/descriptor_validator.cpp:135:17 (libVkLayer_khronos_validation.so+0x9952d2) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #4 vvl::DescriptorValidator::ValidateBinding(std::pair>> const&, std::vector> const&) VVL/layers/drawdispatch/descriptor_validator.cpp:168:21 (libVkLayer_khronos_validation.so+0x97e927) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #5 gpuav::CommandBuffer::ValidateBindlessDescriptorSets(Location const&) VVL/layers/gpu/descriptor_validation/gpuav_descriptor_validation.cpp:196:25 (libVkLayer_khronos_validation.so+0xfbcdf4) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #6 gpuav::CommandBuffer::PostProcess(VkQueue_T*, Location const&) VVL/layers/gpu/resources/gpuav_subclasses.cpp:516:25 (libVkLayer_khronos_validation.so+0x107d67b) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #7 gpuav::Queue::Retire(vvl::QueueSubmission&) VVL/layers/gpu/resources/gpuav_subclasses.cpp:664:25 (libVkLayer_khronos_validation.so+0x107ed9d) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #8 vvl::Queue::ThreadFunc() VVL/layers/state_tracker/queue_state.cpp:226:9 (libVkLayer_khronos_validation.so+0x11f35c4) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #9 void std::__invoke_impl(std::__invoke_memfun_deref, void (vvl::Queue::*&&)(), vvl::Queue*&&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:74:14 (libVkLayer_khronos_validation.so+0x11f8215) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #10 std::__invoke_result::type std::__invoke(void (vvl::Queue::*&&)(), vvl::Queue*&&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:96:14 (libVkLayer_khronos_validation.so+0x11f80c5) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #11 void std::thread::_Invoker>::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_thread.h:292:13 (libVkLayer_khronos_validation.so+0x11f8062) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #12 std::thread::_Invoker>::operator()() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_thread.h:299:11 (libVkLayer_khronos_validation.so+0x11f7ff5) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #13 std::thread::_State_impl>>::_M_run() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_thread.h:244:13 (libVkLayer_khronos_validation.so+0x11f7d89) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #14 (libstdc++.so.6+0xed0e3) (BuildId: 757266bafff1752c4f6fbd29014465e90e4ff6c7) Location is heap block of size 496 at 0x725000957c00 allocated by thread T1: #0 malloc (libclang_rt.tsan-x86_64.so+0x66324) (BuildId: 83a3c8d2530f3f7484f54738b3cc92e3ba2a603f) #1 operator new(unsigned long) (libstdc++.so.6+0xbf8eb) (BuildId: 757266bafff1752c4f6fbd29014465e90e4ff6c7) #2 std::allocator_traits, (__gnu_cxx::_Lock_policy)2>>>::allocate(std::allocator, (__gnu_cxx::_Lock_policy)2>>&, unsigned long) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:482:20 (libVkLayer_khronos_validation.so+0xfecc41) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #3 std::__allocated_ptr, (__gnu_cxx::_Lock_policy)2>>> std::__allocate_guarded, (__gnu_cxx::_Lock_policy)2>>>(std::allocator, (__gnu_cxx::_Lock_policy)2>>&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/allocated_ptr.h:98:21 (libVkLayer_khronos_validation.so+0xfecc41) #4 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count, std::shared_ptr const&, VkImageView_T*&, VkImageViewCreateInfo const*&, unsigned long&, VkFilterCubicImageViewImageFormatPropertiesEXT const&, gpuav::DescriptorHeap&>(gpuav::ImageView*&, std::_Sp_alloc_shared_tag>, std::shared_ptr const&, VkImageView_T*&, VkImageViewCreateInfo const*&, unsigned long&, VkFilterCubicImageViewImageFormatPropertiesEXT const&, gpuav::DescriptorHeap&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:969:19 (libVkLayer_khronos_validation.so+0xfeca07) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #5 std::__shared_ptr::__shared_ptr, std::shared_ptr const&, VkImageView_T*&, VkImageViewCreateInfo const*&, unsigned long&, VkFilterCubicImageViewImageFormatPropertiesEXT const&, gpuav::DescriptorHeap&>(std::_Sp_alloc_shared_tag>, std::shared_ptr const&, VkImageView_T*&, VkImageViewCreateInfo const*&, unsigned long&, VkFilterCubicImageViewImageFormatPropertiesEXT const&, gpuav::DescriptorHeap&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1712:14 (libVkLayer_khronos_validation.so+0xfec90d) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #6 std::shared_ptr::shared_ptr, std::shared_ptr const&, VkImageView_T*&, VkImageViewCreateInfo const*&, unsigned long&, VkFilterCubicImageViewImageFormatPropertiesEXT const&, gpuav::DescriptorHeap&>(std::_Sp_alloc_shared_tag>, std::shared_ptr const&, VkImageView_T*&, VkImageViewCreateInfo const*&, unsigned long&, VkFilterCubicImageViewImageFormatPropertiesEXT const&, gpuav::DescriptorHeap&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:464:4 (libVkLayer_khronos_validation.so+0xfec81c) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #7 std::shared_ptr::value, gpuav::ImageView>::type> std::make_shared const&, VkImageView_T*&, VkImageViewCreateInfo const*&, unsigned long&, VkFilterCubicImageViewImageFormatPropertiesEXT const&, gpuav::DescriptorHeap&>(std::shared_ptr const&, VkImageView_T*&, VkImageViewCreateInfo const*&, unsigned long&, VkFilterCubicImageViewImageFormatPropertiesEXT const&, gpuav::DescriptorHeap&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:1009:14 (libVkLayer_khronos_validation.so+0xfe8066) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #8 gpuav::Validator::CreateImageViewState(std::shared_ptr const&, VkImageView_T*, VkImageViewCreateInfo const*, unsigned long, VkFilterCubicImageViewImageFormatPropertiesEXT const&) VVL/layers/gpu/core/gpuav_setup.cpp:49:12 (libVkLayer_khronos_validation.so+0xfe2d05) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #9 ValidationStateTracker::PostCallRecordCreateImageView(VkDevice_T*, VkImageViewCreateInfo const*, VkAllocationCallbacks const*, VkImageView_T**, RecordObject const&) VVL/layers/state_tracker/state_tracker.cpp:484:9 (libVkLayer_khronos_validation.so+0x1264b67) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #10 vulkan_layer_chassis::CreateImageView(VkDevice_T*, VkImageViewCreateInfo const*, VkAllocationCallbacks const*, VkImageView_T**) VVL/layers/vulkan/generated/chassis.cpp:3240:24 (libVkLayer_khronos_validation.so+0xa7a01c) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) Mutex M0 (0x7284001dfb38) created at: #0 pthread_rwlock_wrlock (libclang_rt.tsan-x86_64.so+0x6b4c2) (BuildId: 83a3c8d2530f3f7484f54738b3cc92e3ba2a603f) #1 std::__glibcxx_rwlock_wrlock(pthread_rwlock_t*) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/shared_mutex:83:3 (libVkLayer_khronos_validation.so+0x3e948f) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #2 std::__shared_mutex_pthread::lock() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/shared_mutex:196:19 (libVkLayer_khronos_validation.so+0x415255) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #3 std::shared_mutex::lock() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/shared_mutex:423:27 (libVkLayer_khronos_validation.so+0x415205) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #4 std::unique_lock::lock() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_lock.h:141:17 (libVkLayer_khronos_validation.so+0x4151a7) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #5 std::unique_lock::unique_lock(std::shared_mutex&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_lock.h:71:2 (libVkLayer_khronos_validation.so+0x3ea63e) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #6 vvl::CommandBuffer::WriteLock() VVL/layers/./state_tracker/cmd_buffer_state.h:542:41 (libVkLayer_khronos_validation.so+0x4323cc) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #7 LockedSharedPtr> ValidationStateTracker::GetWrite, LockedSharedPtr>>(state_object::Traits::HandleType) VVL/layers/./state_tracker/state_tracker.h:379:31 (libVkLayer_khronos_validation.so+0x5a0cb2) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #8 ValidationStateTracker::PreCallRecordBeginCommandBuffer(VkCommandBuffer_T*, VkCommandBufferBeginInfo const*, RecordObject const&) VVL/layers/state_tracker/state_tracker.cpp:2267:21 (libVkLayer_khronos_validation.so+0x1275db4) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #9 vulkan_layer_chassis::BeginCommandBuffer(VkCommandBuffer_T*, VkCommandBufferBeginInfo const*) VVL/layers/vulkan/generated/chassis.cpp:1267:24 (libVkLayer_khronos_validation.so+0xa66d0b) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) Thread T18 (tid=26323, running) created by main thread at: #0 pthread_create (libclang_rt.tsan-x86_64.so+0x67ee5) (BuildId: 83a3c8d2530f3f7484f54738b3cc92e3ba2a603f) #1 std::thread::_M_start_thread(std::unique_ptr>, void (*)()) (libstdc++.so.6+0xed1b8) (BuildId: 757266bafff1752c4f6fbd29014465e90e4ff6c7) #2 std::__detail::_MakeUniq::__single_object std::make_unique(void (vvl::Queue::*&&)(), vvl::Queue*&&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:1070:34 (libVkLayer_khronos_validation.so+0x11f59b9) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #3 vvl::Queue::PreSubmit(std::vector>&&) VVL/layers/state_tracker/queue_state.cpp:90:27 (libVkLayer_khronos_validation.so+0x11f3493) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #4 gpuav::Queue::PreSubmit(std::vector>&&) VVL/layers/gpu/resources/gpuav_subclasses.cpp:633:24 (libVkLayer_khronos_validation.so+0x107e950) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #5 ValidationStateTracker::PreCallRecordQueueSubmit2(VkQueue_T*, unsigned int, VkSubmitInfo2 const*, VkFence_T*, RecordObject const&) VVL/layers/state_tracker/state_tracker.cpp:1298:48 (libVkLayer_khronos_validation.so+0x126ce84) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) #6 vulkan_layer_chassis::QueueSubmit2(VkQueue_T*, unsigned int, VkSubmitInfo2 const*, VkFence_T*) VVL/layers/vulkan/generated/chassis.cpp:7914:24 (libVkLayer_khronos_validation.so+0xaa8bb4) (BuildId: 116bb3f83830d9d8e894cbf9f3dec2294bac2744) ```
spencer-lunarg commented 3 weeks ago

@glebov-andrey thanks for poking this again

I am 90% sure I know the source of this all, the issue is how we mark which descriptors were touched for bindless descriptors. Currently the logic is intertwined with the generic validation. We need to separate it so things like Sync Validation can use it, so I have this on my upper priority to get fixed by the next SDK for sure

glebov-andrey commented 3 weeks ago

@spencer-lunarg Sounds great! In that case, should I create separate issues about the data races (either of them)?

spencer-lunarg commented 3 weeks ago

should I create separate issues

@glebov-andrey yes, we do test with TSAN for normal validation, but realized right now we don't do it for GPU-AV and should check that regardless (as might be unrelated in the future even if we fix this issue)