wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
16.25k stars 717 forks source link

Wezterm wgpu VRAM memory leak #4826

Open takase1121 opened 7 months ago

takase1121 commented 7 months ago

What Operating System(s) are you seeing this problem on?

Linux Wayland

Which Wayland compositor or X11 Window manager(s) are you using?

Operating System: Arch Linux KDE Plasma Version: 5.27.10 KDE Frameworks Version: 5.114.0 Qt Version: 5.15.12 Kernel Version: 6.7.0-zen3-1-zen (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 5500U with Radeon Graphics Memory: 5.6 GiB of RAM Graphics Processor: AMD Radeon Graphics Manufacturer: LENOVO Product Name: 82LM System Version: IdeaPad 5 14ALC05

WezTerm version

20240120-211320-b4c5dc74

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

Wezterm keeps on expanding VRAM and GTT (shared memory between CPU and GPU) until it runs out of memory. This happens especially with interactive terminal applications, e.g. htop, nano. After wezterm is closed, the memory is freed properly.

To Reproduce

  1. Use wgpu as the backend (config.front_end = "WebGpu" which is the default)
  2. Open htop
  3. Wait patiently or scroll really fast to update the screen

Configuration

local wezterm = require 'wezterm'
local config = {}

config.color_scheme = 'kanagawabones'
config.hide_tab_bar_if_only_one_tab = true
config.use_ime = true
config.visual_bell = {
  fade_in_duration_ms = 75,
  fade_out_duration_ms = 75,
  target = 'CursorColor',
}
config.warn_about_missing_glyphs = false
config.default_cursor_style = 'SteadyBar'
config.front_end = "WebGpu"

return config

Expected Behavior

To have it not explode on my face and OOM everything.

Logs

warning: queue 0x5761ee5c4380 destroyed while proxies still attached:
  zwp_primary_selection_offer_v1@4278190086 still attached
  wl_data_offer@4278190085 still attached
  wl_data_offer@4278190084 still attached
  wl_buffer@47 still attached
  wl_buffer@48 still attached
  wl_shm_pool@50 still attached
  wl_buffer@52 still attached
  wl_shm_pool@54 still attached
  wl_data_offer@4278190081 still attached
  xdg_wm_base@22 still attached
  wl_surface@21 still attached
  wl_data_device@18 still attached
  wl_pointer@16 still attached
  zwp_text_input_v3@15 still attached
  wl_keyboard@14 still attached
  zwp_primary_selection_device_v1@13 still attached
  zwp_primary_selection_device_manager_v1@3 still attached
  wl_data_device@12 still attached
  zwp_text_input_manager_v3@11 still attached
  wl_output@10 still attached
  wl_subcompositor@9 still attached
  wl_data_device_manager@8 still attached
  wl_seat@7 still attached
  wl_shm@6 still attached
  zxdg_decoration_manager_v1@5 still attached
  wl_compositor@4 still attached
  wl_registry@2 still attached

Anything else?

Here is a video of it filling up my RAM.

https://github.com/wez/wezterm/assets/20792268/1cc4b614-c1e6-4484-8f90-e6bea28ef46b

folke commented 7 months ago

I also just noticed this. Seems the same as https://github.com/wez/wezterm/issues/4825

Using OpenGL as a work-around for now https://github.com/wez/wezterm/issues/4825#issuecomment-1902494625

wez commented 7 months ago

Do you see wgpu panicking when it falls over? Please share that part of the logs. What you shared is a generic message from the system wayland libraries which doesn't help identify where in wezterm a problem may be coming from.

I do agree that this is likely correlated with the recent wgpu dependency upgrade, I would just like to have a bit more detail so I can report this with the wgpu folks and figure out a solution.

RomanAverin commented 7 months ago

I have the same problem

wez commented 7 months ago

I've reverted the wgpu 0.19 upgrade in main.

Danielkonge commented 7 months ago

I don't know if this was mentioned elsewhere, but I also had crazy amounts of ram being taken up by wezterm on macOS after an earlier update today. Updating again after you reverted wgpu has fixed it. (Just wanted to mention that this also affected macOS and was not only affecting Linux.)

miversen33 commented 7 months ago

I am running into the same issue. I started wezterm with

$ RUST_BACKTRACE=full wezterm

but the dump I get isn't terribly useful. Still, here is what dumps when it crashes

17:13:40.352  ERROR  wgpu::backend::wgpu_core > Handling wgpu errors as fatal by default
17:13:40.353  ERROR  env_bootstrap            > panic at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/backend/wgpu_core.rs:3009:5 - !?
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: <unknown>
  21: <unknown>
  22: <unknown>
  23: <unknown>
  24: <unknown>
  25: <unknown>
  26: <unknown>
  27: __libc_start_main
  28: <unknown>

thread 'main' panicked at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/backend/wgpu_core.rs:3009:5:
wgpu error: Validation Error

Caused by:
    In Device::create_buffer
      note: label = `Vertex Buffer`
    Not enough memory left.

stack backtrace:
   0:     0x5647f1bca79c - <unknown>
   1:     0x5647f1bfe09c - <unknown>
   2:     0x5647f1bc49ae - <unknown>
   3:     0x5647f1bca584 - <unknown>
   4:     0x5647f1bcc3c3 - <unknown>
   5:     0x5647f1bcc0e4 - <unknown>
   6:     0x5647f009bbf8 - <unknown>
   7:     0x5647f1bccac1 - <unknown>
   8:     0x5647f1bcc841 - <unknown>
   9:     0x5647f1bcacc6 - <unknown>
  10:     0x5647f1bcc592 - <unknown>
  11:     0x5647efc880b5 - <unknown>
  12:     0x5647f0325139 - <unknown>
  13:     0x5647f0334a34 - <unknown>
  14:     0x5647f033d94d - <unknown>
  15:     0x5647f0306233 - <unknown>
  16:     0x5647efea5c7c - <unknown>
  17:     0x5647eff5385f - <unknown>
  18:     0x5647eff6a70f - <unknown>
  19:     0x5647f003ea6d - <unknown>
  20:     0x5647f0c75a18 - <unknown>
  21:     0x5647f0c16a3c - <unknown>
  22:     0x5647f0da625b - <unknown>
  23:     0x5647f0d6c158 - <unknown>
  24:     0x5647f0c2c0cf - <unknown>
  25:     0x5647f0c0bae7 - <unknown>
  26:     0x5647efeb0794 - <unknown>
  27:     0x5647efeb270d - <unknown>
  28:     0x5647efe22583 - <unknown>
  29:     0x5647eff14299 - <unknown>
  30:     0x5647f1bbb05b - <unknown>
  31:     0x5647efeb97f5 - <unknown>
  32:     0x7fe5b3245cd0 - <unknown>
  33:     0x7fe5b3245d8a - __libc_start_main
  34:     0x5647efc88895 - <unknown>
  35:                0x0 - <unknown>
wez commented 7 months ago

@miversen33 if you can build from source without --release, you should get a more useful stack trace

miversen33 commented 7 months ago

It's a chunky boy, here ya go. This is against 7c452d3 which as far as I could tell was the last commit before the revert.

Some specific details about my system. I am running Arch, KDE with X11 on an Intel i5-12500H and an integrated Intel Iris XE Graphics "card".

  12: <T as wgpu::context::DynContext>::device_create_buffer
             at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/context.rs:2287:30
  13: wgpu::Device::create_buffer
             at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/lib.rs:2514:13
  14: wezterm_gui::renderstate::WebGpuVertexBuffer::recreate
             at wezterm-gui/src/renderstate.rs:239:27
  15: wezterm_gui::termwindow::render::draw::<impl wezterm_gui::termwindow::TermWindow>::call_draw_webgpu
             at wezterm-gui/src/termwindow/render/draw.rs:133:37
  16: wezterm_gui::termwindow::render::draw::<impl wezterm_gui::termwindow::TermWindow>::call_draw
             at wezterm-gui/src/termwindow/render/draw.rs:16:36
  17: wezterm_gui::termwindow::render::paint::<impl wezterm_gui::termwindow::TermWindow>::paint_impl
             at wezterm-gui/src/termwindow/render/paint.rs:108:9
full trace ``` 17:59:55.957 ERROR wgpu::backend::wgpu_core > Handling wgpu errors as fatal by default 17:59:57.029 ERROR env_bootstrap > panic at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/backend/wgpu_core.rs:3009:5 - !? 0: env_bootstrap::register_panic_hook::{{closure}} at env-bootstrap/src/lib.rs:176:18 1: as core::ops::function::Fn>::call at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/alloc/src/boxed.rs:2021:9 std::panicking::rust_panic_with_hook at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:735:13 2: std::panicking::begin_panic_handler::{{closure}} at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:609:13 3: std::sys_common::backtrace::__rust_end_short_backtrace at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/sys_common/backtrace.rs:170:18 4: rust_begin_unwind at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:597:5 5: core::panicking::panic_fmt at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:72:14 6: wgpu::backend::wgpu_core::default_error_handler at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/backend/wgpu_core.rs:3009:5 7: core::ops::function::Fn::call at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/ops/function.rs:79:5 8: as core::ops::function::Fn>::call at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/alloc/src/boxed.rs:2021:9 9: wgpu::backend::wgpu_core::ErrorSinkRaw::handle_error at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/backend/wgpu_core.rs:2995:17 10: wgpu::backend::wgpu_core::ContextWgpuCore::handle_error at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/backend/wgpu_core.rs:262:9 11: ::device_create_buffer at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/backend/wgpu_core.rs:1226:13 12: ::device_create_buffer at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/context.rs:2287:30 13: wgpu::Device::create_buffer at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/lib.rs:2514:13 14: wezterm_gui::renderstate::WebGpuVertexBuffer::recreate at wezterm-gui/src/renderstate.rs:239:27 15: wezterm_gui::termwindow::render::draw::::call_draw_webgpu at wezterm-gui/src/termwindow/render/draw.rs:133:37 16: wezterm_gui::termwindow::render::draw::::call_draw at wezterm-gui/src/termwindow/render/draw.rs:16:36 17: wezterm_gui::termwindow::render::paint::::paint_impl at wezterm-gui/src/termwindow/render/paint.rs:108:9 18: wezterm_gui::termwindow::TermWindow::do_paint_webgpu_impl at wezterm-gui/src/termwindow/mod.rs:1029:9 19: wezterm_gui::termwindow::TermWindow::do_paint_webgpu at wezterm-gui/src/termwindow/mod.rs:1013:15 20: wezterm_gui::termwindow::TermWindow::dispatch_window_event at wezterm-gui/src/termwindow/mod.rs:957:66 21: wezterm_gui::termwindow::TermWindow::new_window::{{closure}}::{{closure}} at wezterm-gui/src/termwindow/mod.rs:809:35 22: as core::ops::function::FnMut>::call_mut at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/alloc/src/boxed.rs:2014:9 23: window::WindowEventSender::dispatch at window/src/lib.rs:216:13 24: window::os::x11::window::XWindowInner::dispatch_pending_events at window/src/os/x11/window.rs:342:17 25: window::os::x11::window::XWindowInner::invalidate at window/src/os/x11/window.rs:1321:9 26: window::os::x11::window::XWindowInner::dispatch_pending_events::{{closure}}::{{closure}} at window/src/os/x11/window.rs:353:29 27: window::os::x11::connection::XConnection::with_window_inner::{{closure}} at window/src/os/x11/connection.rs:907:33 28: async_task::raw::RawTask::run at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/raw.rs:557:17 29: async_task::runnable::Runnable::run at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:781:18 30: window::spawn::schedule_with_pri::{{closure}} at window/src/spawn.rs:40:13 31: core::ops::function::FnOnce::call_once{{vtable.shim}} at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/ops/function.rs:250:5 32: as core::ops::function::FnOnce>::call_once at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/alloc/src/boxed.rs:2007:9 33: window::spawn::SpawnQueue::run_impl at window/src/spawn.rs:169:13 34: window::spawn::SpawnQueue::run at window/src/spawn.rs:63:9 35: ::run_message_loop at window/src/os/x11/connection.rs:356:16 36: ::run_message_loop at window/src/os/x_and_wayland.rs:148:29 37: wezterm_gui::frontend::GuiFrontEnd::run_forever at wezterm-gui/src/frontend.rs:313:9 38: wezterm_gui::run_terminal_gui at wezterm-gui/src/main.rs:731:5 39: wezterm_gui::run at wezterm-gui/src/main.rs:1189:41 40: wezterm_gui::main at wezterm-gui/src/main.rs:777:21 41: core::ops::function::FnOnce::call_once at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/ops/function.rs:250:5 42: std::sys_common::backtrace::__rust_begin_short_backtrace at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/sys_common/backtrace.rs:154:18 43: std::rt::lang_start::{{closure}} at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/rt.rs:166:18 44: core::ops::function::impls:: for &F>::call_once at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/ops/function.rs:284:13 std::panicking::try::do_call at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:504:40 std::panicking::try at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:468:19 std::panic::catch_unwind at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panic.rs:142:14 std::rt::lang_start_internal::{{closure}} at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/rt.rs:148:48 std::panicking::try::do_call at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:504:40 std::panicking::try at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:468:19 std::panic::catch_unwind at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panic.rs:142:14 std::rt::lang_start_internal at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/rt.rs:148:20 45: std::rt::lang_start at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/rt.rs:165:17 46: main 47: 48: __libc_start_main 49: _start thread 'main' panicked at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/backend/wgpu_core.rs:3009:5: wgpu error: Validation Error Caused by: In Device::create_buffer note: label = `Vertex Buffer` Not enough memory left. stack backtrace: 0: 0x558f5f92d01c - std::backtrace_rs::backtrace::libunwind::trace::h67a838aed1f4d6ec at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x558f5f92d01c - std::backtrace_rs::backtrace::trace_unsynchronized::h1d1786bb1962baf8 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x558f5f92d01c - std::sys_common::backtrace::_print_fmt::h5a0b1f807a002d23 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/sys_common/backtrace.rs:67:5 3: 0x558f5f92d01c - ::fmt::hf84ab6ad0b91784c at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/sys_common/backtrace.rs:44:22 4: 0x558f5f96095c - core::fmt::rt::Argument::fmt::h28f463bd1fdabed5 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/fmt/rt.rs:138:9 5: 0x558f5f96095c - core::fmt::write::ha37c23b175e921b3 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/fmt/mod.rs:1114:21 6: 0x558f5f92722e - std::io::Write::write_fmt::haa1b000741bcbbe1 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/io/mod.rs:1763:15 7: 0x558f5f92ce04 - std::sys_common::backtrace::_print::h1ff1030b04dfb157 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/sys_common/backtrace.rs:47:5 8: 0x558f5f92ce04 - std::sys_common::backtrace::print::hb982056c6f29541c at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/sys_common/backtrace.rs:34:9 9: 0x558f5f92ec43 - std::panicking::default_hook::{{closure}}::h11f92f82c62fbd68 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:272:22 10: 0x558f5f92e964 - std::panicking::default_hook::hb8810fe276772c66 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:292:9 11: 0x558f5b7439d3 - as core::ops::function::Fn>::call::hdc9c851ab8a344cb at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/alloc/src/boxed.rs:2021:9 12: 0x558f5b41e422 - wezterm_gui::notify_on_panic::{{closure}}::he7f1d5db1caa4866 at /home/miversen/git/wezterm/wezterm-gui/src/main.rs:748:9 13: 0x558f5b7439d3 - as core::ops::function::Fn>::call::hdc9c851ab8a344cb at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/alloc/src/boxed.rs:2021:9 14: 0x558f5b74b17e - env_bootstrap::register_panic_hook::{{closure}}::hd835d210548312e2 at /home/miversen/git/wezterm/env-bootstrap/src/lib.rs:189:9 15: 0x558f5f92f341 - as core::ops::function::Fn>::call::h87b887549356728a at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/alloc/src/boxed.rs:2021:9 16: 0x558f5f92f341 - std::panicking::rust_panic_with_hook::hd2f0efd2fec86cb0 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:735:13 17: 0x558f5f92f0c1 - std::panicking::begin_panic_handler::{{closure}}::h3651b7fc4f61d784 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:609:13 18: 0x558f5f92d546 - std::sys_common::backtrace::__rust_end_short_backtrace::hbc468e4b98c7ae04 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/sys_common/backtrace.rs:170:18 19: 0x558f5f92ee12 - rust_begin_unwind at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:597:5 20: 0x558f5af85bd5 - core::panicking::panic_fmt::h979245e2fdb2fabd at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:72:14 21: 0x558f5bc9d76f - wgpu::backend::wgpu_core::default_error_handler::hb03312f33ba746aa at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/backend/wgpu_core.rs:3009:5 22: 0x558f5bd4b7ea - core::ops::function::Fn::call::h2ff60d96b6356dbb at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/ops/function.rs:79:5 23: 0x558f5bcf160f - as core::ops::function::Fn>::call::h9664b2f129eb162e at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/alloc/src/boxed.rs:2021:9 24: 0x558f5bc9d445 - wgpu::backend::wgpu_core::ErrorSinkRaw::handle_error::h050cac4f6675fa7e at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/backend/wgpu_core.rs:2995:17 25: 0x558f5bc768db - wgpu::backend::wgpu_core::ContextWgpuCore::handle_error::h2c6f57b8a6d22249 at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/backend/wgpu_core.rs:262:9 26: 0x558f5bc8b7fb - ::device_create_buffer::h259a3302cc86e0fd at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/backend/wgpu_core.rs:1226:13 27: 0x558f5bca0f9c - ::device_create_buffer::h1d0da1bf0d1ca4cf at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/context.rs:2287:30 28: 0x558f5bcacb4b - wgpu::Device::create_buffer::hd693d1595c38eaf2 at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.0/src/lib.rs:2514:13 29: 0x558f5b400355 - wezterm_gui::renderstate::WebGpuVertexBuffer::recreate::h3e74b94263e80cd4 at /home/miversen/git/wezterm/wezterm-gui/src/renderstate.rs:239:27 30: 0x558f5b66c18f - wezterm_gui::termwindow::render::draw::::call_draw_webgpu::ha535abb6ac8537f6 at /home/miversen/git/wezterm/wezterm-gui/src/termwindow/render/draw.rs:133:37 31: 0x558f5b66aa98 - wezterm_gui::termwindow::render::draw::::call_draw::ha6907f9c1d9b5bf5 at /home/miversen/git/wezterm/wezterm-gui/src/termwindow/render/draw.rs:16:36 32: 0x558f5b672147 - wezterm_gui::termwindow::render::paint::::paint_impl::he2f3c70b65179e12 at /home/miversen/git/wezterm/wezterm-gui/src/termwindow/render/paint.rs:108:9 33: 0x558f5b693351 - wezterm_gui::termwindow::TermWindow::do_paint_webgpu_impl::ha2425b5d1e176e48 at /home/miversen/git/wezterm/wezterm-gui/src/termwindow/mod.rs:1029:9 34: 0x558f5b693192 - wezterm_gui::termwindow::TermWindow::do_paint_webgpu::h2417e5a67c954fc6 at /home/miversen/git/wezterm/wezterm-gui/src/termwindow/mod.rs:1013:15 35: 0x558f5b691ee6 - wezterm_gui::termwindow::TermWindow::dispatch_window_event::hcb3c347fae8f6d88 at /home/miversen/git/wezterm/wezterm-gui/src/termwindow/mod.rs:957:66 36: 0x558f5b1863e0 - wezterm_gui::termwindow::TermWindow::new_window::{{closure}}::{{closure}}::h1a28dc613d0f3bdc at /home/miversen/git/wezterm/wezterm-gui/src/termwindow/mod.rs:809:35 37: 0x558f5d2cd952 - as core::ops::function::FnMut>::call_mut::h310931995ff87955 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/alloc/src/boxed.rs:2014:9 38: 0x558f5d341ff9 - window::WindowEventSender::dispatch::hcefa4a7e5fff167f at /home/miversen/git/wezterm/window/src/lib.rs:216:13 39: 0x558f5d2f1f55 - window::os::x11::window::XWindowInner::dispatch_pending_events::hb65d930da684c361 at /home/miversen/git/wezterm/window/src/os/x11/window.rs:342:17 40: 0x558f5d2fbabb - window::os::x11::window::XWindowInner::invalidate::hb76717ca8b95c428 at /home/miversen/git/wezterm/window/src/os/x11/window.rs:1321:9 41: 0x558f5d32ab4b - window::os::x11::window::XWindowInner::dispatch_pending_events::{{closure}}::{{closure}}::h5c25449a9165caf1 at /home/miversen/git/wezterm/window/src/os/x11/window.rs:353:29 42: 0x558f5d2e63a4 - window::os::x11::connection::XConnection::with_window_inner::{{closure}}::h7db9b89b50f548f7 at /home/miversen/git/wezterm/window/src/os/x11/connection.rs:907:33 43: 0x558f5d641dec - async_task::raw::RawTask::run::hcc504ed9a2e38e4e at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/raw.rs:557:17 44: 0x558f5f581b9c - async_task::runnable::Runnable::run::ha7209086be123002 at /home/miversen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:781:18 45: 0x558f5d4afa3b - window::spawn::schedule_with_pri::{{closure}}::hbb75c84061f14e2d at /home/miversen/git/wezterm/window/src/spawn.rs:40:13 46: 0x558f5d479e11 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hb2f2aed1890599b0 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/ops/function.rs:250:5 47: 0x558f5e853a78 - as core::ops::function::FnOnce>::call_once::h940a8442af7340c2 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/alloc/src/boxed.rs:2007:9 48: 0x558f5d2ec225 - window::spawn::SpawnQueue::run_impl::h33c2bc8d9e6ac29f at /home/miversen/git/wezterm/window/src/spawn.rs:169:13 49: 0x558f5d2eaf1a - window::spawn::SpawnQueue::run::h0ff37bf161ba39ea at /home/miversen/git/wezterm/window/src/spawn.rs:63:9 50: 0x558f5d2b018f - ::run_message_loop::he5ad896fd9a88500 at /home/miversen/git/wezterm/window/src/os/x11/connection.rs:356:16 51: 0x558f5d28b49a - ::run_message_loop::h223765721bf04b17 at /home/miversen/git/wezterm/window/src/os/x_and_wayland.rs:148:29 52: 0x558f5b4c7ce5 - wezterm_gui::frontend::GuiFrontEnd::run_forever::hcc71b4a83f23c1c9 at /home/miversen/git/wezterm/wezterm-gui/src/frontend.rs:313:9 53: 0x558f5b625f8f - wezterm_gui::run_terminal_gui::h4f926e9574557360 at /home/miversen/git/wezterm/wezterm-gui/src/main.rs:731:5 54: 0x558f5b62f894 - wezterm_gui::run::h17c50ff90e6ecd38 at /home/miversen/git/wezterm/wezterm-gui/src/main.rs:1189:41 55: 0x558f5b6268d1 - wezterm_gui::main::h26e2fa1201f2c80f at /home/miversen/git/wezterm/wezterm-gui/src/main.rs:777:21 56: 0x558f5b00bb8b - core::ops::function::FnOnce::call_once::h452b021ac419329c at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/ops/function.rs:250:5 57: 0x558f5b64607e - std::sys_common::backtrace::__rust_begin_short_backtrace::h80772f705b1f0c7f at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/sys_common/backtrace.rs:154:18 58: 0x558f5b2fdce1 - std::rt::lang_start::{{closure}}::he5e41f15608bdf7c at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/rt.rs:166:18 59: 0x558f5f91d8db - core::ops::function::impls:: for &F>::call_once::hf9057cfaeeb252e2 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/ops/function.rs:284:13 60: 0x558f5f91d8db - std::panicking::try::do_call::h629e203a624883e4 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:504:40 61: 0x558f5f91d8db - std::panicking::try::h7b61614724d6a4f1 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:468:19 62: 0x558f5f91d8db - std::panic::catch_unwind::h354ac1c0268491d8 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panic.rs:142:14 63: 0x558f5f91d8db - std::rt::lang_start_internal::{{closure}}::h919fee3c5ba8f617 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/rt.rs:148:48 64: 0x558f5f91d8db - std::panicking::try::do_call::h54583f67455bff32 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:504:40 65: 0x558f5f91d8db - std::panicking::try::hb0e12c4e01d39dc2 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:468:19 66: 0x558f5f91d8db - std::panic::catch_unwind::h367b6339e3ca9a3b at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panic.rs:142:14 67: 0x558f5f91d8db - std::rt::lang_start_internal::ha5ce8533eaa0fda8 at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/rt.rs:148:20 68: 0x558f5b2fdcba - std::rt::lang_start::h1ba67b0b2c6eae5b at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/rt.rs:165:17 69: 0x558f5b632cae - main 70: 0x7f9f00845cd0 - 71: 0x7f9f00845d8a - __libc_start_main 72: 0x558f5af864a5 - _start 73: 0x0 - ```
wez commented 7 months ago

@miversen33 thanks; I think what you're seeing is probably the same as #4825, but both are fundamentally related to the wgpu update. I think your hardware/driver combo panics whereas the amd flavor keeps growing

takase1121 commented 7 months ago

Do you see wgpu panicking when it falls over? Please share that part of the logs. What you shared is a generic message from the system wayland libraries which doesn't help identify where in wezterm a problem may be coming from.

I do agree that this is likely correlated with the recent wgpu dependency upgrade, I would just like to have a bit more detail so I can report this with the wgpu folks and figure out a solution.

I wasn't able to get it panic before the system completely hangs from OOM, but I doubt it would matter since OOM sends a SIGTERM followed by a SIGKILL or a SIGKILL.

I had to use the Magic Sysrq keys to stop it from hanging, but when I inspect the log directory there's nothing in it.