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

Crash on resuming from suspend #22

Closed
ahuston-0 opened this issue Oct 6, 2021 · 5 comments · Fixed by #36
Closed

Crash on resuming from suspend #22

ahuston-0 opened this issue Oct 6, 2021 · 5 comments · Fixed by #36

Comments

@ahuston-0
Copy link

Hi there! I've been using wired for a few months now, and sometime within the last few weeks I noticed that if I woke my laptop up from being suspended, I would not get anymore notifications (or in the case of Telegram, I'd get their default notifications). I'm not sure if this will include a whole lot of useful details, but this is the output I get from running wired, then systemctl suspend, and then waking up the machine 30 seconds later.

This is on Arch Linux, if you need details as to what WM I'm running or any package versions or anything let me know and I'll give more details.

> RUST_BACKTRACE=full wired

A wired socket exists; taking ownership.  Existing wired processes will not receive CLI calls.
Acquired notification bus name.
DBus Init Success.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 4, kind: Interrupted, message: "Interrupted system call" }', /home/alice/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/linux/x11/mod.rs:360:54
stack backtrace:
   0:     0x5561bc4c067c - <unknown>
   1:     0x5561bc4e65ac - <unknown>
   2:     0x5561bc4bc9c5 - <unknown>
   3:     0x5561bc4c2240 - <unknown>
   4:     0x5561bc4c1df7 - <unknown>
   5:     0x5561bc4c28f4 - <unknown>
   6:     0x5561bc4c23d0 - <unknown>
   7:     0x5561bc4c0b24 - <unknown>
   8:     0x5561bc4c2339 - <unknown>
   9:     0x5561bc2a02c1 - <unknown>
  10:     0x5561bc2a03b3 - <unknown>
  11:     0x5561bc2edd37 - <unknown>
  12:     0x5561bc2e4d5b - <unknown>
  13:     0x5561bc32a273 - <unknown>
  14:     0x5561bc310f89 - <unknown>
  15:     0x5561bc4c2efa - <unknown>
  16:     0x5561bc2e55f2 - <unknown>
  17:     0x7f745dd0db25 - __libc_start_main
  18:     0x5561bc2a0a9e - <unknown>
  19:                0x0 - <unknown>
@ahuston-0
Copy link
Author

ahuston-0 commented Oct 6, 2021

I compiled from source so I could get the debug info, as I realize release mode probably doesn't have a particularly useful stack trace. Here's the stack trace from wired built in debug mode

> RUST_BACKTRACE=full ./wired

