Crash on fail to spawn thread
asusd is a long running process and can receive many messages over time. The BT is:
thread 'main' panicked at 'failed to spawn thread: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', /home/luke/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:620:29
stack backtrace:
0: 0x557e9a2de740 - std::backtrace_rs::backtrace::libunwind::trace::h4dee703919bfd40a
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
1: 0x557e9a2de740 - std::backtrace_rs::backtrace::trace_unsynchronized::h457e839f1a563e20
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x557e9a2de740 - std::sys_common::backtrace::_print_fmt::h86a55fb30f8393c8
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/sys_common/backtrace.rs:67:5
3: 0x557e9a2de740 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7b3d6cac46d277e1
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/sys_common/backtrace.rs:46:22
4: 0x557e9a30158f - core::fmt::write::h127419eb46f2ecc9
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/core/src/fmt/mod.rs:1092:17
5: 0x557e9a2dae15 - std::io::Write::write_fmt::h6010cfbb4726588b
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/io/mod.rs:1578:15
6: 0x557e9a2e07bb - std::sys_common::backtrace::_print::h79b4f9652330cc9d
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/sys_common/backtrace.rs:49:5
7: 0x557e9a2e07bb - std::sys_common::backtrace::print::h330bb326a76af8cf
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/sys_common/backtrace.rs:36:9
8: 0x557e9a2e07bb - std::panicking::default_hook::{{closure}}::heb6a42a7d50a472e
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/panicking.rs:208:50
9: 0x557e9a2e0283 - std::panicking::default_hook::h17e521ba6d68d6e1
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/panicking.rs:225:9
10: 0x557e9a2e0edd - std::panicking::rust_panic_with_hook::h70db735e3a6e70cb
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/panicking.rs:591:17
11: 0x557e9a2e0aa7 - std::panicking::begin_panic_handler::{{closure}}::h777c71c8e5a7e25c
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/panicking.rs:497:13
12: 0x557e9a2debfc - std::sys_common::backtrace::__rust_end_short_backtrace::h3e9bf30168899554
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/sys_common/backtrace.rs:141:18
13: 0x557e9a2e0a09 - rust_begin_unwind
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/panicking.rs:493:5
14: 0x557e9a2ffcf1 - core::panicking::panic_fmt::h5322a082d19786c3
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/core/src/panicking.rs:92:14
15: 0x557e9a2ffb13 - core::option::expect_none_failed::h354eaa93a51d71b8
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/core/src/option.rs:1329:5
16: 0x557e9a19d4dd - core::result::Result<T,E>::expect::heb48d018268ee0e4
17: 0x557e9a19a7a0 - std::thread::spawn::h074d6679c0772f47
18: 0x557e9a1adafd - zbus::azync::connection::Connection::receive_specific::{{closure}}::h6ec67f88432c7119
19: 0x557e9a1abb4e - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hbc88bc08143b0c69
20: 0x557e9a17e4d9 - async_io::driver::block_on::hc328be5aaeb50c39
21: 0x557e9a1ac867 - zbus::connection::Connection::receive_message::h784628813309cd84
22: 0x557e9a243b72 - zbus::object_server::ObjectServer::try_handle_next::h9fe0a9876df18e30
23: 0x557e9a002587 - asusd::start_daemon::ha0f714b4a9686382
24: 0x557e9a001373 - asusd::main::hf26ceba184a6b6b3
25: 0x557e9a003e06 - core::ops::function::FnOnce::call_once::h5d3027d6b19c08dd
26: 0x557e9a003d1c - std::sys_common::backtrace::__rust_begin_short_backtrace::h089ee6c3e397d8e2
27: 0x557e9a005b5c - std::rt::lang_start::{{closure}}::h55e0553332b6cb66
28: 0x557e9a2e12da - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hbcc915e668c7ca11
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/core/src/ops/function.rs:259:13
29: 0x557e9a2e12da - std::panicking::try::do_call::h6b0f430d48122ddf
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/panicking.rs:379:40
30: 0x557e9a2e12da - std::panicking::try::h6ba420e2e21b5afa
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/panicking.rs:343:19
31: 0x557e9a2e12da - std::panic::catch_unwind::h8366719d1f615eee
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/panic.rs:431:14
32: 0x557e9a2e12da - std::rt::lang_start_internal::h965c28c9ce06ee73
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/rt.rs:51:25
33: 0x557e9a005b4e - std::rt::lang_start::h05154b4d3c2b5a87
34: 0x557e9a002ec3 - main
35: 0x7fea21c4fb75 - <unknown>
36: 0x557e99ffd2ee - _start
37: 0x0 - <unknown>
Where the lines:
16: 0x557e9a19d4dd - core::result::Result<T,E>::expect::heb48d018268ee0e4
17: 0x557e9a19a7a0 - std::thread::spawn::h074d6679c0772f47
18: 0x557e9a1adafd - zbus::azync::connection::Connection::receive_specific::{{closure}}::h6ec67f88432c7119
19: 0x557e9a1abb4e - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hbc88bc08143b0c69
20: 0x557e9a17e4d9 - async_io::driver::block_on::hc328be5aaeb50c39
21: 0x557e9a1ac867 - zbus::connection::Connection::receive_message::h784628813309cd84
indicate that zbus isn't handling a failure in a way that will prevent crashing.