Skip to content

wayland-backend panicking on client specific behavior #858

@LuckShiba

Description

@LuckShiba

Some edge case leads to wayland-backend panicking and crashing the compositor. I couldn't find exactly what is needed to reproduce it, I can't even reproduce in my main computer. But I got reports of this same panic in two different (not directly related?) cases:

  1. Right upon opening KDE's kinfocenter (this one could be reproduced in both niri and latest commit Anvil in the same machine every time kinfocenter was opened consistently);
  2. Another user reported on niri's server the same panic happening on clicking on the "Print" button on 1password GUI when it asks you to print your recovery information. This user couldn't get access to this same button again, but while it was available, the panic was also consistent.

Both cases share the same error:

thread 'main' (12411) panicked at /builddir/build/BUILD/niri-0.0.git.2608.b5640d52-build/niri/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wayland-backend-0.3.11/src/sys/server_impl/mod.rs:1576:17:
Callback creating object zxdg_exported_v2@58 did not provide any object data.
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /builddir/build/BUILD/rust-1.92.0-build/rustc-1.92.0-src/library/std/src/panicking.rs:698:5
   1: core::panicking::panic_fmt
             at /builddir/build/BUILD/rust-1.92.0-build/rustc-1.92.0-src/library/core/src/panicking.rs:80:14
   2: resource_dispatcher<niri::niri::State>
             at /builddir/build/BUILD/niri-0.0.git.2608.b5640d52-build/niri/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wayland-backend-0.3.11/src/sys/server_impl/mod.rs:1576:17
   3: <unknown>
   4: wl_event_loop_dispatch
   5: {closure#0}<niri::niri::State>
             at /builddir/build/BUILD/niri-0.0.git.2608.b5640d52-build/niri/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wayland-backend-0.3.11/src/sys/server_impl/mod.rs:410:13
   6: set<(alloc::sync::Arc<std::sync::poison::mutex::Mutex<(dyn wayland_backend::sys::server_impl::ErasedState + core::marker::Send)>, alloc::alloc::Global>, *mut core::ffi::c_void), wayland_backend::sys::server_impl::{impl#21}::dispatch_all_clients::{closure_env#0}<niri::niri::State>, i32>
             at /builddir/build/BUILD/niri-0.0.git.2608.b5640d52-build/niri/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/scoped-tls-1.0.1/src/lib.rs:137:9
   7: dispatch_all_clients<niri::niri::State>
             at /builddir/build/BUILD/niri-0.0.git.2608.b5640d52-build/niri/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wayland-backend-0.3.11/src/sys/server_impl/mod.rs:407:26
   8: dispatch_all_clients<niri::niri::State>
             at /builddir/build/BUILD/niri-0.0.git.2608.b5640d52-build/niri/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wayland-backend-0.3.11/src/sys/../server_api.rs:579:22
   9: dispatch_clients<niri::niri::State>
             at /builddir/build/BUILD/niri-0.0.git.2608.b5640d52-build/niri/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wayland-server-0.31.10/src/display.rs:59:22
  10: {closure#10}
             at /builddir/build/BUILD/niri-0.0.git.2608.b5640d52-build/niri/src/niri.rs:2655:39
  11: {closure#0}<niri::niri::State, calloop::sources::generic::Generic<wayland_server::display::Display<niri::niri::State>, std::io::error::Error>, niri::niri::{impl#5}::new::{closure_env#10}>
             at /builddir/build/BUILD/niri-0.0.git.2608.b5640d52-build/niri/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/calloop-0.14.3/src/sources/mod.rs:327:61
  12: process_events<wayland_server::display::Display<niri::niri::State>, std::io::error::Error, calloop::sources::{impl#4}::process_events::{closure_env#0}<niri::niri::State, calloop::sources::generic::Generic<wayland_server::display::Display<niri::niri::State>, std::io::error::Error>, niri::niri::{impl#5}::new::{closure_env#10}>>
             at /builddir/build/BUILD/niri-0.0.git.2608.b5640d52-build/niri/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/calloop-0.14.3/src/sources/generic.rs:290:9
  13: process_events<niri::niri::State, calloop::sources::generic::Generic<wayland_server::display::Display<niri::niri::State>, std::io::error::Error>, niri::niri::{impl#5}::new::{closure_env#10}>
             at /builddir/build/BUILD/niri-0.0.git.2608.b5640d52-build/niri/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/calloop-0.14.3/src/sources/mod.rs:327:14
  14: dispatch_events<niri::niri::State>
             at /builddir/build/BUILD/niri-0.0.git.2608.b5640d52-build/niri/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/calloop-0.14.3/src/loop_logic.rs:527:36
  15: dispatch<niri::niri::State, core::option::Option<core::time::Duration>>
             at /builddir/build/BUILD/niri-0.0.git.2608.b5640d52-build/niri/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/calloop-0.14.3/src/loop_logic.rs:632:14
  16: run<niri::niri::State, niri::main::{closure_env#3}, core::option::Option<core::time::Duration>>
             at /builddir/build/BUILD/niri-0.0.git.2608.b5640d52-build/niri/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/calloop-0.14.3/src/loop_logic.rs:669:18
  17: main
             at /builddir/build/BUILD/niri-0.0.git.2608.b5640d52-build/niri/src/main.rs:265:10
  18: call_once<fn() -> core::result::Result<(), alloc::boxed::Box<dyn core::error::Error, alloc::alloc::Global>>, ()>
             at /builddir/build/BUILD/rust-1.92.0-build/rustc-1.92.0-src/library/core/src/ops/function.rs:250:5

I don't know if this was due to a recent change or how this is related, but these two reports happened in the same day. I'll update here if I discover anything else about this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions