-
Notifications
You must be signed in to change notification settings - Fork 441
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
Invalid queue handle on AMD GPUs using Mesa 23.3.3 and Mesa 24 #2465
Comments
Very strange. This would imply that when Vulkano calls |
It should be noted that we use OpenXR here, which is also giving us a queue handle (https://github.com/galister/wlx-overlay-s/blob/81168644166c270e43ae559b18799fd36375216b/src/graphics.rs#L254) |
It is definitely not correct to create more than one Vulkano object from the same handle! Vulkano objects will always assume that they are the sole owner of their handles, and will not take into account things that happen outside of their control. I did find a possible source of problems in Vulkano's current code, which I made #2466 for just now. Can you try out the Vulkano version in the PR and see if it fixes your issue? |
OpenXR is not giving us a queue handle, OpenXR is giving us a VkDevice handle, which we pass into It's the same way as index_camera_passthrough does it, though I'm not sure if it's correct at all. One notable mention from me is that not all users see a segfault, and those who see a segfault only see it on release builds. |
Building Adding the following to Cargo.toml:
|
I see that vulkano's |
If |
I see that the safety contract of I also see that you load the Vulkan library using both ash ( |
Thanks so much for taking the time! I've fixed both the double-library issue as well as DeviceCreateInfo, but we're still seeing the same behavior of segfault with |
If optimizations play a role, that generally smells like (Rust) UB. Most commonly a UAF. |
Did it work? It's a bit of a footgun that everything ash is |
Waiting for @Scrumplex to confirm. |
@marc0246 that seems to have done the trick. thanks for the truckful of wisdom, i am eternally grateful. |
That's great to hear! |
Ooo, ash converts |
Template
If you dont understand something just leave it.
If you can provide more detailed information than the template allows for, please ignore the template and present all of your findings.
main.rs
file that demonstrates the issue: TODOIssue
I and other users are experiencing segfaults when trying to run release builds of https://github.com/galister/wlx-overlay-s on AMD GPUs on Mesa 23.3.3 or Mesa 24.0.0.
Interestingly, it works fine with debug builds.
For Mesa 23.3.3 the segmentation fault occurs in
vk_common_QueueSubmit (_queue=0x0, submitCount=1, pSubmits=0x7ffffafd5ce0, fence=0x0) at ../src/vulkan/runtime/vk_synchronization2.c:294
(mesa source) which shows that the queue handle is apparently0x0
.After adding a simple debug message to wlx-overlay-s, we can confirm this difference in behavior between debug and release buids:
Debug:
Release with debug info:
Cargo.toml:
Backtrace for
cargo build --release
using stripped Mesa 23.3.3:The text was updated successfully, but these errors were encountered: