Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR_DEVICE_LOST running vulkan_samples batch (Linux X11) #1078

Open
demensdeum opened this issue Jun 26, 2024 · 12 comments
Open

ERROR_DEVICE_LOST running vulkan_samples batch (Linux X11) #1078

demensdeum opened this issue Jun 26, 2024 · 12 comments
Assignees

Comments

@demensdeum
Copy link

Environment:
Arch Linux
Intel GPU + Nvidia GPU
X11

Steps:

  1. cmake -G "Unix Makefiles" -Bbuild/linux -DCMAKE_BUILD_TYPE=Release
  2. cmake --build build/linux --config Release --target vulkan_samples -j$(nproc)
  3. ./build/linux/app/bin/Release/x86_64/vulkan_samples samples

Result:
After some samples I got error:
[error] Detected Vulkan error: ERROR_DEVICE_LOST
Aborted (core dumped)

@SaschaWillems
Copy link
Collaborator

SaschaWillems commented Jun 26, 2024

What sample does crash? And what does the log look like before the crash? And on what device did the crash occur?

@demensdeum
Copy link
Author

@SaschaWillems
Sample: descriptor_buffer_basic

GPU: Intel(R) UHD Graphics (CML GT2)

Exact command: ./build/linux/app/bin/Release/x86_64/vulkan_samples sample descriptor_buffer_basic

Log:

[info] Logger initialized
[info] Initializing Vulkan sample
[info] Vulkan debug utils enabled (VK_EXT_debug_utils)
[info] Extension VK_KHR_get_physical_device_properties2 found, enabling it
[info] Extension VK_EXT_debug_utils found, enabling it
[info] Extension VK_KHR_xcb_surface found, enabling it
[info] Enabled Validation Layers:
[info] Found GPU: Intel(R) UHD Graphics (CML GT2)
[warning] Couldn't find a discrete physical device, picking default GPU
[info] Selected GPU: Intel(R) UHD Graphics (CML GT2)
[info] Dedicated Allocation enabled
[info] Device supports the following requested extensions:
[info] VK_KHR_get_memory_requirements2
[info] VK_KHR_dedicated_allocation
[info] VK_KHR_swapchain
[info] VK_EXT_descriptor_buffer
[info] VK_KHR_synchronization2
[info] VK_EXT_descriptor_indexing
[info] VK_KHR_buffer_device_address
[info] Surface supports the following surface formats:
[info] B8G8R8A8Srgb, SrgbNonlinear
[info] B8G8R8A8Unorm, SrgbNonlinear
[info] Surface supports the following present modes:
[info] Immediate
[info] Mailbox
[info] Fifo
[info] FifoRelaxed
[warning] (HPPSwapchain) Image extent (0, 0) not supported. Selecting (1280, 720).
[warning] (HPPSwapchain) Surface format (Undefined, SrgbNonlinear) not supported. Selecting (B8G8R8A8Srgb, SrgbNonlinear).
[info] (HPPSwapchain) Image usage flags: TransferSrc ColorAttachment
[info] (HPPSwapchain) Present mode selected: Mailbox
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[error] Detected Vulkan error: ERROR_DEVICE_LOST
Aborted (core dumped)

Can you explain what is log lock file? I will get it

@SaschaWillems
Copy link
Collaborator

Are you sure that Intel GPU supports descriptor buffers?

@demensdeum
Copy link
Author

I am not sure, I just run samples in batch, and got error.

@SaschaWillems
Copy link
Collaborator

That GPU most probably does not support that extension, which is the reason for the crash. Can you run that sample standalone instead of the batch mode? That should do proper error checking and tell you if that extension is supported or not.

@demensdeum
Copy link
Author

There must be compatibility checks, but got ERROR_DEVICE_LOST error instead.
Command:
./build/linux/app/bin/Release/x86_64/vulkan_samples sample descriptor_buffer_basic

Then I see cubes for ~3 seconds:
Screenshot_20240626_232749

After that get error ERROR_DEVICE_LOST:

