KhronosGroup/Vulkan-Loader

Segmentation fault at `loader_icd_destroy` on linux

Closed this issue · 3 comments

Describe the bug

Program received signal SIGSEGV, Segmentation fault.
___pthread_mutex_lock (mutex=0x200) at ./nptl/pthread_mutex_lock.c:80
80	./nptl/pthread_mutex_lock.c: No such file or directory.
(gdb) bt
#0  ___pthread_mutex_lock (mutex=0x200) at ./nptl/pthread_mutex_lock.c:80
#1  0x00007fffe5861bdd in ?? () from /usr/lib/x86_64-linux-gnu/libvulkan_radeon.so
#2  0x00007fffe57aecfb in ?? () from /usr/lib/x86_64-linux-gnu/libvulkan_radeon.so
#3  0x00007ffff74bad2c in loader_icd_destroy (ptr_inst=0xedc008f5800, icd_term=0xedc00129400, pAllocator=0xedc008f6bd8) at ../../third_party/vulkan-deps/vulkan-loader/src/loader/loader.c:1376
#4  0x00007ffff74c927c in unload_drivers_without_physical_devices (inst=0xedc008f5800) at ../../third_party/vulkan-deps/vulkan-loader/src/loader/loader.c:6482
#5  0x00007ffff74d39c3 in vkEnumeratePhysicalDevices (instance=0xedc008f5800, pPhysicalDeviceCount=0x7fffffffce14, pPhysicalDevices=0xedc00a07f90)
    at ../../third_party/vulkan-deps/vulkan-loader/src/loader/trampoline.c:911

// starting of client program stack

Environment (please complete the following information):

  • OS: Linux ubuntu
  • Bitdepth: 64
  • GPU: Nvidia Quadro P1000
  • Graphics Driver: Nvidia, DRIVER_VERSION=525.147.05
  • vulkaninfo:
Layers: count = 4
=================
VK_LAYER_INTEL_nullhw (INTEL NULL HW) Vulkan version 1.1.73, layer version 1:
	Layer Extensions: count = 0
	Devices: count = 2
		GPU id = 0 (Quadro P1000)
		Layer-Device Extensions: count = 0

		GPU id = 1 (llvmpipe (LLVM 17.0.6, 256 bits))
		Layer-Device Extensions: count = 0

VK_LAYER_MESA_device_select (Linux device selection layer) Vulkan version 1.3.211, layer version 1:
	Layer Extensions: count = 0
	Devices: count = 2
		GPU id = 0 (Quadro P1000)
		Layer-Device Extensions: count = 0

		GPU id = 1 (llvmpipe (LLVM 17.0.6, 256 bits))
		Layer-Device Extensions: count = 0

VK_LAYER_MESA_overlay (Mesa Overlay layer) Vulkan version 1.3.211, layer version 1:
	Layer Extensions: count = 0
	Devices: count = 2
		GPU id = 0 (Quadro P1000)
		Layer-Device Extensions: count = 0

		GPU id = 1 (llvmpipe (LLVM 17.0.6, 256 bits))
		Layer-Device Extensions: count = 0

VK_LAYER_NV_optimus (NVIDIA Optimus layer) Vulkan version 1.3.224, layer version 1:
	Layer Extensions: count = 0
	Devices: count = 2
		GPU id = 0 (Quadro P1000)
		Layer-Device Extensions: count = 0

		GPU id = 1 (llvmpipe (LLVM 17.0.6, 256 bits))
		Layer-Device Extensions: count = 0

To Reproduce
Steps to reproduce the behavior:
I build and ran dawn_end2end_tests from dawn and encounterred this. (I don't think you really need to config and build this repo though)

The likely culprit is based on bisect: a8710bb

@shrekshao Please build on main and let me know if the issue persists. This looks the same issue that was fixed in #1481

Great! Thanks for being quick on trying out the fix.