Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue 126: fix vulkaninfo segfault on 1.0 devices
We didn't quite get the check on whether a format can be legally queried on a particular GPU quite right. We were checking against the instance version only. We need to check agains the driver's supported API version as well.
- Loading branch information
0140238
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Commit Broke Linux Vulkaninfo.. getting Segmentation Fault
ERROR: [Loader Message] Code 0 : /usr/lib/i386-linux-gnu/libvulkan_intel.so: wrong ELF class: ELFCLASS32
ERROR: [Loader Message] Code 0 : /usr/lib/i386-linux-gnu/libvulkan_radeon.so: wrong ELF class: ELFCLASS32
Xlib: extension "NV-GLX" missing on display ":0".
VULKANINFO
Vulkan Instance Version: 1.1.97
INTEL-MESA: warning: ../../../src/intel/vulkan/anv_device.c:1239: FINISHME: Implement pop-free point clipping
Instance Extensions:
Instance Extensions count = 17
VK_EXT_acquire_xlib_display : extension revision 1
VK_EXT_debug_report : extension revision 9
VK_EXT_debug_utils : extension revision 1
VK_EXT_direct_mode_display : extension revision 1
VK_EXT_display_surface_counter : extension revision 1
VK_KHR_device_group_creation : extension revision 1
VK_KHR_display : extension revision 21
VK_KHR_external_fence_capabilities : extension revision 1
VK_KHR_external_memory_capabilities : extension revision 1
VK_KHR_external_semaphore_capabilities: extension revision 1
VK_KHR_get_display_properties2 : extension revision 1
VK_KHR_get_physical_device_properties2: extension revision 1
VK_KHR_get_surface_capabilities2 : extension revision 1
VK_KHR_surface : extension revision 25
VK_KHR_wayland_surface : extension revision 6
VK_KHR_xcb_surface : extension revision 6
VK_KHR_xlib_surface : extension revision 6
Layers: count = 3
VK_LAYER_LUNARG_standard_validation (LunarG Standard Validation Layer) Vulkan version 1.0.77, layer version 1
Layer Extensions count = 0
Devices count = 1
GPU id : 0 (Intel(R) HD Graphics 630 (Kaby Lake GT2))
Layer-Device Extensions count = 0
VK_LAYER_VALVE_steam_overlay_32 (Steam Overlay Layer) Vulkan version 1.1.73, layer version 1
Layer Extensions count = 0
Devices count = 1
GPU id : 0 (Intel(R) HD Graphics 630 (Kaby Lake GT2))
Layer-Device Extensions count = 0
VK_LAYER_VALVE_steam_overlay_64 (Steam Overlay Layer) Vulkan version 1.1.73, layer version 1
Layer Extensions count = 0
Devices count = 1
GPU id : 0 (Intel(R) HD Graphics 630 (Kaby Lake GT2))
Layer-Device Extensions count = 0
Presentable Surfaces:
GPU id : 0 (Intel(R) HD Graphics 630 (Kaby Lake GT2))
Surface type : VK_KHR_xcb_surface
Formats: count = 2
B8G8R8A8_SRGB
B8G8R8A8_UNORM
Present Modes: count = 3
IMMEDIATE_KHR
MAILBOX_KHR
FIFO_KHR
VkSurfaceCapabilitiesKHR:
minImageCount = 2
maxImageCount = 0
currentExtent:
width = 256
height = 256
minImageExtent:
width = 256
height = 256
maxImageExtent:
width = 256
height = 256
maxImageArrayLayers = 1
supportedTransform:
VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
currentTransform:
VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
supportedCompositeAlpha:
VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR
VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR
supportedUsageFlags:
VK_IMAGE_USAGE_TRANSFER_SRC_BIT
VK_IMAGE_USAGE_TRANSFER_DST_BIT
VK_IMAGE_USAGE_SAMPLED_BIT
VK_IMAGE_USAGE_STORAGE_BIT
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
VkSurfaceCapabilities2EXT:
supportedSurfaceCounters:
None
GPU id : 0 (Intel(R) HD Graphics 630 (Kaby Lake GT2))
Surface type : VK_KHR_xlib_surface
Formats: count = 2
B8G8R8A8_SRGB
B8G8R8A8_UNORM
Present Modes: count = 3
IMMEDIATE_KHR
MAILBOX_KHR
FIFO_KHR
VkSurfaceCapabilitiesKHR:
minImageCount = 2
maxImageCount = 0
currentExtent:
width = 256
height = 256
minImageExtent:
width = 256
height = 256
maxImageExtent:
width = 256
height = 256
maxImageArrayLayers = 1
supportedTransform:
VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
currentTransform:
VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
supportedCompositeAlpha:
VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR
VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR
supportedUsageFlags:
VK_IMAGE_USAGE_TRANSFER_SRC_BIT
VK_IMAGE_USAGE_TRANSFER_DST_BIT
VK_IMAGE_USAGE_SAMPLED_BIT
VK_IMAGE_USAGE_STORAGE_BIT
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
VkSurfaceCapabilities2EXT:
supportedSurfaceCounters:
None
Groups :
Device Properties and Extensions :
GPU0
VkPhysicalDeviceProperties:
VkPhysicalDevicePointClippingProperties:
VkPhysicalDevicePushDescriptorProperties:
VkPhysicalDeviceMultiviewProperties:
VkPhysicalDeviceMaintenance3Properties:
VkPhysicalDeviceIDProperties:
VkPhysicalDeviceDriverProperties:
VkPhysicalDevicePCIBusInfoProperties
Device Extensions count = 45
VK_EXT_calibrated_timestamps : extension revision 1
VK_EXT_conditional_rendering : extension revision 1
VK_EXT_display_control : extension revision 1
VK_EXT_external_memory_dma_buf : extension revision 1
VK_EXT_global_priority : extension revision 1
VK_EXT_pci_bus_info : extension revision 2
VK_EXT_post_depth_coverage : extension revision 1
VK_EXT_sampler_filter_minmax : extension revision 1
VK_EXT_scalar_block_layout : extension revision 1
VK_EXT_shader_stencil_export : extension revision 1
VK_EXT_shader_viewport_index_layer : extension revision 1
VK_EXT_vertex_attribute_divisor : extension revision 3
VK_GOOGLE_decorate_string : extension revision 1
VK_GOOGLE_hlsl_functionality1 : extension revision 1
VK_KHR_16bit_storage : extension revision 1
VK_KHR_8bit_storage : extension revision 1
VK_KHR_bind_memory2 : extension revision 1
VK_KHR_create_renderpass2 : extension revision 1
VK_KHR_dedicated_allocation : extension revision 1
VK_KHR_depth_stencil_resolve : extension revision 1
VK_KHR_descriptor_update_template : extension revision 1
VK_KHR_device_group : extension revision 1
VK_KHR_draw_indirect_count : extension revision 1
VK_KHR_driver_properties : extension revision 1
VK_KHR_external_fence : extension revision 1
VK_KHR_external_fence_fd : extension revision 1
VK_KHR_external_memory : extension revision 1
VK_KHR_external_memory_fd : extension revision 1
VK_KHR_external_semaphore : extension revision 1
VK_KHR_external_semaphore_fd : extension revision 1
VK_KHR_get_memory_requirements2 : extension revision 1
VK_KHR_image_format_list : extension revision 1
VK_KHR_incremental_present : extension revision 1
VK_KHR_maintenance1 : extension revision 1
VK_KHR_maintenance2 : extension revision 1
VK_KHR_maintenance3 : extension revision 1
VK_KHR_multiview : extension revision 1
VK_KHR_push_descriptor : extension revision 1
VK_KHR_relaxed_block_layout : extension revision 1
VK_KHR_sampler_mirror_clamp_to_edge : extension revision 1
VK_KHR_sampler_ycbcr_conversion : extension revision 1
VK_KHR_shader_draw_parameters : extension revision 1
VK_KHR_storage_buffer_storage_class : extension revision 1
VK_KHR_swapchain : extension revision 68
VK_KHR_variable_pointers : extension revision 1
Segmentation fault (core dumped)
0140238
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @arunsivaramanneo -
Can you help me get more information on this segfault, please?
Please start with a clean debuggable build:
Then run in the debugger:
When the crash appears, get a backtrace:
and please post that here.
Thank you for your assistance!
0140238
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lunarpapillo below is the trace
Thread 1 "vulkaninfo" received signal SIGSEGV, Segmentation fault.
0x00007ffff7bb91ce in xcb_send_request_with_fds64 ()
from /usr/lib/x86_64-linux-gnu/libxcb.so.1
(gdb) bt
#0 0x00007ffff7bb91ce in xcb_send_request_with_fds64 ()
from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#1 0x00007ffff7bb9729 in xcb_send_request ()
from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2 0x00007ffff7bc8054 in xcb_query_extension ()
from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3 0x00007fffed771e8b in ?? ()
from /usr/lib/x86_64-linux-gnu/libvulkan_intel.so
#4 0x00007fffed77261a in ?? ()
from /usr/lib/x86_64-linux-gnu/libvulkan_intel.so
#5 0x00007ffff743c657 in terminator_GetPhysicalDeviceSurfaceSupportKHR (
physicalDevice=0x555555a2c5b0, queueFamilyIndex=0, surface=0x555555b3afc0,
pSupported=0x7fffffffda80)
at /home/neothenoone/Documents/Vulkan/Vulkan-Loader/loader/wsi.c:240
#6 0x00007ffff743c4c7 in vkGetPhysicalDeviceSurfaceSupportKHR (
physicalDevice=0x555555a2c710, queueFamilyIndex=0, surface=0x555555b3afc0,
pSupported=0x7fffffffda80)
at /home/neothenoone/Documents/Vulkan/Vulkan-Loader/loader/wsi.c:206
#7 0x000055555556609a in AppGpuDumpQueueProps ()
#8 0x0000555555567161 in AppGpuDump ()
#9 0x00005555555691c0 in main ()
(gdb)
0140238
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arunsivaramanneo Thanks for your help and rapid response.
The stack trace above seems to include a debuggable Vulkan-Loader, but not a debuggable
vulkaninfo
, as I would have expected to see line numbers and parameters forAppGpuDump()
andAppGpuDumpQueueProps()
. Could I ask you to ensure that you're using a clean debuggable build ofvulkaninfo
?Looking at the code change, the only affected code is in
FormatRangeSupported()
, which is only called fromAppDevDump()
, which is the last major function call fromAppGpuDump()
.But according to the stack trace, the crash is occurring in
AppGpuDumpQueueProps()
, which is also called fromAppGpuDump()
, but beforeAppDevDump()
is called.It would be very unusual for the changed code to be causing a crash even before it gets a chance to execute.
May I ask how you determined that this commit caused the failure? Were you able to do a
git bisect
to identify the code change decisively, or did you use another means to determine which code change was responsible?Thanks for your continued help...
0140238
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lunarpapillo Till this Commit vulkaninfo: shorten format dump in console, Vulkaninfo was working fine on my linux machine and i do pull the latest commits everyday. I thought it might be due to Vulkan-Headers or Vulkan-loader not updated but the Pull for both two showed that i had the latest version of Headers and loaders. I even did fresh installation of Vulkan-tools and still vulkaninfo is throwing an error.
0140238
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arunsivaramanneo
I'm trying to be certain, as this seems a confusing problem.
Can I ask you to try to build with the commit just before the last change, 927e74e, and make sure the problem doesn't also appear there?
I'm asking because I notice that commit 3a7c6a8 (two commits ago) introduced the call to
vkGetPhysicalDeviceSurfaceSupportKHR
that seems to appear in the crash backtrace.I want to make sure we're looking at the right commit if we're going to debug this problem.