[info] Logger initialized
[info] Initializing Vulkan sample
[info] Vulkan debug utils enabled (VK_EXT_debug_utils)
[info] Extension VK_KHR_get_physical_device_properties2 found, enabling it
[info] Extension VK_EXT_debug_utils found, enabling it
[info] Extension VK_KHR_xcb_surface found, enabling it
[info] Enabled Validation Layers:
[info] Found GPU: Intel(R) UHD Graphics (CML GT2)
[warning] Couldn't find a discrete physical device, picking default GPU
[info] Selected GPU: Intel(R) UHD Graphics (CML GT2)
[info] Dedicated Allocation enabled
[info] Device supports the following requested extensions:
[info] VK_KHR_get_memory_requirements2
[info] VK_KHR_dedicated_allocation
[info] VK_KHR_swapchain
[info] VK_EXT_descriptor_buffer
[info] VK_KHR_synchronization2
[info] VK_EXT_descriptor_indexing
[info] VK_KHR_buffer_device_address
[info] Surface supports the following surface formats:
[info] B8G8R8A8Srgb, SrgbNonlinear
[info] B8G8R8A8Unorm, SrgbNonlinear
[info] Surface supports the following present modes:
[info] Immediate
[info] Mailbox
[info] Fifo
[info] FifoRelaxed
[warning] (HPPSwapchain) Image extent (0, 0) not supported. Selecting (1280, 720).
[warning] (HPPSwapchain) Surface format (Undefined, SrgbNonlinear) not supported. Selecting (B8G8R8A8Srgb, SrgbNonlinear).
[info] (HPPSwapchain) Image usage flags: TransferSrc ColorAttachment
[info] (HPPSwapchain) Present mode selected: Mailbox
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[error] Detected Vulkan error: ERROR_DEVICE_LOST
Aborted (core dumped)

@demensdeum
Copy link
Author

In batch mode it crashes faster.

@SaschaWillems
Copy link
Collaborator

Looks like the GPU supports descriptor buffers. So either the sample is broken, or the driver. Do you get any validation errors when running with validation enabled?

@demensdeum
Copy link
Author

Here is log/errors with validation enabled:

