Skip to content

Resource cleanup validation errors #441

@LaylBongers

Description

@LaylBongers

I'm getting some validation errors while running my application.
It seem that occasionally WGPU cleans up a command buffer that hasn't actually finished yet.

I'm not sure where this is coming from, there's a log included below. As far as I know I wasn't getting these errors yet when I was working on #429, but because these errors happen infrequently I can't be 100% sure.

Jan 08 00:33:26.155ERROR render_frame{}: gfx_backend_vulkan:
VALIDATION [VUID-vkResetCommandBuffer-commandBuffer-00045 (0)] : Attempt to reset VkCommandBuffer 0x22f4a598100[] which is in use. The Vulkan spec states: commandBuffer must not be in the pending state (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkResetCommandBuffer-commandBuffer-00045)
object info: (type: COMMAND_BUFFER, hndl: 2402134098176)

Jan 08 00:33:26.159ERROR render_frame{}: gfx_backend_vulkan:
VALIDATION [VUID-vkResetCommandBuffer-commandBuffer-00045 (0)] : Attempt to reset VkCommandBuffer 0x22f4a599b20[] which is in use. The Vulkan spec states: commandBuffer must not be in the pending state (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkResetCommandBuffer-commandBuffer-00045)
object info: (type: COMMAND_BUFFER, hndl: 2402134104864)

Jan 08 00:33:26.161ERROR render_frame{}: gfx_backend_vulkan:
VALIDATION [VUID-vkResetCommandBuffer-commandBuffer-00045 (0)] : Attempt to reset VkCommandBuffer 0x22f4a59b540[] which is in use. The Vulkan spec states: commandBuffer must not be in the pending state (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkResetCommandBuffer-commandBuffer-00045)
object info: (type: COMMAND_BUFFER, hndl: 2402134111552)

Jan 08 00:33:26.164ERROR render_frame{}: gfx_backend_vulkan:
VALIDATION [VUID-vkResetCommandBuffer-commandBuffer-00045 (0)] : Attempt to reset VkCommandBuffer 0x22f4a598e10[] which is in use. The Vulkan spec states: commandBuffer must not be in the pending state (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkResetCommandBuffer-commandBuffer-00045)
object info: (type: COMMAND_BUFFER, hndl: 2402134101520)

Jan 08 00:33:26.201ERROR render_frame{}: gfx_backend_vulkan:
VALIDATION [VUID-vkDestroyBuffer-buffer-00922 (0)] : Cannot free VkBuffer 0x7ab240000005c75[] 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.1-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
object info: (type: BUFFER, hndl: 552574961701641333)

Jan 08 00:33:26.206ERROR render_frame{}: gfx_backend_vulkan:
VALIDATION [VUID-vkDestroyBuffer-buffer-00922 (0)] : Cannot free VkBuffer 0x730ca0000005c73[] 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.1-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
object info: (type: BUFFER, hndl: 518136058496441459)

Jan 08 00:33:26.210ERROR render_frame{}: gfx_backend_vulkan:
VALIDATION [VUID-vkDestroyBuffer-buffer-00922 (0)] : Cannot free VkBuffer 0x52b4a10000005c70[] 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.1-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
object info: (type: BUFFER, hndl: 5959565228290104432)

Jan 08 00:33:26.213ERROR render_frame{}: gfx_backend_vulkan:
VALIDATION [VUID-vkDestroyBuffer-buffer-00922 (0)] : Cannot free VkBuffer 0xfb4a80000005c69[] 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.1-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
object info: (type: BUFFER, hndl: 1131714124330327145)

Jan 08 00:33:26.215ERROR render_frame{}: gfx_backend_vulkan:
VALIDATION [VUID-vkDestroyBuffer-buffer-00922 (0)] : Cannot free VkBuffer 0x502c6c0000005c6d[] 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.1-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
object info: (type: BUFFER, hndl: 5777111169265327213)

Jan 08 00:33:26.239ERROR gfx_backend_vulkan:
VALIDATION [VUID-vkResetCommandBuffer-commandBuffer-00045 (0)] : Attempt to reset VkCommandBuffer 0x22f4a598e10[] which is in use. The Vulkan spec states: commandBuffer must not be in the pending state (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkResetCommandBuffer-commandBuffer-00045)
object info: (type: COMMAND_BUFFER, hndl: 2402134101520)

Jan 08 00:33:26.244ERROR gfx_backend_vulkan:
VALIDATION [VUID-vkBeginCommandBuffer-commandBuffer-00049 (0)] : Calling vkBeginCommandBuffer() on active VkCommandBuffer 0x22f4a59b540[] before it has completed. You must check command buffer fence before this call. The Vulkan spec states: commandBuffer must not be in the recording or pending state. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkBeginCommandBuffer-commandBuffer-00049)
object info: (type: COMMAND_BUFFER, hndl: 2402134111552)

Jan 08 00:33:26.247ERROR gfx_backend_vulkan:
VALIDATION [VUID-vkBeginCommandBuffer-commandBuffer-00049 (0)] : Calling vkBeginCommandBuffer() on active VkCommandBuffer 0x22f4a599b20[] before it has completed. You must check command buffer fence before this call. The Vulkan spec states: commandBuffer must not be in the recording or pending state. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkBeginCommandBuffer-commandBuffer-00049)
object info: (type: COMMAND_BUFFER, hndl: 2402134104864)

Jan 08 00:33:26.255ERROR gfx_backend_vulkan:
VALIDATION [VUID-vkQueueSubmit-pCommandBuffers-00071 (0)] : VkCommandBuffer 0x22f4a599b20[] is already in use and is not marked for simultaneous use. The Vulkan spec states: If any element of the pCommandBuffers member of any element of pSubmits was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, it must not be in the pending state (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkQueueSubmit-pCommandBuffers-00071)
object info: (type: COMMAND_BUFFER, hndl: 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: validationIssues related to validation, diagnostics, and error handling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions