Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wgpu tests lock up on Linux/Intel XE #2070

Closed
kvark opened this issue Oct 14, 2021 · 1 comment
Closed

wgpu tests lock up on Linux/Intel XE #2070

kvark opened this issue Oct 14, 2021 · 1 comment
Labels
api: vulkan Issues with Vulkan external: driver-bug A driver is causing the bug, though we may still want to work around it

Comments

@kvark
Copy link
Member

kvark commented Oct 14, 2021

Description
There is a deadlock happening just by testing wgpu, 100%, on this platform.

Repro steps

  1. clone wgpu
  2. cargo test

Expected vs observed behavior
No locking allowed

Extra materials
Could be related to #1672

 1    Thread 0x7f697525b840 (LWP 21556) "wgpu_tests-b2fe" 0x00007f69753531e9 in syscall ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libc.so.6
  2    Thread 0x7f6975257640 (LWP 21557) "clear_texture::" 0x00007f6975577e12 in __lll_lock_wait ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libpthread.so.0
  3    Thread 0x7f6975056640 (LWP 21558) "clear_texture::" 0x00007f697557ad05 in __futex_abstimed_wait_common64 ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libpthread.so.0
  4    Thread 0x7f6974e55640 (LWP 21559) "clear_texture::" 0x00007f6975577e12 in __lll_lock_wait ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libpthread.so.0
  5    Thread 0x7f6974c4b640 (LWP 21560) "clear_texture::" 0x00007f6975577e12 in __lll_lock_wait ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libpthread.so.0
  6    Thread 0x7f6956126640 (LWP 21566) "wgpu_te:disk$0"  0x00007f697557ad05 in __futex_abstimed_wait_common64 ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libpthread.so.0
  7    Thread 0x7f6949b4d640 (LWP 21569) "wgpu_te:disk$0"  0x00007f697557ad05 in __futex_abstimed_wait_common64 ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libpthread.so.0
  8    Thread 0x7f694934c640 (LWP 21570) "wgpu_te:disk$0"  0x00007f697557ad05 in __futex_abstimed_wait_common64 ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libpthread.so.0
  9    Thread 0x7f6948b4b640 (LWP 21571) "wgpu_te:disk$0"  0x00007f697557ad05 in __futex_abstimed_wait_common64 ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libpthread.so.0
  10   Thread 0x7f6954ea2640 (LWP 21575) "clear_texture::" 0x00007f697534fb77 in ioctl ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libc.so.6
* 11   Thread 0x7f6931e3d640 (LWP 21577) "clear_texture::" 0x00007f697534fb77 in ioctl ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libc.so.6
  12   Thread 0x7f6930a48640 (LWP 21580) "clear_texture::" 0x00007f697534fb77 in ioctl ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libc.so.6
  13   Thread 0x7f691f63f640 (LWP 21581) "clear_texture::" 0x00007f697534fb77 in ioctl ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libc.so.6

First group is locked in vulkan-loader's vkDestroyDevice:

#0  0x00007f6975577e12 in __lll_lock_wait ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libpthread.so.0
#1  0x00007f6975570e81 in pthread_mutex_lock ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libpthread.so.0
#2  0x00007f697420e427 in vkDestroyDevice ()
   from /nix/store/izzhgrkqgaa3q5frm4b6i1ayrcffyyw4-vulkan-loader-1.2.182.0/lib/libvulkan.so.1
#3  0x0000563aee0f262d in ash::vk::features::DeviceFnV1_0::destroy_device (self=0x7f696c0e07c8, device=..., 
    p_allocator=0x0)
    at /home/kvark/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.33.3+1.2.191/src/vk/features.rs:3831
#4  0x0000563aee0fcf18 in ash::device::Device::destroy_device (self=0x7f696c0e07c0, allocation_callbacks=...)

The second group is locked in Intel implementation of VkDestroyDevice:

#0  0x00007f697557ad05 in __futex_abstimed_wait_common64 ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libpthread.so.0
#1  0x00007f6975570193 in __pthread_clockjoin_ex ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libpthread.so.0
#2  0x00007f695640f7dc in anv_queue_finish ()
   from /nix/store/dgixgl68gaicsc5i7wj2chbrjgc5rdvp-mesa-21.2.3-drivers/lib/libvulkan_intel.so
#3  0x00007f69563e824d in anv_DestroyDevice ()
   from /nix/store/dgixgl68gaicsc5i7wj2chbrjgc5rdvp-mesa-21.2.3-drivers/lib/libvulkan_intel.so
#4  0x00007f6974203412 in loader_layer_destroy_device ()
   from /nix/store/izzhgrkqgaa3q5frm4b6i1ayrcffyyw4-vulkan-loader-1.2.182.0/lib/libvulkan.so.1
#5  0x00007f697420e436 in vkDestroyDevice ()
   from /nix/store/izzhgrkqgaa3q5frm4b6i1ayrcffyyw4-vulkan-loader-1.2.182.0/lib/libvulkan.so.1

Another group is locked right at the thread startup?

[Switching to thread 11 (Thread 0x7f6931e3d640 (LWP 21577))]
#0  0x00007f697534fb77 in ioctl () from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libc.so.6
(gdb) bt
#0  0x00007f697534fb77 in ioctl () from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libc.so.6
#1  0x00007f69563d1120 in anv_gem_syncobj_timeline_wait ()
   from /nix/store/dgixgl68gaicsc5i7wj2chbrjgc5rdvp-mesa-21.2.3-drivers/lib/libvulkan_intel.so
#2  0x00007f695640f006 in anv_queue_task ()
   from /nix/store/dgixgl68gaicsc5i7wj2chbrjgc5rdvp-mesa-21.2.3-drivers/lib/libvulkan_intel.so
#3  0x00007f697556ed3e in start_thread ()
   from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libpthread.so.0
#4  0x00007f697535843f in clone () from /nix/store/mij848h2x5wiqkwhg027byvmf9x3gx7y-glibc-2.33-50/lib/libc.so.6

Platform

AdapterInfo { name: "Intel(R) Xe Graphics (TGL GT2)", vendor: 32902, device: 39497, device_type: IntegratedGpu, backend: Vulkan }

@kvark kvark added type: bug Something isn't working area: correctness We're behaving incorrectly labels Oct 14, 2021
@kvark
Copy link
Member Author

kvark commented Oct 15, 2021

Filed https://gitlab.freedesktop.org/mesa/mesa/-/issues/5508 upstream

@kvark kvark closed this as completed Jan 11, 2022
@teoxoy teoxoy added external: driver-bug A driver is causing the bug, though we may still want to work around it api: vulkan Issues with Vulkan and removed type: bug Something isn't working area: correctness We're behaving incorrectly labels Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: vulkan Issues with Vulkan external: driver-bug A driver is causing the bug, though we may still want to work around it
Projects
None yet
Development

No branches or pull requests

2 participants