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

SIGSEGV (Address boundary error) with dwm #22406

Closed
1 task done
s3bba opened this issue Dec 24, 2024 · 2 comments · Fixed by #22409
Closed
1 task done

SIGSEGV (Address boundary error) with dwm #22406

s3bba opened this issue Dec 24, 2024 · 2 comments · Fixed by #22409
Labels
bug [core label] linux linux-x11 Linux X11 panic / crash [core label]

Comments

@s3bba
Copy link
Contributor

s3bba commented Dec 24, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

I'm using a window manager (dwm) and this crash occurs when window is moved to another workspace and resized.
I think this may be somewhat hardware specific since I don't experience this on my other pc.

I've also created a backtrace for debugging, I'm unsure if this issue is even related to zed - it looks more like blade or ash crate issue.

~/work/builds/zed ❯❯❯ rust-gdb target/debug/zed
GNU gdb (GDB) 15.2
Reading symbols from target/debug/zed...
(gdb) run
Starting program: /home/sebba/work/builds/zed/target/debug/zed
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Thread 1 "zed" received signal SIGSEGV, Segmentation fault.
0x00007fffa6158323 in ?? () from /usr/lib/libnvidia-glcore.so.565.77
(gdb) backtrace
#0  0x00007fffa6158323 in ?? () from /usr/lib/libnvidia-glcore.so.565.77
#1  0x00007fffa6165a50 in ?? () from /usr/lib/libnvidia-glcore.so.565.77
#2  0x00007fffa622d6a8 in ?? () from /usr/lib/libnvidia-glcore.so.565.77
#3  0x0000555565caf2bf in ash::device::Device::cmd_pipeline_barrier () at /home/sebba/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ash-0.38.0+1.3.281/src/device.rs:2380
#4  0x0000555565c73ce4 in blade_graphics::hal::command::{impl#18}::init_texture () at src/vulkan/command.rs:505
#5  0x0000555565c74046 in blade_graphics::hal::CommandEncoder::init_texture () at src/vulkan/command.rs:431
#6  0x0000555564ad6aaf in gpui::platform::blade::blade_renderer::BladeRenderer::draw () at crates/gpui/src/platform/blade/blade_renderer.rs:534
#7  0x0000555564f2117e in gpui::platform::linux::x11::window::{impl#12}::draw () at crates/gpui/src/platform/linux/x11/window.rs:1368
#8  0x00005555649c50b4 in gpui::window::WindowContext::present () at crates/gpui/src/window.rs:1497
#9  0x0000555564f2506e in gpui::window::{impl#19}::new::{closure#4}::{closure#1}::{closure#0} () at crates/gpui/src/window.rs:707
#10 0x0000555564988b70 in gpui::app::{impl#5}::update_window::{closure#0}<(), gpui::window::{impl#19}::new::{closure#4}::{closure#1}::{closure_env#0}> () at crates/gpui/src/app.rs:1504
#11 0x0000555564978b91 in gpui::app::AppContext::update<core::result::Result<(), anyhow::Error>, gpui::app::{impl#5}::update_window::{closure_env#0}<(), gpui::window::{impl#19}::new::{closure#4}::{closure#1}::{closure_env#0}>> () at crates/gpui/src/app.rs:418
#12 0x000055556497df27 in gpui::app::{impl#5}::update_window<(), gpui::window::{impl#19}::new::{closure#4}::{closure#1}::{closure_env#0}> () at crates/gpui/src/app.rs:1495
#13 0x000055556497111b in gpui::app::async_context::{impl#0}::update_window<(), gpui::window::{impl#19}::new::{closure#4}::{closure#1}::{closure_env#0}> ()
    at crates/gpui/src/app/async_context.rs:91
#14 0x0000555564f4e966 in gpui::window::AnyWindowHandle::update<gpui::app::async_context::AsyncAppContext, (), gpui::window::{impl#19}::new::{closure#4}::{closure#1}::{closure_env#0}> ()
    at crates/gpui/src/window.rs:4838
