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

Unable to load get_semaphore_counter_value #3172

Closed
NiklasEi opened this issue Nov 22, 2021 · 11 comments
Closed

Unable to load get_semaphore_counter_value #3172

NiklasEi opened this issue Nov 22, 2021 · 11 comments
Labels
A-Rendering Drawing game state to the screen P-Crash A sudden unexpected crash

Comments

@NiklasEi
Copy link
Member

NiklasEi commented Nov 22, 2021

Bevy version

Broken from commit 213839f onwards

Operating system & version

Ubuntu 18.04

What you did

Ran an example (e.g. bevymark_pipelined, bevymark, or sprite)

What you expected to happen

The example to run

What actually happened

The example crashed

Additional information

Nov 22 19:34:49.448  INFO winit::platform_impl::platform::x11::window: Guessed window scale factor: 1    
Nov 22 19:34:49.486  INFO bevy_render2::renderer: AdapterInfo { name: "Intel(R) UHD Graphics 630 (CFL GT2)", vendor: 32902, device: 16027, device_type: IntegratedGpu, backend: Vulkan }
thread 'main' panicked at 'Unable to load get_semaphore_counter_value', /home/niklas/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/ash-0.33.3+1.2.191/src/vk/features.rs:6307:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'Unable to load wait_semaphores', /home/niklas/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/ash-0.33.3+1.2.191/src/vk/features.rs:6328:21
stack backtrace:
thread 'IO Task Pool (3)' panicked at 'failed to join thread: Resource deadlock avoided (os error 35)', library/std/src/sys/unix/thread.rs:244:13
   0:     0x56354098dc3c - std::backtrace_rs::backtrace::libunwind::trace::h3fea1eb2e0ba2ac9
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x56354098dc3c - std::backtrace_rs::backtrace::trace_unsynchronized::h849d83492cbc0d59
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x56354098dc3c - std::sys_common::backtrace::_print_fmt::he3179d37290f23d3
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x56354098dc3c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h140f6925cad14324
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x5635409b14bc - core::fmt::write::h31b9cd1bedd7ea38
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/fmt/mod.rs:1150:17
   5:     0x56354098aad5 - std::io::Write::write_fmt::h1fdf66f83f70913e
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/io/mod.rs:1667:15
   6:     0x56354098f850 - std::sys_common::backtrace::_print::he7ac492cd19c3189
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x56354098f850 - std::sys_common::backtrace::print::hba20f8920229d8e8
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x56354098f850 - std::panicking::default_hook::{{closure}}::h714d63979ae18678
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:210:50
   9:     0x56354098f407 - std::panicking::default_hook::hf1afb64e69563ca8
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:227:9
  10:     0x56354098ff04 - std::panicking::rust_panic_with_hook::h02231a501e274a13
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:624:17
  11:     0x56353fc9cb22 - std::panicking::begin_panic::{{closure}}::h4e70399d31e76c56
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:544:9
  12:     0x56353fc9c939 - std::sys_common::backtrace::__rust_end_short_backtrace::hd397ecc9d94800ba
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/sys_common/backtrace.rs:141:18
  13:     0x56353fc9ca63 - std::panicking::begin_panic::h9f7f18fd74fbbe85
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:543:12
  14:     0x56353fc97cce - ash::vk::features::DeviceFnV1_2::load::wait_semaphores::h516dfd2630ccacce
                               at /home/niklas/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/ash-0.33.3+1.2.191/src/vk/features.rs:6328:21
  15:     0x56353fc97f22 - ash::vk::features::DeviceFnV1_2::wait_semaphores::hf40d380396d0fcdc
                               at /home/niklas/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/ash-0.33.3+1.2.191/src/vk/features.rs:6518:9
  16:     0x56353fc79c90 - ash::device::Device::wait_semaphores::hf77fbd6f0f3db435
                               at /home/niklas/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/ash-0.33.3+1.2.191/src/device.rs:167:9
  17:     0x56353fb1c8a2 - wgpu_hal::vulkan::device::<impl wgpu_hal::Device<wgpu_hal::vulkan::Api> for wgpu_hal::vulkan::Device>::wait::h4b63cefb70dc7f1c
                               at /home/niklas/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/wgpu-hal-0.11.4/src/vulkan/device.rs:1677:25
  18:     0x56353f94e0c9 - wgpu_core::device::Device<A>::prepare_to_die::ha95824285fe390c6
                               at /home/niklas/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/wgpu-core-0.11.2/src/device/mod.rs:2552:38
  19:     0x56353f717fb1 - wgpu_core::hub::Hub<A,F>::clear::h00e65ee51807cd51
                               at /home/niklas/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/wgpu-core-0.11.2/src/hub.rs:617:17
  20:     0x56353f711e42 - <wgpu_core::hub::Global<G> as core::ops::drop::Drop>::drop::h3d1bf3759503192b
                               at /home/niklas/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/wgpu-core-0.11.2/src/hub.rs:907:13
  21:     0x56353f9447b7 - core::ptr::drop_in_place<wgpu_core::hub::Global<wgpu_core::hub::IdentityManagerFactory>>::h094241a01da4a9c7
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  22:     0x56353f93e554 - core::ptr::drop_in_place<wgpu::backend::direct::Context>::h622f07b8f2576e19
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  23:     0x56353f7d17f4 - alloc::sync::Arc<T>::drop_slow::h1319239d3b4d4467
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/alloc/src/sync.rs:1065:18
  24:     0x56353f7d20b3 - <alloc::sync::Arc<T> as core::ops::drop::Drop>::drop::h62b650467dfd7f8e
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/alloc/src/sync.rs:1625:13
  25:     0x56353f9415fb - core::ptr::drop_in_place<alloc::sync::Arc<wgpu::backend::direct::Context>>::h1a6f5c588ebc025e
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  26:     0x56353f5c7ed4 - core::ptr::drop_in_place<wgpu::TextureView>::hac98824d410913f7
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  27:     0x56353f58bab4 - alloc::sync::Arc<T>::drop_slow::h0c338dc7ae1f1df6
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/alloc/src/sync.rs:1065:18
  28:     0x56353f5cdd33 - <alloc::sync::Arc<T> as core::ops::drop::Drop>::drop::h6eb1f9a699067596
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/alloc/src/sync.rs:1625:13
  29:     0x56353f5c95eb - core::ptr::drop_in_place<alloc::sync::Arc<wgpu::TextureView>>::h238c626d7fe0e4f4
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  30:     0x56353f5cb4d3 - core::ptr::drop_in_place<bevy_render2::render_resource::texture::TextureViewValue>::h3352b0fafeff27f0
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  31:     0x56353f5cab8b - core::ptr::drop_in_place<bevy_render2::render_resource::texture::TextureView>::h0d1e64d552979126
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  32:     0x56353f5c1dba - core::ptr::drop_in_place<core::option::Option<bevy_render2::render_resource::texture::TextureView>>::ha896e89bbaac54cd
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  33:     0x56353f5c8e18 - core::ptr::drop_in_place<bevy_render2::view::ViewTarget>::h7b24aaa36acb180f
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  34:     0x56353f587c53 - core::ptr::mut_ptr::<impl *mut T>::drop_in_place::h5942d281b9d35548
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mut_ptr.rs:996:18
  35:     0x56353f587c53 - bevy_ecs::component::ComponentDescriptor::drop_ptr::hfa4909475e83a1c2
                               at /home/niklas/code/bevy/crates/bevy_ecs/src/component.rs:141:9
  36:     0x563540790aa4 - bevy_ecs::storage::blob_vec::BlobVec::clear::hfa94248963e3d5ec
                               at /home/niklas/code/bevy/crates/bevy_ecs/src/storage/blob_vec.rs:193:17
  37:     0x5635407c2da4 - <bevy_ecs::storage::blob_vec::BlobVec as core::ops::drop::Drop>::drop::h53bf35fe9d8b233e
                               at /home/niklas/code/bevy/crates/bevy_ecs/src/storage/blob_vec.rs:201:9
  38:     0x5635407bbfeb - core::ptr::drop_in_place<bevy_ecs::storage::blob_vec::BlobVec>::he4a0e3ccfafc6cb1
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  39:     0x5635407bbb1b - core::ptr::drop_in_place<bevy_ecs::storage::table::Column>::hfcbc3d0dd059ebc8
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  40:     0x5635407bc89f - core::ptr::drop_in_place<[bevy_ecs::storage::table::Column]>::h90135a0f4d1a96da
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  41:     0x5635407bf915 - <alloc::vec::Vec<T,A> as core::ops::drop::Drop>::drop::h57a2613f57954448
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/alloc/src/vec/mod.rs:2755:13
  42:     0x5635407bd447 - core::ptr::drop_in_place<alloc::vec::Vec<bevy_ecs::storage::table::Column>>::he671d2cb10108829
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  43:     0x5635407b96f7 - core::ptr::drop_in_place<bevy_ecs::storage::sparse_set::SparseSet<bevy_ecs::component::ComponentId,bevy_ecs::storage::table::Column>>::h4c70680e7fd87c5a
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  44:     0x5635407bb9d7 - core::ptr::drop_in_place<bevy_ecs::storage::table::Table>::he92c05944e211178
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  45:     0x5635407bc74f - core::ptr::drop_in_place<[bevy_ecs::storage::table::Table]>::hcad84c96dbe84cb4
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  46:     0x5635407bfe05 - <alloc::vec::Vec<T,A> as core::ops::drop::Drop>::drop::hdcfe0ac1b06c676f
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/alloc/src/vec/mod.rs:2755:13
  47:     0x5635407bd247 - core::ptr::drop_in_place<alloc::vec::Vec<bevy_ecs::storage::table::Table>>::hd4776255e36be867
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  48:     0x5635407bbb77 - core::ptr::drop_in_place<bevy_ecs::storage::table::Tables>::h9a8cae225eb0fa49
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  49:     0x5635407bb538 - core::ptr::drop_in_place<bevy_ecs::storage::Storages>::ha7580e4b7ebe6a3d
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  50:     0x5635406deb26 - core::ptr::drop_in_place<bevy_ecs::world::World>::he220d3652b0829a9
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  51:     0x5635406de907 - core::ptr::drop_in_place<bevy_app::app::App>::h0c548243d593d0dd
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  52:     0x5635406dea07 - core::ptr::drop_in_place<bevy_app::app::SubApp>::hdc96ca5674680b6c
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  53:     0x5635406de348 - core::ptr::drop_in_place<(alloc::boxed::Box<dyn bevy_app::app::AppLabel>,bevy_app::app::SubApp)>::h56803c54d38d5bce
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  54:     0x5635406db322 - core::ptr::mut_ptr::<impl *mut T>::drop_in_place::h7bbecc4cc21c16e1
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mut_ptr.rs:996:18
  55:     0x5635406db322 - hashbrown::raw::Bucket<T>::drop::hcbdb2e6c652eb3f0
                               at /cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/hashbrown-0.11.0/src/raw/mod.rs:344:9
  56:     0x5635406dc26e - hashbrown::raw::RawTable<T,A>::drop_elements::he9e57ca0a1b98dcf
                               at /cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/hashbrown-0.11.0/src/raw/mod.rs:598:17
  57:     0x5635406df7d0 - <hashbrown::raw::RawTable<T,A> as core::ops::drop::Drop>::drop::hccdec5ca5aac94d6
                               at /cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/hashbrown-0.11.0/src/raw/mod.rs:1665:17
  58:     0x5635406de68b - core::ptr::drop_in_place<hashbrown::raw::RawTable<(alloc::boxed::Box<dyn bevy_app::app::AppLabel>,bevy_app::app::SubApp)>>::h8843a63c5c4ce947
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  59:     0x5635406de7ff - core::ptr::drop_in_place<hashbrown::map::HashMap<alloc::boxed::Box<dyn bevy_app::app::AppLabel>,bevy_app::app::SubApp,ahash::random_state::RandomState>>::h36d4f0f6279c211e
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  60:     0x5635406de81b - core::ptr::drop_in_place<std::collections::hash::map::HashMap<alloc::boxed::Box<dyn bevy_app::app::AppLabel>,bevy_app::app::SubApp,ahash::random_state::RandomState>>::hfe33f36450d7fb28
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  61:     0x5635406de9a5 - core::ptr::drop_in_place<bevy_app::app::App>::h0c548243d593d0dd
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  62:     0x56353f63950b - core::ptr::drop_in_place<bevy_winit::winit_runner_with::{{closure}}>::h898e1dbf2722a5bf
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs:188:1
  63:     0x56353f6645b9 - winit::platform_impl::platform::x11::EventLoop<T>::run_return::h6c1980babcdc207c
                               at /home/niklas/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/linux/x11/mod.rs:379:5
  64:     0x56353f665a15 - winit::platform_impl::platform::x11::EventLoop<T>::run::he2c194bdcd5ee8c0
                               at /home/niklas/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/linux/x11/mod.rs:385:9
  65:     0x56353f65c231 - winit::platform_impl::platform::EventLoop<T>::run::h71dc468351b2383c
                               at /home/niklas/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/linux/mod.rs:662:56
  66:     0x56353f62dc70 - winit::event_loop::EventLoop<T>::run::h632f7585de80e9c4
                               at /home/niklas/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/winit-0.25.0/src/event_loop.rs:154:9
  67:     0x56353f60e070 - bevy_winit::run::hcbc66152eb44b4f7
                               at /home/niklas/code/bevy/crates/bevy_winit/src/lib.rs:165:5
  68:     0x56353f60305c - bevy_winit::winit_runner_with::h1c0fec9aafbb909d
                               at /home/niklas/code/bevy/crates/bevy_winit/src/lib.rs:498:9
  69:     0x56353f602994 - bevy_winit::winit_runner::hf84849640201c530
                               at /home/niklas/code/bevy/crates/bevy_winit/src/lib.rs:205:5
  70:     0x56353f637853 - core::ops::function::Fn::call::hebd5a05ff11cb587
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ops/function.rs:70:5
  71:     0x5635406d87f8 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::ha32a05be33b8bc07
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/alloc/src/boxed.rs:1650:9
  72:     0x5635406d1bf5 - bevy_app::app::App::run::h5c37fb62a62c6888
                               at /home/niklas/code/bevy/crates/bevy_app/src/app.rs:123:9
  73:     0x56353f005c66 - bevymark_pipelined::main::h237c182b0ec5dd3f
                               at /home/niklas/code/bevy/examples/tools/bevymark_pipelined.rs:43:5
  74:     0x56353eff799b - core::ops::function::FnOnce::call_once::h87377b5e19fd4e75
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ops/function.rs:227:5
  75:     0x56353f00147e - std::sys_common::backtrace::__rust_begin_short_backtrace::h29b25e49afcbb8d1
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/sys_common/backtrace.rs:125:18
  76:     0x56353eff2711 - std::rt::lang_start::{{closure}}::hba4b3bfefd2111c1
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/rt.rs:63:18
  77:     0x56354099040a - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h2790017aba790142
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ops/function.rs:259:13
  78:     0x56354099040a - std::panicking::try::do_call::hd5d0fbb7d2d2d85d
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:403:40
  79:     0x56354099040a - std::panicking::try::h675520ee37b0fdf7
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:367:19
  80:     0x56354099040a - std::panic::catch_unwind::h803430ea0284ce79
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panic.rs:129:14
  81:     0x56354099040a - std::rt::lang_start_internal::{{closure}}::h3a398a8154de3106
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/rt.rs:45:48
  82:     0x56354099040a - std::panicking::try::do_call::hf60f106700df94b2
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:403:40
  83:     0x56354099040a - std::panicking::try::hb2022d2bc87a9867
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:367:19
  84:     0x56354099040a - std::panic::catch_unwind::hbf801c9d61f0c2fb
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panic.rs:129:14
  85:     0x56354099040a - std::rt::lang_start_internal::hdd488b91dc742b96
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/rt.rs:45:20
  86:     0x56353eff26e0 - std::rt::lang_start::h5cc1dba2c4698527
                               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/rt.rs:62:5
  87:     0x56353f0082dc - main
  88:     0x7f74be842bf7 - __libc_start_main
                               at /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:310
  89:     0x56353eff25ca - _start
  90:                0x0 - <unknown>
