#1003124 Segmentation fault when querying surface Segmentation fault querying physical device surface support for remote display

Package:
mesa-vulkan-drivers
Source:
mesa
Description:
Mesa Vulkan graphics drivers
Submitter:
Simon Richter
Date:
2026-01-10 11:39:20 UTC
Severity:
minor
Tags:
#1003124#5
Date:
2022-01-04 15:02:27 UTC
From:
To:
Hi,

I'm calling a Vulkan application over an SSH connection with X11
forwarding enabled, so the application can see a local GPU and a remote
display that do not belong together.

The application is trying to find out whether the physical device it has
found can be used to present to the X11 surface it has created earlier;
the answer should probably be "no" so the application can think of an
appropriate fallback mechanism here.

Instead, I get

==11685== Invalid read of size 4
==11685==    at 0x55E22BC: UnknownInlinedFun (wsi_common_x11.c:174)
==11685==    by 0x55E22BC: wsi_x11_get_connection (wsi_common_x11.c:244)
==11685==    by 0x55E27F0: x11_surface_get_support (wsi_common_x11.c:431)
==11685==    by 0x145B1FCF: vulkan_layer_chassis::GetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice_T*, unsigned int, VkSurfaceKHR_T*, unsigned int*) (chassis.cpp:4680)
==11685==    by 0x109A04: vulkan_setup (vulkan_setup.c:235)
==11685==    by 0x109319: main (vkload.c:27)
==11685==  Address 0x8 is not stack'd, malloc'd or (recently) free'd

This happens during the version check for the DRI3 extension, which is
present on the remote X server -- for an unknown reason, xcb returns a
NULL pointer from xcb_dri3_query_version_reply.

The program I'm using is a modified version of what I think is the
correct way to test the setup. I've pulled the search for a queue with
present support to the front, before the surface capability check, which
crashes the nV driver.

The modified version of the program is attached. It would generate an
invalid setup later (because the initialisation order of a bunch of
variables is swapped), but doesn't get that far, so this is a separate
bug from #1003116.

This might also be a bug in libxcb as there is no good reason to return
NULL here, but Mesa might also profit from some error handling.

The Xorg log is from the last local session, the X server is not
currently running, but the GPU is available for compute workloads at
least and "env -u DISPLAY vulkaninfo" shows both the GTX980 and the
llvmpipe drivers, neither with surface support.

   Simon

#1003124#10
Date:
2022-01-04 15:18:36 UTC
From:
To:
Hi,

the missing example code is attached here.

   Simon

#1003124#15
Date:
2026-01-10 10:08:08 UTC
From:
To:
Es gibt eine Familienspende in Höhe von 1.850.000,00 USD von Cheng Charlie
Saephan. Bitte antworten Sie für weitere Informationen. Denken Sie daran,
Ihrer Familie und den Bedürftigen in Ihrer Umgebung Gutes zu tun.

Dies ist bereits der zweite Versuch, Sie zu erreichen. Bitte antworten Sie
für weitere Details.