wgpu: Vulkan Validation Error: Cannot free VkBuffer that is in use by a command buffer.
Description Vulkan validation error:
ERROR gfx_backend_vulkan:
VALIDATION [VUID-vkDestroyBuffer-buffer-00922 (0xe4549c11)] : Validation Error: [ VUID-vkDestroyBuffer-buffer-00922 ] Object 0: handle = 0x4ce96a00000014e6, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0xe4549c11 | Cannot free VkBuffer 0x4ce96a00000014e6[] that is in use by a command buffer. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
object info: (type: BUFFER, hndl: 0x4ce96a00000014e6)
I think this occurs in veloren when a switch between scenes is initiated that is quickly interrupted. Since I get it after getting kicked to the character selection screen by an error from the server.
Repro steps Attached API trace
Expected vs observed behavior No validation errors
Extra materials
wgpu-trace.zip
wgpu-trace.z01.zip
wgpu-trace.z02.zip
should be able to extract these by removing the .zip
from the last two and running unzip wpgu-trace.zip
Platform
OS: Manjaro 21.1.0 Pahvo
DE: Xfce4
GPU: AMD Radeon HD 7900 Series (TAHITI, DRM 3.40.0, 5.10.49-1-MANJARO, LLVM 12.0.0)
wgpu commit: a92b8549a8e2cb9dac781bafc5ed32828f3caf46
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 20 (15 by maintainers)
It seems like I can actually still reproduce this for my original case (but not in the examples). It only occurs in a very specific scenario so I had not noticed before. I will need to find some time to see if I can test this with an updated version of
wgpu
.I completely missed this!
It seems like I can no longer reproduce this, I ran
cargo test --example water
on several branches:v0.10
,v0.11
,v0.12
, andmaster
. None of them produced this validation error. I can only assume a driver update has resolved it.Strangely, I also didn’t get any test failures like this one which I had before:
Either I’m running the test differently or a driver update fixed both things.
Current gpu info: From
glinfo
:From
vulkaninfo
:I think I figured out how to get the test to not panic (by deleting the reference image). And it appears to still be producing vulkan validation errors and hanging.
@kvark thanks for the tip, here is the link (it should last 24hr let me know if another upload is needed) https://wormhole.app/d9kpY#oEaxV-v-Moh-FppzVmSREA