thread panicked while panicking. aborting.
[1]    19110 illegal hardware instruction (core dumped)  cargo run --example bevymark_pipelined
@NiklasEi NiklasEi added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled A-Rendering Drawing game state to the screen P-Crash A sudden unexpected crash and removed C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Nov 22, 2021
@NiklasEi
Copy link
Member Author

I just realized, that I get the same error with the bevymark example. But only on pipelined-rendering. On main the example runs fine.
One interesting point about this: the "normal" bevymark on pipelined-rendering gets stuck with a black screen in debug mode. But in release mode it directly crashes with the error above.

@cart
Copy link
Member

cart commented Nov 22, 2021

Given that this is an ash error, this feels like an internal wgpu issue. So I'll lazily ping @kvark :)

@kvark
Copy link

kvark commented Nov 23, 2021

Looks like we are waiting on a "timeline semaphore", and wgpu's Vulkan backend detects (and enables) it as a part of Vulkan-1.2, but the entry point isn't found. Moreover, all of that happens during shutdown of the context. So my first question would be if the shutdown is requested explicitly (e.g. dropping the device/instance), or is it happening because of another panic somewhere else.

Currently, wgpu doesn't properly keep the Instance/Adapter/Device alive, so it would help to make sure that Bevy doesn't drop them in the wrong order. Ideally, they are dropped in the opposite order of creation, so first comes Device, then Adapter, finally the Instance.