[info] Logger initialized
[info] Initializing Vulkan sample
[info] Vulkan debug utils enabled (VK_EXT_debug_utils)
[info] Extension VK_EXT_debug_utils found, enabling it
[info] VK_EXT_validation_features is available, enabling it
[info] Extension VK_KHR_get_physical_device_properties2 found, enabling it
[info] Extension VK_KHR_xcb_surface found, enabling it
[info] Enabled Validation Layers:
[info] VK_LAYER_KHRONOS_validation
[warning] -2111305990 - UNASSIGNED-BestPractices-vkCreateInstance-specialuse-extension-debugging: Validation Warning: [ UNASSIGNED-BestPractices-vkCreateInstance-specialuse-extension-debugging ] | MessageID = 0x822806fa | vkCreateInstance(): Attempting to enable extension VK_EXT_debug_utils, but this extension is intended to support use by applications when debugging and it is strongly recommended that it be otherwise avoided.
[warning] -1861097675 - UNASSIGNED-BestPractices-vkCreateInstance-deprecated-extension: Validation Warning: [ UNASSIGNED-BestPractices-vkCreateInstance-deprecated-extension ] | MessageID = 0x9111e735 | vkCreateInstance(): Attempting to enable deprecated extension VK_EXT_validation_features, but this extension has been deprecated by VK_EXT_layer_settings.
[warning] -2111305990 - UNASSIGNED-BestPractices-vkCreateInstance-specialuse-extension-debugging: Validation Warning: [ UNASSIGNED-BestPractices-vkCreateInstance-specialuse-extension-debugging ] | MessageID = 0x822806fa | vkCreateInstance(): Attempting to enable extension VK_EXT_validation_features, but this extension is intended to support use by applications when debugging and it is strongly recommended that it be otherwise avoided.
[warning] -1861097675 - UNASSIGNED-BestPractices-vkCreateInstance-deprecated-extension: Validation Warning: [ UNASSIGNED-BestPractices-vkCreateInstance-deprecated-extension ] | MessageID = 0x9111e735 | vkCreateInstance(): Attempting to enable deprecated extension VK_KHR_get_physical_device_properties2, but this extension has been promoted to VK_VERSION_1_1.
[info] Found GPU: Intel(R) UHD Graphics (CML GT2)
[warning] Couldn't find a discrete physical device, picking default GPU
[info] Selected GPU: Intel(R) UHD Graphics (CML GT2)
[info] Dedicated Allocation enabled
[info] Device supports the following requested extensions:
[info] VK_KHR_get_memory_requirements2
[info] VK_KHR_dedicated_allocation
[info] VK_KHR_swapchain
[info] VK_EXT_descriptor_buffer
[info] VK_KHR_synchronization2
[info] VK_EXT_descriptor_indexing
[info] VK_KHR_buffer_device_address
[warning] 181611958 - UNASSIGNED-BestPractices-vkCreateDevice-deprecated-extension: Validation Warning: [ UNASSIGNED-BestPractices-vkCreateDevice-deprecated-extension ] Object 0: handle = 0x562594ac2e30, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xad32db6 | vkCreateDevice(): Attempting to enable deprecated extension VK_KHR_get_memory_requirements2, but this extension has been promoted to VK_VERSION_1_1.
[warning] 181611958 - UNASSIGNED-BestPractices-vkCreateDevice-deprecated-extension: Validation Warning: [ UNASSIGNED-BestPractices-vkCreateDevice-deprecated-extension ] Object 0: handle = 0x562594ac2e30, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xad32db6 | vkCreateDevice(): Attempting to enable deprecated extension VK_KHR_dedicated_allocation, but this extension has been promoted to VK_VERSION_1_1.
[info] Surface supports the following surface formats:
[info] B8G8R8A8Srgb, SrgbNonlinear
[info] B8G8R8A8Unorm, SrgbNonlinear
[info] Surface supports the following present modes:
[info] Immediate
[info] Mailbox
[info] Fifo
[info] FifoRelaxed
[warning] (HPPSwapchain) Image extent (0, 0) not supported. Selecting (1280, 720).
[warning] (HPPSwapchain) Surface format (Undefined, SrgbNonlinear) not supported. Selecting (B8G8R8A8Srgb, SrgbNonlinear).
[info] (HPPSwapchain) Image usage flags: TransferSrc ColorAttachment
[info] (HPPSwapchain) Present mode selected: Mailbox
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[error] -132400417 - VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049: Validation Error: [ VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049 ] Object 0: handle = 0x56259688e9f0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xf81bbadf | vkCmdBindDescriptorBuffersEXT(): Number of resource buffers is 2. There must be no more than maxResourceDescriptorBufferBindings (1) descriptor buffers containing resource descriptor data bound. The Vulkan spec states: There must be no more than VkPhysicalDeviceDescriptorBufferPropertiesEXT::maxResourceDescriptorBufferBindings descriptor buffers containing resource descriptor data bound (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049)
[error] -132400417 - VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049: Validation Error: [ VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049 ] Object 0: handle = 0x56259689bbd0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xf81bbadf | vkCmdBindDescriptorBuffersEXT(): Number of resource buffers is 2. There must be no more than maxResourceDescriptorBufferBindings (1) descriptor buffers containing resource descriptor data bound. The Vulkan spec states: There must be no more than VkPhysicalDeviceDescriptorBufferPropertiesEXT::maxResourceDescriptorBufferBindings descriptor buffers containing resource descriptor data bound (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049)
[error] -132400417 - VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049: Validation Error: [ VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049 ] Object 0: handle = 0x5625968a8db0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xf81bbadf | vkCmdBindDescriptorBuffersEXT(): Number of resource buffers is 2. There must be no more than maxResourceDescriptorBufferBindings (1) descriptor buffers containing resource descriptor data bound. The Vulkan spec states: There must be no more than VkPhysicalDeviceDescriptorBufferPropertiesEXT::maxResourceDescriptorBufferBindings descriptor buffers containing resource descriptor data bound (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049)
[error] -132400417 - VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049: Validation Error: [ VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049 ] Object 0: handle = 0x5625968b6030, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xf81bbadf | vkCmdBindDescriptorBuffersEXT(): Number of resource buffers is 2. There must be no more than maxResourceDescriptorBufferBindings (1) descriptor buffers containing resource descriptor data bound. The Vulkan spec states: There must be no more than VkPhysicalDeviceDescriptorBufferPropertiesEXT::maxResourceDescriptorBufferBindings descriptor buffers containing resource descriptor data bound (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049)
[error] -132400417 - VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049: Validation Error: [ VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049 ] Object 0: handle = 0x56259688e9f0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xf81bbadf | vkCmdBindDescriptorBuffersEXT(): Number of resource buffers is 2. There must be no more than maxResourceDescriptorBufferBindings (1) descriptor buffers containing resource descriptor data bound. The Vulkan spec states: There must be no more than VkPhysicalDeviceDescriptorBufferPropertiesEXT::maxResourceDescriptorBufferBindings descriptor buffers containing resource descriptor data bound (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049)
[error] -132400417 - VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049: Validation Error: [ VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049 ] Object 0: handle = 0x56259689bbd0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xf81bbadf | vkCmdBindDescriptorBuffersEXT(): Number of resource buffers is 2. There must be no more than maxResourceDescriptorBufferBindings (1) descriptor buffers containing resource descriptor data bound. The Vulkan spec states: There must be no more than VkPhysicalDeviceDescriptorBufferPropertiesEXT::maxResourceDescriptorBufferBindings descriptor buffers containing resource descriptor data bound (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049)
[error] -132400417 - VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049: Validation Error: [ VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049 ] Object 0: handle = 0x5625968a8db0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xf81bbadf | vkCmdBindDescriptorBuffersEXT(): Number of resource buffers is 2. There must be no more than maxResourceDescriptorBufferBindings (1) descriptor buffers containing resource descriptor data bound. The Vulkan spec states: There must be no more than VkPhysicalDeviceDescriptorBufferPropertiesEXT::maxResourceDescriptorBufferBindings descriptor buffers containing resource descriptor data bound (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049)
[error] -132400417 - VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049: Validation Error: [ VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049 ] Object 0: handle = 0x5625968b6030, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xf81bbadf | vkCmdBindDescriptorBuffersEXT(): Number of resource buffers is 2. There must be no more than maxResourceDescriptorBufferBindings (1) descriptor buffers containing resource descriptor data bound. The Vulkan spec states: There must be no more than VkPhysicalDeviceDescriptorBufferPropertiesEXT::maxResourceDescriptorBufferBindings descriptor buffers containing resource descriptor data bound (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049)
[warning] 1597479817 - UNASSIGNED-BestPractices-Error-Result: Validation Warning: [ UNASSIGNED-BestPractices-Error-Result ] Object 0: handle = 0x562594ac2e30, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x5f379b89 | vkQueueWaitIdle(): Returned error VK_ERROR_DEVICE_LOST.
[error] Detected Vulkan error: ERROR_DEVICE_LOST
Aborted (core dumped)

@SaschaWillems
Copy link
Collaborator

Thank you very much. So from the validation layer messages it looks like that Intel device only supports a single descriptor buffer binding, but the sample requires more.

Such a low limit makes me wonder why that device supports the extension after all.

But to sum it up: The sample in it's current state simply won't work on your Intel GPU.

@demensdeum
Copy link
Author

Ok thank you

@asuessenbach
Copy link
Contributor

We should add some startup-checks against maxResourceDescriptorBufferBindings to at least gracefully shutdown if there aren't enough.

@asuessenbach asuessenbach reopened this Jun 27, 2024
@SaschaWillems SaschaWillems self-assigned this Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants