Linux: vkQueuePresentKHR segmentation fault on VK_EXT_acquire_xlib_display swapchain

Not sure if this is the right subforum, feel free to move it.

In Monado we use VK_EXT_acquire_xlib_display to get a surface, create a swapchain etc. for implementing direct mode for VR.

Relevant code

This works fine up to (including) nvidia 450. With 460, 465 and 470 we get a crash in vkQueuePresentKHR.

0x00007fffcaea9e13 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.470.63.01
(gdb) bt
#0  0x00007fffcaea9e13 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.470.63.01
#1  0x00007fffcb1538f4 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.470.63.01
#2  0x00007fffcb0c1dcd in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.470.63.01
#3  0x00007fffcb0be453 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.470.63.01
#4  0x00007fffcb0bce64 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.470.63.01
#5  0x00007fffcb198953 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.470.63.01
#6  0x00007fffd08b61ef in ?? () from /lib/x86_64-linux-gnu/libGLX_nvidia.so.0
#7  0x000055555558b891 in comp_target_swapchain_present (ct=0x555555c41480, queue=0x555555f0aab8, index=1, semaphore=0x5555560949a8, desired_present_time_ns=2539303895346, present_slop_ns=500000) at ../src/xrt/compositor/main/comp_target_swapchain.c:317
#8  0x00005555555853fc in comp_target_present (ct=0x555555c41480, queue=0x555555f0aab8, index=1, semaphore=0x5555560949a8, desired_present_time_ns=2539303895346, present_slop_ns=500000) at ../src/xrt/compositor/main/comp_target.h:327
#9  0x000055555558704e in renderer_present_swapchain_image (r=0x555556094e40, desired_present_time_ns=2539303895346, present_slop_ns=500000) at ../src/xrt/compositor/main/comp_renderer.c:659
#10 0x0000555555588975 in comp_renderer_draw (r=0x555556094e40) at ../src/xrt/compositor/main/comp_renderer.c:1124
#11 0x0000555555581f2f in compositor_layer_commit (xc=0x555555a99610, frame_id=6, sync_handle=-1) at ../src/xrt/compositor/main/comp_compositor.c:502
#12 0x00005555555924b5 in xrt_comp_layer_commit (xc=0x555555a99610, frame_id=6, sync_handle=-1) at ../src/xrt/include/xrt/xrt_compositor.h:1201
#13 0x000055555559378e in multi_main_loop (msc=0x5555561253a0) at ../src/xrt/compositor/multi/comp_multi_system.c:391
#14 0x00005555555937fd in thread_func (ptr=0x5555561253a0) at ../src/xrt/compositor/multi/comp_multi_system.c:405
#15 0x00007ffff7f83609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#16 0x00007ffff7279293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

However the same driver works with SteamVR’s direct mode, so it can’t be completely broken, it must be something Monado does or does not do.

Presenting to an xcb window works fine with those driver versions and a very similar code path, only presenting on the direct mode swapchain crashes.

Is there any way to get at least debug symbols on linux?

Downstream issue: direct mode on nvidia 460, 465, 470 segmentation fault (#122) · Issues · Monado / Monado · GitLab