Bug 2183567 - Vulkan validation layers causes runtime crash
Summary: Vulkan validation layers causes runtime crash
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: vulkan-validation-layers
Version: 38
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Dave Airlie
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-31 16:56 UTC by Ali
Modified: 2023-04-26 03:19 UTC (History)
5 users (show)

Fixed In Version: vulkan-validation-layers-1.3.243.0-1.fc38
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-04-26 03:19:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ali 2023-03-31 16:56:24 UTC
Description of problem:

Under Fedora 38 it doesn't seem like vulkan-validation-layers functions correctly. If validation layers are requested it will crash at runtime.

Version-Release number of selected component (if applicable):
vulkan-validation-layers-1.3.239.0-2.fc38

How reproducible:

Guaranteed to fail. If I compile out the code to enable validation layers my program runs like normal.

Steps to Reproduce:

1. Compile and execute a Vulkan program with validation layers (VK_LAYER_KHRONOS_validation) requested. I don't have a minimal reproducible example.

Actual results:
The program will crash with this error produced:
[ERROR: General]
/lib64/libVkLayer_khronos_validation.so: undefined symbol: _Z28LayerCreateMessengerCallbackP18_debug_report_databPK34VkDebugUtilsMessengerCreateInfoEXTPK21VkAllocationCallbacksPP26VkDebugUtilsMessengerEXT_T
ERROR:            /lib64/libVkLayer_khronos_validation.so: undefined symbol: _Z28LayerCreateMessengerCallbackP18_debug_report_databPK34VkDebugUtilsMessengerCreateInfoEXTPK21VkAllocationCallbacksPP26VkDebugUtilsMessengerEXT_T

Expected results:

A Vulkan program which runs and prints out validation layer issues like normal, as was the case in Fedora 37.

Additional info:

1) There's additional discussion here: https://old.reddit.com/r/vulkan/comments/1245kny/not_able_to_request_validation_layers_anymore/

A user in the comments suggested the following is at play.

"This looks like fedora is modifying the layer utils component of the validation layers as a dynamic library, when all of the upstream code has the layer utils component be a static library.

Looking at the Fedora 38 package for validation layers, seems like they are using the dynamic library. While the Fedora 39 has the 'fixed' version where layer utils is a static library

https://packages.fedoraproject.org/pkgs/vulkan-validation-layers/vulkan-validation-layers/ "

I don't see how or why the package loading as a dynamic or static library would affect things here, but I also don't know why this is not working in Fedora 38 when it does in Fedora 37 :).

2) I am not on Fedora 38 beta anymore, I had to restore from a backup due to some circumstances and time pressure.

Comment 1 Brett Ernst 2023-04-19 16:06:08 UTC
Just adding another data point: I'm experiencing the same issue on a couple of Fedora 38 machines as of today, one upgraded from beta and the other upgraded from 37 after the release of 38.

An easy way to reproduce the issue is to run most wlroots-based compositors using the Vulkan backend (no need to swap compositors, running nested also has the same effect). For example:

$ WLR_RENDERER=vulkan sway

00:00:00.021 [wlr] [../render/vulkan/vulkan.c:185] Could not create instance: ERROR_LAYER_NOT_PRESENT (-6)
00:00:00.021 [wlr] [../render/vulkan/renderer.c:1794] creating vulkan instance for renderer failed
00:00:00.021 [wlr] [../render/wlr_renderer.c:271] Failed to create a Vulkan renderer
00:00:00.021 [wlr] [../render/wlr_renderer.c:333] Could not initialize renderer
00:00:00.021 [../sway/server.c:79] Failed to create renderer

Running with VK_LOADER_DEBUG=all reveals the same undefined symbol error as the original reporter above.

Comment 2 evan 2023-04-19 16:50:29 UTC
Can confirm that I am getting the same error on my Vulkan applications after upgrading from Fedora 37 to Fedora 38.

Comment 3 Jim Blandy 2023-04-20 21:04:13 UTC
This is easily reproduced:

```
$ rpm -qf /usr/bin/vkcube
vulkan-tools-1.3.239.0-1.fc38.x86_64
$ /usr/bin/vkcube --validate
ERROR : GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
	/lib64/libVkLayer_khronos_validation.so: undefined symbol: _Z28LayerCreateMessengerCallbackP18_debug_report_databPK34VkDebugUtilsMessengerCreateInfoEXTPK21VkAllocationCallbacksPP26VkDebugUtilsMessengerEXT_T

	Objects - 1
		Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 0x5582167ec340

ERROR : GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
	Requested layer "VK_LAYER_KHRONOS_validation" failed to load!

	Objects - 1
		Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 0x5582167ec340

vkCreateInstance failed.

Do you have a compatible Vulkan installable client driver (ICD) installed?
Please look at the Getting Started guide for additional information.

```

Comment 4 Fedora Update System 2023-04-24 03:00:57 UTC
FEDORA-2023-21acc33784 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-21acc33784

Comment 5 Fedora Update System 2023-04-25 03:20:35 UTC
FEDORA-2023-21acc33784 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-21acc33784`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-21acc33784

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2023-04-26 03:19:54 UTC
FEDORA-2023-21acc33784 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.