@NiklasEi
Copy link
Member Author

After a quick binary search in the Bevy commit history I found the breaking commit: 213839f

@NiklasEi NiklasEi changed the title [pipelined-rendering] Unable to load get_semaphore_counter_value Unable to load get_semaphore_counter_value Nov 26, 2021
@NiklasEi
Copy link
Member Author

This is way over my head but I tried to debug the crash a bit more.
I found ash-rs/ash#289, which doesn't seem to be the exact same issue, but the small code example was useful. I attached a debugger and run an updated version of the example code with the latest ash (0.33.3+1.2.191):

use ash::vk;

fn main() {
    let entry = unsafe {ash::Entry::new().unwrap()};
    let app_info = vk::ApplicationInfo::builder().api_version(vk::make_api_version(0, 1, 2, 0));
    let create_info = vk::InstanceCreateInfo::builder().application_info(&app_info);
    let instance = unsafe {entry.create_instance(&create_info, None).unwrap()};
    let physical_device = unsafe {instance.enumerate_physical_devices().unwrap()[0]};
    let logical_device_create_info = vk::DeviceCreateInfo::builder();
    let logical_device = unsafe {instance.create_device(physical_device, &logical_device_create_info, None).unwrap()};
    let wait_info = vk::SemaphoreWaitInfo::builder();
    unsafe {logical_device.wait_semaphores(&wait_info.build(), u64::MAX).unwrap()};
}

Creating the logical device results in Signal: SIGSEGV (signal SIGSEGV: invalid address (fault address: 0x8))

As far as I understand this code should run fine for me, but maybe someone with more ash knowledge could confirm before I open an issue upstream?

Some more device information due to the comments on the linked ash issue (from running vulkaninfo):

GPU0:
VkPhysicalDeviceProperties:
---------------------------
        apiVersion     = 4202627 (1.2.131)
        driverVersion  = 83886088 (0x5000008)
        vendorID       = 0x8086
        deviceID       = 0x3e9b
        deviceType     = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
        deviceName     = Intel(R) UHD Graphics 630 (CFL GT2)

@kvark
Copy link

kvark commented Nov 26, 2021

This code isn't valid Vulkan, because you are calling the wait_semaphores function, which requires timeline semaphores. But nowhere you are actually requesting timeline semaphores to be enabled - VkPhysicalDeviceVulkan12Features::timelineSemaphore = true needs to be passed to the logical device creation. See https://github.com/gfx-rs/wgpu/blob/5f6c06781534dc5ecd54e1a1cf89ece98b46f49f/wgpu-hal/src/vulkan/adapter.rs#L214

@NiklasEi would you mind running any of wgpu's examples for a test?

@NiklasEi
Copy link
Member Author

@NiklasEi would you mind running any of wgpu's examples for a test?

I am getting the same crash running the boids example from the latest commit on wgpu main branch.

@kvark
Copy link

kvark commented Nov 26, 2021

Ok, great! Could you file a quick issue to wgpu, linking to here, and attach your vulkaninfo output?

@NiklasEi NiklasEi added the S-Blocked This cannot move forward until something else changes label Nov 26, 2021
@NiklasEi
Copy link
Member Author

NiklasEi commented Dec 1, 2021

This crash is now fixed in wgpu.

@kvark will there be a patch release?

@NiklasEi NiklasEi removed the S-Blocked This cannot move forward until something else changes label Dec 1, 2021
@kvark
Copy link

kvark commented Dec 1, 2021

Yes, we can make a patch release now with all the 1000 fixes to Vulkan init that were done during investigation of your nasty issue :)

@kvark
Copy link

kvark commented Dec 2, 2021

Ok, it wasn't easy, but wgpu-hal-0.11.5 is now up for grabs 🎉

@NiklasEi NiklasEi closed this as completed Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen P-Crash A sudden unexpected crash
Projects
None yet
Development

No branches or pull requests

3 participants