#15 0x0000555564f2500b in gpui::window::{impl#19}::new::{closure#4}::{closure#1} () at crates/gpui/src/window.rs:704
#16 0x00005555649397dc in util::measure<(), gpui::window::{impl#19}::new::{closure#4}::{closure_env#1}> () at crates/util/src/util.rs:300
#17 0x0000555564f24d68 in gpui::window::{impl#19}::new::{closure#4} () at crates/gpui/src/window.rs:703
#18 0x0000555564f9d045 in alloc::boxed::{impl#49}::call_mut<(gpui::platform::RequestFrameOptions), dyn core::ops::function::FnMut<(gpui::platform::RequestFrameOptions), Output=()>, alloc::alloc::Global> () at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/alloc/src/boxed.rs:2077
#19 0x0000555564f1b4d7 in gpui::platform::linux::x11::window::X11WindowStatePtr::refresh () at crates/gpui/src/platform/linux/x11/window.rs:928
#20 0x0000555564ac501c in gpui::platform::linux::x11::client::X11Client::process_x11_events () at crates/gpui/src/platform/linux/x11/client.rs:549
#21 0x00005555649a4e46 in gpui::platform::linux::x11::client::{impl#8}::open_window::{closure#1} () at crates/gpui/src/platform/linux/x11/client.rs:1377
#22 0x0000555564fa7156 in calloop::sources::{impl#4}::process_events::{closure#0}<gpui::platform::linux::x11::client::X11Client, calloop::sources::timer::Timer, gpui::platform::linux::x11::client::{impl#8}::open_window::{closure_env#1}> () at /home/sebba/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.13.0/src/sources/mod.rs:327
#23 0x0000555564fdc3c6 in calloop::sources::timer::{impl#1}::process_events<calloop::sources::{impl#4}::process_events::{closure_env#0}<gpui::platform::linux::x11::client::X11Client, calloop::sources::timer::Timer, gpui::platform::linux::x11::client::{impl#8}::open_window::{closure_env#1}>> ()
    at /home/sebba/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.13.0/src/sources/timer.rs:122
#24 0x0000555564d6b8e4 in calloop::sources::{impl#4}::process_events<gpui::platform::linux::x11::client::X11Client, calloop::sources::timer::Timer, gpui::platform::linux::x11::client::{impl#8}::open_window::{closure_env#1}> () at /home/sebba/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.13.0/src/sources/mod.rs:326
#25 0x0000555564946594 in calloop::loop_logic::EventLoop::dispatch_events<gpui::platform::linux::x11::client::X11Client> ()
    at /home/sebba/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.13.0/src/loop_logic.rs:445
#26 0x0000555564952be1 in calloop::loop_logic::EventLoop::dispatch<gpui::platform::linux::x11::client::X11Client, core::option::Option<core::time::Duration>> ()
    at /home/sebba/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.13.0/src/loop_logic.rs:559
#27 0x0000555564950e97 in calloop::loop_logic::EventLoop::run<gpui::platform::linux::x11::client::X11Client, gpui::platform::linux::x11::client::{impl#8}::run::{closure_env#0}, core::option::Option<core::time::Duration>> () at /home/sebba/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.13.0/src/loop_logic.rs:596
#28 0x0000555564ad1adf in gpui::platform::linux::x11::client::{impl#8}::run () at crates/gpui/src/platform/linux/x11/client.rs:1527
#29 0x00005555649972f9 in gpui::platform::linux::platform::{impl#1}::run<gpui::platform::linux::x11::client::X11Client> () at crates/gpui/src/platform/linux/platform.rs:146
#30 0x000055555ac5c162 in gpui::app::App::run<zed::main::{closure_env#5}> () at crates/gpui/src/app.rs:166
#31 0x000055555ad8620e in zed::main () at crates/zed/src/main.rs:289

Environment

Zed: v0.168.0 (Zed Dev 45c7141)
OS: Linux X11 arch unknown
Memory: 31 GiB
Architecture: x86_64
GPU: Quadro P1000 || NVIDIA || 565.77

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

@s3bba s3bba added admin read Pending admin review bug [core label] panic / crash [core label] triage Maintainer needs to classify the issue labels Dec 24, 2024
@mikayla-maki
Copy link
Contributor

cc: @kvark

@kvark
Copy link
Contributor

kvark commented Dec 25, 2024

I think I see why this would happen.
Pretty sure we are hitting this path - https://github.com/kvark/blade/blob/8202bbeced1a49542697185a685e7467802fe3d3/blade-graphics/src/vulkan/surface.rs#L43-L48

kvark/blade#234 should address this.
I also recall other reports with similar symptoms (but a different call stack), so this should have a wide effect.

@notpeter notpeter changed the title SIGSEGV (Address boundary error) SIGSEGV (Address boundary error) with dwm Dec 27, 2024
@notpeter notpeter added linux linux-x11 Linux X11 and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Dec 27, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 27, 2024
Fixes #22406

Picks up:
- kvark/blade#234 and
kvark/blade#237 (`OutOfDate` workaround)
- kvark/blade#229 ("metal-rs" to "objc2"
migration)

Release Notes:

- Improved handling of resizing and multiple monitors in Linux/Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] linux linux-x11 Linux X11 panic / crash [core label]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants