Skip to content

[mvk-error] VK_ERROR_DEVICE_LOST: Lost VkDevice after MTLCommandBuffer "vkQueueSubmit MTLCommandBuffer on Queue 0-0" execution failed (code 4): Ignored (for causing prior/excessive GPU errors) #2675

@huanggui

Description

@huanggui

MoltenVK Version: 1.3.1, supporting Vulkan version 1.3.314.
Running Platform: Apple M4 Pro, MacOS 15.6.1 (24G90).
Replay scene: I'm running a commercial game using an Android emulator, with Angle's Vulkan rendering backend. This is a random problem, but it has a relatively high probability of occurring. The problem is that the emulator program freezes or crashes. Below is the log information after enabling some debugging configurations. Do you have any suggestions for analyzing this problem?

Key logs:

[mvk-info] Retrieve a MTLCommandBuffer performance avg: 0.003 ms, latest: 0.005 ms, prev: 0.007 ms, min: 0.000 ms, max: 0.126 ms, count: 177848
[mvk-info] Encode VkCommandBuffer to MTLCommandBuffer performance avg: 0.029 ms, latest: 0.012 ms, prev: 0.012 ms, min: 0.003 ms, max: 94.481 ms, count: 167659
[mvk-info] vkQueueSubmit() encoding to MTLCommandBuffers performance avg: 0.040 ms, latest: 0.021 ms, prev: 0.023 ms, min: 0.008 ms, max: 94.549 ms, count: 167659
[mvk-info] Unknown performance activity performance avg: 0.521 ms, latest: 0.773 ms, prev: 0.747 ms, min: 0.000 ms, max: 85.322 ms, count: 167660
[mvk-info] Retrieve a MTLCommandBuffer performance avg: 0.003 ms, latest: 0.003 ms, prev: 0.005 ms, min: 0.000 ms, max: 0.126 ms, count: 177849
[mvk-info] Encode VkCommandBuffer to MTLCommandBuffer performance avg: 0.029 ms, latest: 0.011 ms, prev: 0.012 ms, min: 0.003 ms, max: 94.481 ms, count: 167660
[mvk-info] vkQueueSubmit() encoding to MTLCommandBuffers performance avg: 0.040 ms, latest: 0.019 ms, prev: 0.021 ms, min: 0.008 ms, max: 94.549 ms, count: 167660
[mvk-info] Unknown performance activity performance avg: 0.521 ms, latest: 0.794 ms, prev: 0.773 ms, min: 0.000 ms, max: 85.322 ms, count: 167661
[mvk-info] Retrieve a MTLCommandBuffer performance avg: 0.003 ms, latest: 0.004 ms, prev: 0.003 ms, min: 0.000 ms, max: 0.126 ms, count: 177850
[mvk-info] Encode VkCommandBuffer to MTLCommandBuffer performance avg: 0.029 ms, latest: 0.011 ms, prev: 0.011 ms, min: 0.003 ms, max: 94.481 ms, count: 167661
[mvk-info] vkQueueSubmit() encoding to MTLCommandBuffers performance avg: 0.040 ms, latest: 0.019 ms, prev: 0.019 ms, min: 0.008 ms, max: 94.549 ms, count: 167661
[mvk-info] Unknown performance activity performance avg: 0.521 ms, latest: 0.814 ms, prev: 0.794 ms, min: 0.000 ms, max: 85.322 ms, count: 167662
[mvk-info] Retrieve a MTLCommandBuffer performance avg: 0.003 ms, latest: 0.005 ms, prev: 0.004 ms, min: 0.000 ms, max: 0.126 ms, count: 177851
[mvk-info] Encode VkCommandBuffer to MTLCommandBuffer performance avg: 0.029 ms, latest: 0.012 ms, prev: 0.011 ms, min: 0.003 ms, max: 94.481 ms, count: 167662
[mvk-info] vkQueueSubmit() encoding to MTLCommandBuffers performance avg: 0.040 ms, latest: 0.021 ms, prev: 0.019 ms, min: 0.008 ms, max: 94.549 ms, count: 167662
[mvk-info] Unknown performance activity performance avg: 0.521 ms, latest: 0.838 ms, prev: 0.814 ms, min: 0.000 ms, max: 85.322 ms, count: 167663
[mvk-info] Retrieve a MTLCommandBuffer performance avg: 0.003 ms, latest: 0.003 ms, prev: 0.005 ms, min: 0.000 ms, max: 0.126 ms, count: 177852
[mvk-info] Encode VkCommandBuffer to MTLCommandBuffer performance avg: 0.029 ms, latest: 0.023 ms, prev: 0.012 ms, min: 0.003 ms, max: 94.481 ms, count: 167663
[mvk-info] vkQueueSubmit() encoding to MTLCommandBuffers performance avg: 0.040 ms, latest: 0.030 ms, prev: 0.021 ms, min: 0.008 ms, max: 94.549 ms, count: 167663
[mvk-info] Unknown performance activity performance avg: 0.521 ms, latest: 0.873 ms, prev: 0.838 ms, min: 0.000 ms, max: 85.322 ms, count: 167664
[mvk-info] Retrieve a MTLCommandBuffer performance avg: 0.003 ms, latest: 0.005 ms, prev: 0.003 ms, min: 0.000 ms, max: 0.126 ms, count: 177853
[mvk-info] Encode VkCommandBuffer to MTLCommandBuffer performance avg: 0.029 ms, latest: 0.024 ms, prev: 0.023 ms, min: 0.003 ms, max: 94.481 ms, count: 167664
[mvk-info] vkQueueSubmit() encoding to MTLCommandBuffers performance avg: 0.040 ms, latest: 0.033 ms, prev: 0.030 ms, min: 0.008 ms, max: 94.549 ms, count: 167664
[mvk-info] Unknown performance activity performance avg: 0.521 ms, latest: 0.917 ms, prev: 0.873 ms, min: 0.000 ms, max: 85.322 ms, count: 167665
[mvk-info] Retrieve a MTLCommandBuffer performance avg: 0.003 ms, latest: 0.004 ms, prev: 0.005 ms, min: 0.000 ms, max: 0.126 ms, count: 177854
[mvk-info] Encode VkCommandBuffer to MTLCommandBuffer performance avg: 0.029 ms, latest: 0.050 ms, prev: 0.024 ms, min: 0.003 ms, max: 94.481 ms, count: 167665
[mvk-info] vkQueueSubmit() encoding to MTLCommandBuffers performance avg: 0.040 ms, latest: 0.059 ms, prev: 0.033 ms, min: 0.008 ms, max: 94.549 ms, count: 167665
[mvk-warn] VK_TIMEOUT: Resumed VkDevice after MTLCommandBuffer "vkQueueSubmit MTLCommandBuffer on Queue 0-0" execution failed (code 2): Caused GPU Timeout Error (00000002:kIOGPUCommandBufferCallbackErrorTimeout)
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 0.542 ms, latest: 5001.421 ms, prev: 0.677 ms, min: 0.049 ms, max: 5001.421 ms, count: 167634
[mvk-warn] VK_TIMEOUT: Resumed VkDevice after MTLCommandBuffer "vkQueueSubmit MTLCommandBuffer on Queue 0-0" execution failed (code 2): Caused GPU Timeout Error (00000002:kIOGPUCommandBufferCallbackErrorTimeout)
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 0.572 ms, latest: 5001.374 ms, prev: 5001.421 ms, min: 0.049 ms, max: 5001.421 ms, count: 167635
[mvk-info] Unknown performance activity performance avg: 0.521 ms, latest: 0.009 ms, prev: 0.917 ms, min: 0.000 ms, max: 85.322 ms, count: 167666
[mvk-info] Retrieve a MTLCommandBuffer performance avg: 0.003 ms, latest: 0.010 ms, prev: 0.004 ms, min: 0.000 ms, max: 0.126 ms, count: 177855
[mvk-info] Encode VkCommandBuffer to MTLCommandBuffer performance avg: 0.029 ms, latest: 0.147 ms, prev: 0.050 ms, min: 0.003 ms, max: 94.481 ms, count: 167666
[mvk-info] vkQueueSubmit() encoding to MTLCommandBuffers performance avg: 0.040 ms, latest: 0.168 ms, prev: 0.059 ms, min: 0.008 ms, max: 94.549 ms, count: 167666
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 0.602 ms, latest: 4976.456 ms, prev: 5001.374 ms, min: 0.049 ms, max: 5001.421 ms, count: 167636
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 0.632 ms, latest: 4976.583 ms, prev: 4976.456 ms, min: 0.049 ms, max: 5001.421 ms, count: 167637
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 0.661 ms, latest: 4976.711 ms, prev: 4976.583 ms, min: 0.049 ms, max: 5001.421 ms, count: 167638
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 0.691 ms, latest: 4976.829 ms, prev: 4976.711 ms, min: 0.049 ms, max: 5001.421 ms, count: 167639
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 0.721 ms, latest: 4976.844 ms, prev: 4976.829 ms, min: 0.049 ms, max: 5001.421 ms, count: 167640
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 0.750 ms, latest: 4976.854 ms, prev: 4976.844 ms, min: 0.049 ms, max: 5001.421 ms, count: 167641
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 0.780 ms, latest: 4976.849 ms, prev: 4976.854 ms, min: 0.049 ms, max: 5001.421 ms, count: 167642
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 0.810 ms, latest: 4976.876 ms, prev: 4976.849 ms, min: 0.049 ms, max: 5001.421 ms, count: 167643
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 0.839 ms, latest: 4976.858 ms, prev: 4976.876 ms, min: 0.049 ms, max: 5001.421 ms, count: 167644
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 0.869 ms, latest: 4976.877 ms, prev: 4976.858 ms, min: 0.049 ms, max: 5001.421 ms, count: 167645
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 0.899 ms, latest: 4976.877 ms, prev: 4976.877 ms, min: 0.049 ms, max: 5001.421 ms, count: 167646
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 0.928 ms, latest: 4976.895 ms, prev: 4976.877 ms, min: 0.049 ms, max: 5001.421 ms, count: 167647
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 0.958 ms, latest: 4976.906 ms, prev: 4976.895 ms, min: 0.049 ms, max: 5001.421 ms, count: 167648
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 0.988 ms, latest: 4976.913 ms, prev: 4976.906 ms, min: 0.049 ms, max: 5001.421 ms, count: 167649
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.018 ms, latest: 4976.921 ms, prev: 4976.913 ms, min: 0.049 ms, max: 5001.421 ms, count: 167650
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.047 ms, latest: 4976.931 ms, prev: 4976.921 ms, min: 0.049 ms, max: 5001.421 ms, count: 167651
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.077 ms, latest: 4976.927 ms, prev: 4976.931 ms, min: 0.049 ms, max: 5001.421 ms, count: 167652
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.107 ms, latest: 4976.942 ms, prev: 4976.927 ms, min: 0.049 ms, max: 5001.421 ms, count: 167653
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.136 ms, latest: 4976.937 ms, prev: 4976.942 ms, min: 0.049 ms, max: 5001.421 ms, count: 167654
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.166 ms, latest: 4976.939 ms, prev: 4976.937 ms, min: 0.049 ms, max: 5001.421 ms, count: 167655
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.196 ms, latest: 4976.967 ms, prev: 4976.939 ms, min: 0.049 ms, max: 5001.421 ms, count: 167656
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.225 ms, latest: 4976.986 ms, prev: 4976.967 ms, min: 0.049 ms, max: 5001.421 ms, count: 167657
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.255 ms, latest: 4977.007 ms, prev: 4976.986 ms, min: 0.049 ms, max: 5001.421 ms, count: 167658
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.285 ms, latest: 4977.024 ms, prev: 4977.007 ms, min: 0.049 ms, max: 5001.421 ms, count: 167659
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.314 ms, latest: 4977.061 ms, prev: 4977.024 ms, min: 0.049 ms, max: 5001.421 ms, count: 167660
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.344 ms, latest: 4977.079 ms, prev: 4977.061 ms, min: 0.049 ms, max: 5001.421 ms, count: 167661
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.374 ms, latest: 4977.118 ms, prev: 4977.079 ms, min: 0.049 ms, max: 5001.421 ms, count: 167662
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.403 ms, latest: 4977.121 ms, prev: 4977.118 ms, min: 0.049 ms, max: 5001.421 ms, count: 167663
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.433 ms, latest: 4977.075 ms, prev: 4977.121 ms, min: 0.049 ms, max: 5001.421 ms, count: 167664
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.463 ms, latest: 4977.051 ms, prev: 4977.075 ms, min: 0.049 ms, max: 5001.421 ms, count: 167665
[mvk-warn] VK_TIMEOUT: Resumed VkDevice after MTLCommandBuffer "vkQueueSubmit MTLCommandBuffer on Queue 0-0" execution failed (code 2): Caused GPU Timeout Error (00000002:kIOGPUCommandBufferCallbackErrorTimeout)
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.493 ms, latest: 5008.536 ms, prev: 4977.051 ms, min: 0.049 ms, max: 5008.536 ms, count: 167666
[mvk-info] Unknown performance activity performance avg: 0.521 ms, latest: 0.013 ms, prev: 0.009 ms, min: 0.000 ms, max: 85.322 ms, count: 167667
[mvk-info] Retrieve a MTLCommandBuffer performance avg: 0.003 ms, latest: 0.012 ms, prev: 0.010 ms, min: 0.000 ms, max: 0.126 ms, count: 177856
[mvk-info] Encode VkCommandBuffer to MTLCommandBuffer performance avg: 0.029 ms, latest: 0.154 ms, prev: 0.147 ms, min: 0.003 ms, max: 94.481 ms, count: 167667
[mvk-info] vkQueueSubmit() encoding to MTLCommandBuffers performance avg: 0.040 ms, latest: 0.181 ms, prev: 0.168 ms, min: 0.008 ms, max: 94.549 ms, count: 167667
[mvk-error] VK_ERROR_DEVICE_LOST: Lost VkDevice after MTLCommandBuffer "vkQueueSubmit MTLCommandBuffer on Queue 0-0" execution failed (code 4): Ignored (for causing prior/excessive GPU errors) (00000004:kIOGPUCommandBufferCallbackErrorSubmissionsIgnored)
[mvk-info] Execute a MTLCommandBuffer on GPU performance avg: 1.493 ms, latest: 0.046 ms, prev: 5008.536 ms, min: 0.046 ms, max: 5008.536 ms, count: 167667

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions