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

Intermittent Device Lost crash in wgpu on wayland #1250

Open
jleibs opened this issue Feb 13, 2023 · 3 comments
Open

Intermittent Device Lost crash in wgpu on wayland #1250

jleibs opened this issue Feb 13, 2023 · 3 comments
Labels
🪳 bug Something isn't working 💣 crash crash, deadlock/freeze, do-no-start 🐧 linux Linux-specific problems 🔺 re_renderer affects re_renderer itself

Comments

@jleibs
Copy link
Member

jleibs commented Feb 13, 2023

I've now seen this twice in the past 3 days. No specific way to reproduce yet. Both times the entire OS appears to hang and after 5-10 seconds something times out and the app terminates with the below stack trace.

$ thread '<unnamed>' panicked at 'Error in Surface::get_current_texture_view: parent device is lost', /home/jleibs/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.15.0/src/backend/direct.rs:316:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/panicking.rs:64:14
   2: wgpu::backend::direct::Context::handle_error_fatal
   3: <wgpu::backend::direct::Context as wgpu::context::Context>::surface_get_current_texture
   4: <T as wgpu::context::DynContext>::surface_get_current_texture
   5: wgpu::Surface::get_current_texture
   6: egui_wgpu::winit::Painter::paint_and_update_textures
   7: <eframe::native::run::wgpu_integration::WgpuWinitApp as eframe::native::run::WinitApp>::paint
   8: eframe::native::run::run_and_return::{{closure}}
   9: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::run_return
  10: eframe::native::run::run_and_return
  11: std::thread::local::LocalKey<T>::with
  12: eframe::native::run::wgpu_integration::run_wgpu
  13: eframe::run_native
  14: re_viewer::native::run_native_app
  15: tokio::runtime::park::CachedParkThread::block_on
  16: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
  17: tokio::runtime::runtime::Runtime::block_on
  18: rerun_bindings::python_bridge::_::__pyfunction_main
  19: pyo3::impl_::trampoline::trampoline_inner
  20: rerun_bindings::python_bridge::_::<impl rerun_bindings::python_bridge::main::MakeDef>::DEF::trampoline
  21: <unknown>
  22: _PyObject_MakeTpCall
  23: _PyEval_EvalFrameDefault
  24: _PyFunction_Vectorcall
  25: _PyEval_EvalFrameDefault
  26: <unknown>
  27: PyEval_EvalCode
  28: <unknown>
  29: <unknown>
  30: _PyEval_EvalFrameDefault
  31: _PyFunction_Vectorcall
  32: _PyEval_EvalFrameDefault
  33: _PyFunction_Vectorcall
  34: <unknown>
  35: Py_RunMain
  36: Py_BytesMain
  37: __libc_start_call_main
             at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  38: __libc_start_main_impl
             at ./csu/../csu/libc-start.c:381:3
  39: _start
@jleibs jleibs added 🪳 bug Something isn't working 🔺 re_renderer affects re_renderer itself labels Feb 13, 2023
@Wumpf
Copy link
Member

Wumpf commented Feb 13, 2023

From the description and the error message, the user space side of your graphics driver died 🤔

@Wumpf
Copy link
Member

Wumpf commented Feb 13, 2023

the panic comes from here
https://github.com/gfx-rs/wgpu/blob/33f94c7c8457d8bf0363c175a7c5a95d525630fa/wgpu/src/backend/direct.rs#L786
The only place today that causes device lost on Vulkan seems to be here
https://github.com/gfx-rs/wgpu/blob/v0.15/wgpu-hal/src/vulkan/device.rs#L1982

Unclear to me why wgpu gives up on a device loss. But the hang implies that the issue is earlier anyways

there’s a bunch of similar sounding issues filed against wgpu
gfx-rs/wgpu#3043
gfx-rs/wgpu#2519

@Wumpf Wumpf changed the title Random crash in wgpu on wayland Device Lost crash in wgpu on wayland Feb 13, 2023
@Wumpf Wumpf changed the title Device Lost crash in wgpu on wayland Intermittent Device Lost crash in wgpu on wayland Feb 13, 2023
@emilk emilk added 💣 crash crash, deadlock/freeze, do-no-start 🐧 linux Linux-specific problems labels Feb 15, 2023
@Wumpf
Copy link
Member

Wumpf commented Sep 27, 2023

Potentially related to emilk/egui#3061

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 💣 crash crash, deadlock/freeze, do-no-start 🐧 linux Linux-specific problems 🔺 re_renderer affects re_renderer itself
Projects
None yet
Development

No branches or pull requests

3 participants