A wired socket exists; taking ownership.  Existing wired processes will not receive CLI calls.
Acquired notification bus name.
DBus Init Success.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 4, kind: Interrupted, message: "Interrupted system call" }', /home/alice/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/linux/x11/mod.rs:360:54
stack backtrace:
   0:     0x55e26511fd5c - std::backtrace_rs::backtrace::libunwind::trace::h49c840f3a952c2eb
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x55e26511fd5c - std::backtrace_rs::backtrace::trace_unsynchronized::h970fbed62f2c306d
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55e26511fd5c - std::sys_common::backtrace::_print_fmt::h41e6dcef610013be
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x55e26511fd5c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h47eb9d690c7ee406
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x55e2651453cc - core::fmt::write::h72801a82c94e6ff1
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/core/src/fmt/mod.rs:1162:17
   5:     0x55e26511bb85 - std::io::Write::write_fmt::hd6b82cb7eca8de25
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/io/mod.rs:1684:15
   6:     0x55e265121710 - std::sys_common::backtrace::_print::hb52aa722c5512ecd
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x55e265121710 - std::sys_common::backtrace::print::he2e1e8a2ae490cb5
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x55e265121710 - std::panicking::default_hook::{{closure}}::h456b8dc7e1036ef7
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/panicking.rs:210:50
   9:     0x55e2651212bb - std::panicking::default_hook::h112e1a03bb7f7411
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/panicking.rs:227:9
  10:     0x55e265121dc4 - std::panicking::rust_panic_with_hook::h9d04d157d3d966dc
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/panicking.rs:624:17
  11:     0x55e2651218a0 - std::panicking::begin_panic_handler::{{closure}}::heb8583e1f0ca0bb3
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/panicking.rs:521:13
  12:     0x55e265120214 - std::sys_common::backtrace::__rust_end_short_backtrace::hf7f7df37cc03b639
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/sys_common/backtrace.rs:141:18
  13:     0x55e265121809 - rust_begin_unwind
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/panicking.rs:517:5
  14:     0x55e2649236b1 - core::panicking::panic_fmt::h7b8580d81fcbbacd
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/core/src/panicking.rs:100:14
  15:     0x55e2649237a3 - core::result::unwrap_failed::h885d3f7beb571353
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/core/src/result.rs:1617:5
  16:     0x55e264d657d6 - core::result::Result<T,E>::unwrap::h60f091f90b9f7a36
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/core/src/result.rs:1299:23
  17:     0x55e26493311a - winit::platform_impl::platform::x11::EventLoop<T>::run_return::hf8c50a406e8a82ae
                               at /home/alice/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/linux/x11/mod.rs:360:17
  18:     0x55e264a58da9 - winit::platform_impl::platform::EventLoop<T>::run_return::h8dc7572580c60df6
                               at /home/alice/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/linux/mod.rs:655:56
  19:     0x55e2649d3fbc - <winit::event_loop::EventLoop<T> as winit::platform::run_return::EventLoopExtRunReturn>::run_return::hd271b39bd161094f
                               at /home/alice/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform/run_return.rs:56:9
  20:     0x55e264935447 - wired::main::hb3f03f5e397d7f34
                               at /home/alice/.gitprojects/wired-notify/src/main.rs:96:5
  21:     0x55e2649fe4fb - core::ops::function::FnOnce::call_once::h9bb7e7dc35542bc3
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/core/src/ops/function.rs:227:5
  22:     0x55e26492457e - std::sys_common::backtrace::__rust_begin_short_backtrace::hd3796abcbc652f33
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/sys_common/backtrace.rs:125:18
  23:     0x55e26498e3f1 - std::rt::lang_start::{{closure}}::h1861b3b23ae48f8c
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/rt.rs:146:18
  24:     0x55e26511f5f1 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hab43eb8ec758341e
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/core/src/ops/function.rs:259:13
  25:     0x55e26511f5f1 - std::panicking::try::do_call::hb667fefd650e964d
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/panicking.rs:403:40
  26:     0x55e26511f5f1 - std::panicking::try::ha931fd6ebac8fbbe
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/panicking.rs:367:19
  27:     0x55e26511f5f1 - std::panic::catch_unwind::h6dea53a7cec89f28
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/panic.rs:133:14
  28:     0x55e26511f5f1 - std::rt::lang_start_internal::{{closure}}::hb3b7f5e999296490
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/rt.rs:128:48
  29:     0x55e26511f5f1 - std::panicking::try::do_call::habca359de051411d
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/panicking.rs:403:40
  30:     0x55e26511f5f1 - std::panicking::try::hb720f278a829d868
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/panicking.rs:367:19
  31:     0x55e26511f5f1 - std::panic::catch_unwind::hb20d53a1f0aa3271
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/panic.rs:133:14
  32:     0x55e26511f5f1 - std::rt::lang_start_internal::hb45fe9ae400825d3
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/rt.rs:128:20
  33:     0x55e26498e3c0 - std::rt::lang_start::h0b967e3e907f6de8
                               at /rustc/003d8d3f56848b6f3833340e859b089a09aea36a/library/std/src/rt.rs:145:17
  34:     0x55e2649354cc - main
  35:     0x7fc46eb58b25 - __libc_start_main
  36:     0x55e264923e6e - _start
  37:                0x0 - <unknown>

@Toqozz
Copy link
Owner

Toqozz commented Oct 7, 2021

Thanks for the detailed issue!

After investigating a bit, it looks like this is an issue in winit (the windowing library we're using). Someone has already opened an issue + a pull request: rust-windowing/winit#1947

All we can do is wait at this point, unfortunately.

@VuiMuich
Copy link
Contributor

VuiMuich commented Nov 29, 2021

As suggested in the linkes issue in winit this patch is working, until they merge their version bump

just add this to Cargo.toml:

[patch.crates-io]
winit = { git = "https://github.com/jfrimmel/winit", branch = "x11-interrupt" }

@ahuston-0
Copy link
Author

As suggested in the linkes issue in winit this patch is working, until they merge their version bump

* [Release 0.26.0 rust-windowing/winit#2043](https://github.com/rust-windowing/winit/pull/2043)

just add this to Cargo.toml:

[patch.crates-io]
winit = { git = "https://github.com/jfrimmel/winit", branch = "x11-interrupt" }

Totally forgot to mention that I had tried this, but I can confirm that this works as a solution for the xinit issue. Hopefully, it gets merged upstream at some point.

@Toqozz
Copy link
Owner

Toqozz commented Nov 29, 2021

Roger that, I will keep an eye on the 0.26.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants