Summary
If a second Vulkan instance creates its own Wayland surface and swapchain, then is torn down, subsequent WSI calls made by the first instance (vkAcquireNextImageKHR
or vkQueuePresentKHR
) seg-fault inside libnvidia-glcore.so
. If the second instance never creates a swapchain, the first instance keeps working, so the trigger appears to be driver cleanup of Wayland-swapchain resources that are shared across instances.
Environment:
- Operating System: Linux (Wayland session)
- GPU: Nvidia GPU
- Affected Nvidia Drivers:
570.144
,575.51.02
(crash observed withinlibnvidia-glcore.so
) - Potentially others. - Windowing System: Wayland
- API: Vulkan
- Language/Bindings: Rust with
ash
(Vulkan bindings) andwinit
(windowing, using Wayland backend)
Reproduction steps
- Instance A
• Createwinit
window A → Wayland surface A
• Create Vulkan instance, device, swapchain A, etc. - Instance B
• Createwinit
window B → Wayland surface B
• Create separate Vulkan instance, device, swapchain B (+ image views, semaphores). - Tear down instance B
- Resume rendering with instance A and call
• driver 575.* →vkAcquireNextImageKHR
→ seg-fault
• driver 570.* →vkQueuePresentKHR
→ seg-fault
Minimal Reproducible Examples (MREs):
The following Rust code examples demonstrate the issue. Both examples likely trigger the same underlying driver bug, but it manifests in different WSI functions depending on the driver version.
MRE 1: Demonstrates Crash in vkAcquireNextImageKHR
(Observed on Nvidia Driver 575.51.02
)
MRE 2: Demonstrates Crash in vkQueuePresentKHR
(Observed on Nvidia Driver 570.144
)
Working Variation / Workaround (Avoids Segfault)
Dependencies (Cargo.toml
) are the same for every MRE.
MRE.zip (13.2 KB)