Comments (6)
Went ahead and reverted it - should have done so last week when the issue was identified internally, as it was clear this is a major bug. The fix is not trivial do’s didn’t see a quick fix applied.
from vulkan-loader.
I know the exact problem as we are seeing it internally as well.
from vulkan-loader.
Thanks! We saw this last week too but we were hesitant about filing; we wanted to find a more crisp reproducer.
Good luck with the fix. We're not waiting on it.
from vulkan-loader.
Its a nasty case of "invalidated invariants are invariably infuriating".
The loader created quite a number of arrays based on the length of drivers, which was constant from vkCreateInstance to vkDestroyInstance, which meant the indices were stable. With unloading they are no longer stable, and thus the wrong elements or elements past the end were accessed.
Edit: forgot to mention but I'm removing the bug
tag as the bad code is reverted.
from vulkan-loader.
Is there still some bug lingering here, or possibly some other bad commit? I was running into app-level crashes, and as a debugging step I tried doing a simple "vulkaninfo" against the libvulkan provided by the ANGLE tree (which is currently pointing to commit 40633a6). It seems to be doing very strange things indeed:
(gdb) bt
#0 terminator_CreateWaylandSurfaceKHR (instance=0x5555557f9c00, pCreateInfo=0x55555586ce38,
pAllocator=0x5550002ad289, pSurface=0x5555557fa1a0)
at /usr/src/debug/vulkan-icd-loader/Vulkan-Loader-1.3.274/loader/wsi.c:722
#1 0x00007ffff7d14f7e in vkGetPhysicalDeviceFeatures2 (physicalDevice=0x5555557fa1a0,
pFeatures=0x55555586ce38)
at ../../third_party/vulkan-deps/vulkan-loader/src/loader/trampoline.c:2650
#2 0x000055555556c95d in AppGpu::AppGpu (this=<optimized out>, inst=..., id=<optimized out>,
phys_device=<optimized out>, this=<optimized out>, inst=..., id=<optimized out>,
phys_device=<optimized out>)
at /usr/src/debug/vulkan-tools/Vulkan-Tools-1.3.269/vulkaninfo/./vulkaninfo.h:1715
#3 0x0000555555565566 in main (argc=<optimized out>, argv=<optimized out>)
at /usr/src/debug/vulkan-tools/Vulkan-Tools-1.3.269/vulkaninfo/vulkaninfo.cpp:1177
(gdb) up
#1 0x00007ffff7d14f7e in vkGetPhysicalDeviceFeatures2 (physicalDevice=0x5555557fa1a0,
pFeatures=0x55555586ce38)
at ../../third_party/vulkan-deps/vulkan-loader/src/loader/trampoline.c:2650
2650 disp->GetPhysicalDeviceFeatures2KHR(unwrapped_phys_dev, pFeatures);
(gdb) p disp->GetPhysicalDeviceFeatures2KHR
$5 = (PFN_vkGetPhysicalDeviceFeatures2KHR) 0x7ffff7ea9570 <terminator_CreateWaylandSurfaceKHR>
How on earth did the pointer for GetPhysicalDeviceFeatures2KHR
end up pointing to terminator_CreateWaylandSurfaceKHR
?
That's not the only pointer that's clearly wrong, either:
(gdb) p *disp
$7 = {
GetPhysicalDeviceProcAddr = 0x0,
CreateInstance = 0x0,
DestroyInstance = 0x7ffff53b2c20 <device_select_DestroyInstance>,
EnumeratePhysicalDevices = 0x7ffff53b3120 <device_select_EnumeratePhysicalDevices>,
GetPhysicalDeviceFeatures = 0x7ffff7e8ecb0 <terminator_GetPhysicalDeviceFeatures>,
GetPhysicalDeviceFormatProperties = 0x7ffff7e8ece0 <terminator_GetPhysicalDeviceFormatProperties>,
GetPhysicalDeviceImageFormatProperties = 0x7ffff7e961e0 <terminator_GetPhysicalDeviceImageFormatProperties>,
GetPhysicalDeviceProperties = 0x7ffff7e8ec20 <terminator_GetPhysicalDeviceProperties>,
GetPhysicalDeviceQueueFamilyProperties = 0x7ffff7e8ec50 <terminator_GetPhysicalDeviceQueueFamilyProperties>,
GetPhysicalDeviceMemoryProperties = 0x7ffff7e8ec80 <terminator_GetPhysicalDeviceMemoryProperties>,
GetInstanceProcAddr = 0x7ffff53b2800 <get_instance_proc_addr>,
CreateDevice = 0x0,
EnumerateInstanceExtensionProperties = 0x0,
EnumerateDeviceExtensionProperties = 0x7ffff7e948e0 <terminator_EnumerateDeviceExtensionProperties>,
EnumerateInstanceLayerProperties = 0x0,
EnumerateDeviceLayerProperties = 0x7ffff7e96240 <terminator_EnumerateDeviceLayerProperties>,
GetPhysicalDeviceSparseImageFormatProperties = 0x7ffff7e8ed10 <terminator_GetPhysicalDeviceSparseImageFormatProperties>,
EnumerateInstanceVersion = 0x0,
EnumeratePhysicalDeviceGroups = 0x7ffff53b28e0 <device_select_EnumeratePhysicalDeviceGroups>,
GetPhysicalDeviceFeatures2 = 0x7ffff7e96270 <terminator_GetPhysicalDeviceFeatures2>,
GetPhysicalDeviceProperties2 = 0x7ffff7e96380 <terminator_GetPhysicalDeviceProperties2>,
GetPhysicalDeviceFormatProperties2 = 0x7ffff7e964d0 <terminator_GetPhysicalDeviceFormatProperties2>,
GetPhysicalDeviceImageFormatProperties2 = 0x7ffff7e965d0 <terminator_GetPhysicalDeviceImageFormatProperties2>,
GetPhysicalDeviceQueueFamilyProperties2 = 0x7ffff7e966d0 <terminator_GetPhysicalDeviceQueueFamilyProperties2>,
GetPhysicalDeviceMemoryProperties2 = 0x7ffff7e968b0 <terminator_GetPhysicalDeviceMemoryProperties2>,
GetPhysicalDeviceSparseImageFormatProperties2 = 0x7ffff7e96980 <terminator_GetPhysicalDeviceSparseImageFormatProperties2>,
GetPhysicalDeviceExternalBufferProperties = 0x7ffff7e96bc0 <terminator_GetPhysicalDeviceExternalBufferProperties>,
GetPhysicalDeviceExternalFenceProperties = 0x7ffff7e96e00 <terminator_GetPhysicalDeviceExternalFenceProperties>,
GetPhysicalDeviceExternalSemaphoreProperties = 0x7ffff7e96ce0 <terminator_GetPhysicalDeviceExternalSemaphoreProperties>,
GetPhysicalDeviceToolProperties = 0x7ffff7e96f20 <terminator_GetPhysicalDeviceToolProperties>,
DestroySurfaceKHR = 0x7ffff7ea5720 <terminator_DestroySurfaceKHR>,
GetPhysicalDeviceSurfaceSupportKHR = 0x7ffff7ea9190 <terminator_GetPhysicalDeviceSurfaceSupportKHR>,
GetPhysicalDeviceSurfaceCapabilitiesKHR = 0x7ffff7ea9260 <terminator_GetPhysicalDeviceSurfaceCapabilitiesKHR>,
GetPhysicalDeviceSurfaceFormatsKHR = 0x7ffff7ea9340 <terminator_GetPhysicalDeviceSurfaceFormatsKHR>,
GetPhysicalDeviceSurfacePresentModesKHR = 0x7ffff7ea9410 <terminator_GetPhysicalDeviceSurfacePresentModesKHR>,
GetPhysicalDevicePresentRectanglesKHR = 0x7ffff7eaa4f0 <terminator_GetPhysicalDevicePresentRectanglesKHR>,
GetPhysicalDeviceDisplayPropertiesKHR = 0x7ffff7ea9f80 <terminator_GetPhysicalDeviceDisplayPropertiesKHR>,
GetPhysicalDeviceDisplayPlanePropertiesKHR = 0x7ffff7eaa000 <terminator_GetPhysicalDeviceDisplayPlanePropertiesKHR>,
GetDisplayPlaneSupportedDisplaysKHR = 0x7ffff7eaa080 <terminator_GetDisplayPlaneSupportedDisplaysKHR>,
GetDisplayModePropertiesKHR = 0x7ffff7eaa100 <terminator_GetDisplayModePropertiesKHR>,
CreateDisplayModeKHR = 0x7ffff7eaa180 <terminator_CreateDisplayModeKHR>,
GetDisplayPlaneCapabilitiesKHR = 0x7ffff7eaa200 <terminator_GetDisplayPlaneCapabilitiesKHR>,
CreateDisplayPlaneSurfaceKHR = 0x7ffff7eaa290 <terminator_CreateDisplayPlaneSurfaceKHR>,
CreateXcbSurfaceKHR = 0x7ffff7ea9ab0 <terminator_CreateXlibSurfaceKHR>,
GetPhysicalDeviceXcbPresentationSupportKHR = 0x7ffff7ea9ce0 <terminator_GetPhysicalDeviceXlibPresentationSupportKHR>,
GetPhysicalDeviceVideoCapabilitiesKHR = 0x7ffff7ea9810 <terminator_CreateXcbSurfaceKHR>,
GetPhysicalDeviceVideoFormatPropertiesKHR = 0x7ffff7ea9a40 <terminator_GetPhysicalDeviceXcbPresentationSupportKHR>,
GetPhysicalDeviceFeatures2KHR = 0x7ffff7ea9570 <terminator_CreateWaylandSurfaceKHR>,
GetPhysicalDeviceProperties2KHR = 0x7ffff7ea97a0 <terminator_GetPhysicalDeviceWaylandPresentationSupportKHR>,
GetPhysicalDeviceFormatProperties2KHR = 0x7ffff7e7ad20 <terminator_GetPhysicalDeviceVideoCapabilitiesKHR>,
GetPhysicalDeviceImageFormatProperties2KHR = 0x7ffff7e7ad60 <terminator_GetPhysicalDeviceVideoFormatPropertiesKHR>,
GetPhysicalDeviceQueueFamilyProperties2KHR = 0x7ffff7e96270 <terminator_GetPhysicalDeviceFeatures2>,
GetPhysicalDeviceMemoryProperties2KHR = 0x7ffff7e96380 <terminator_GetPhysicalDeviceProperties2>,
GetPhysicalDeviceSparseImageFormatProperties2KHR = 0x7ffff7e964d0 <terminator_GetPhysicalDeviceFormatProperties2>,
EnumeratePhysicalDeviceGroupsKHR = 0x7ffff7e965d0 <terminator_GetPhysicalDeviceImageFormatProperties2>,
GetPhysicalDeviceExternalBufferPropertiesKHR = 0x7ffff7e966d0 <terminator_GetPhysicalDeviceQueueFamilyProperties2>,
GetPhysicalDeviceExternalSemaphorePropertiesKHR = 0x7ffff7e968b0 <terminator_GetPhysicalDeviceMemoryProperties2>,
GetPhysicalDeviceExternalFencePropertiesKHR = 0x7ffff7e96980 <terminator_GetPhysicalDeviceSparseImageFormatProperties2>,
EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = 0x7ffff7e95470 <terminator_EnumeratePhysicalDeviceGroups>,
GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = 0x7ffff7e96bc0 <terminator_GetPhysicalDeviceExternalBufferProperties>,
GetPhysicalDeviceSurfaceCapabilities2KHR = 0x7ffff7e96ce0 <terminator_GetPhysicalDeviceExternalSemaphoreProperties>,
GetPhysicalDeviceSurfaceFormats2KHR = 0x7ffff7e96e00 <terminator_GetPhysicalDeviceExternalFenceProperties>,
GetPhysicalDeviceDisplayProperties2KHR = 0x7ffff7e7ada0 <terminator_EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR>,
GetPhysicalDeviceDisplayPlaneProperties2KHR = 0x7ffff7e7ade0 <terminator_GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR>,
GetDisplayModeProperties2KHR = 0x7ffff7eaaaf0 <terminator_GetPhysicalDeviceSurfaceCapabilities2KHR>,
GetDisplayPlaneCapabilities2KHR = 0x7ffff7eaad20 <terminator_GetPhysicalDeviceSurfaceFormats2KHR>,
GetPhysicalDeviceFragmentShadingRatesKHR = 0x7ffff7eaa570 <terminator_GetPhysicalDeviceDisplayProperties2KHR>,
GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR = 0x7ffff7eaa710 <terminator_GetPhysicalDeviceDisplayPlaneProperties2KHR>,
GetPhysicalDeviceCooperativeMatrixPropertiesKHR = 0x7ffff7eaa890 <terminator_GetDisplayModeProperties2KHR>,
GetPhysicalDeviceCalibrateableTimeDomainsKHR = 0x7ffff7eaaa30 <terminator_GetDisplayPlaneCapabilities2KHR>,
CreateDebugReportCallbackEXT = 0x7ffff7e7ae20 <terminator_GetPhysicalDeviceFragmentShadingRatesKHR>,
DestroyDebugReportCallbackEXT = 0x7ffff7e7ae60 <terminator_GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR>,
DebugReportMessageEXT = 0x7ffff7e7aea0 <terminator_GetPhysicalDeviceCooperativeMatrixPropertiesKHR>,
GetPhysicalDeviceExternalImageFormatPropertiesNV = 0x7ffff7e7aee0 <terminator_GetPhysicalDeviceCalibrateableTimeDomainsKHR>,
ReleaseDisplayEXT = 0x7ffff7e723d0 <terminator_CreateDebugReportCallbackEXT>,
GetPhysicalDeviceSurfaceCapabilities2EXT = 0x7ffff7e71ac0 <terminator_DestroyDebugReportCallbackEXT>,
CreateDebugUtilsMessengerEXT = 0x7ffff7e72af0 <terminator_DebugReportMessageEXT>,
DestroyDebugUtilsMessengerEXT = 0x7ffff7e71880 <terminator_GetPhysicalDeviceExternalImageFormatPropertiesNV>,
SubmitDebugUtilsMessageEXT = 0x7ffff7e7a520 <terminator_ReleaseDisplayEXT>,
GetPhysicalDeviceMultisamplePropertiesEXT = 0x7ffff7e7a560 <terminator_AcquireXlibDisplayEXT>,
GetPhysicalDeviceCalibrateableTimeDomainsEXT = 0x7ffff7e7a5b0 <terminator_GetRandROutputDisplayEXT>,
GetPhysicalDeviceToolPropertiesEXT = 0x7ffff7e7a3e0 <terminator_GetPhysicalDeviceSurfaceCapabilities2EXT>,
GetPhysicalDeviceCooperativeMatrixPropertiesNV = 0x7ffff7e72140 <terminator_CreateDebugUtilsMessengerEXT>,
GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = 0x7ffff7e71900 <terminator_DestroyDebugUtilsMessengerEXT>,
CreateHeadlessSurfaceEXT = 0x7ffff7e78dc0 <terminator_SubmitDebugUtilsMessageEXT>,
AcquireDrmDisplayEXT = 0x7ffff7e7af20 <terminator_GetPhysicalDeviceMultisamplePropertiesEXT>,
GetDrmDisplayEXT = 0x7ffff7e7af60 <terminator_GetPhysicalDeviceCalibrateableTimeDomainsEXT>,
GetPhysicalDeviceOpticalFlowImageFormatsNV = 0x7ffff7e77380 <terminator_GetPhysicalDeviceToolPropertiesEXT>
}
from vulkan-loader.
Is there still some bug lingering here, or possibly some other bad commit?
Actually, nevermind. It seems something was loading /usr/lib/libvulkan.so (ignoring LD_LIBRARY_PATH) and so it ended up having two different vulkan loader libraries in the process with different dispatch tables.
from vulkan-loader.
Related Issues (20)
- Need to check Fuzzing result HOT 2
- Remove -fno-strict-aliasing HOT 2
- Unsupported extensions are returned by vkEnumerateInstanceExtensionProperties HOT 7
- `unknown_ext_chain_gas_aarch64.S` does not support PAC/BTI HOT 1
- VK_LAYER_PATH equivalent for implicit layers HOT 2
- Remove vulkan-framework
- Log the origin of the manifest search paths (system, env-var, settings file, etc)
- clang-cl arguments are being passed to clang on Windows HOT 2
- VK_LOADER_DEBUG should report actual library loaded, not library attempted HOT 2
- Vulkan-ICD-Loader update causes all games to crash HOT 3
- Build failing on 32 bit Windows because of some pointer-to-integer size mismatch HOT 6
- dEQP-VK.api.object_management.multithreaded_per_thread_resources.device_group crash HOT 8
- Add support for env variables inside JSON manifests HOT 4
- vkGetInstanceProcAddr returns non-NULL for unsupported functions HOT 17
- Can a VK_ extension be disabled with env vars? HOT 7
- allow GAS on MinGW HOT 2
- Vulkan HOT 2
- Unable to build Vulkan Loader from source HOT 4
- Downstream packaging best practices in combination with Vulkan-Headers HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vulkan-loader.