baytechc / waasabi-matrix

Waasabi Matrix integration
Apache License 2.0
0 stars 0 forks source link

Bot fails to launch "thread main panicked at there is no reactor running" #16

Open flaki opened 3 years ago

flaki commented 3 years ago

The latest bot (version v0.2.0) fails to launch. After building a debug build and re-running the failing config.toml the error message is:

thread 'main' panicked at 'there is no reactor running, must be called from the context of a Tokio 1.x runtime', /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/runtime/blocking/pool.rs:85:33

The config.toml used:

``` [matrix] homeserver = "https://baytech.matrix.ungleich.cloud" user = "@waasabibot:baytech.community" password = "...WLc^" admins = ["@istvan:baytech.community"] [api] listen = "127.0.0.1:8383" secret = "154d..4db" [backend] host = "https://waasabi.eu.ngrok.io/waasabi" integrations_endpoint = "event-manager/integrations" user = "matrixbot" password = "o*..." ```

The backend at least receives the login request and responds with HTTP/200 so the credentials that are sent seem to be valid:

[2021-06-18T19:55:21.760Z] debug POST /waasabi/auth/local (121 ms) 200

Full backtrace below:

``` thread 'main' panicked at 'there is no reactor running, must be called from the context of a Tokio 1.x runtime', /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/runtime/blocking/pool.rs:85:33 stack backtrace: 0: 0x55ef64fb2f30 - std::backtrace_rs::backtrace::libunwind::trace::ha5edb8ba5c6b7a6c at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5 1: 0x55ef64fb2f30 - std::backtrace_rs::backtrace::trace_unsynchronized::h0de86d320a827db2 at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x55ef64fb2f30 - std::sys_common::backtrace::_print_fmt::h97b9ad6f0a1380ff at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:67:5 3: 0x55ef64fb2f30 - ::fmt::h14be7eb08f97fe80 at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:46:22 4: 0x55ef64fd4d3f - core::fmt::write::h2ca8877d3e0e52de at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/fmt/mod.rs:1094:17 5: 0x55ef64fad315 - std::io::Write::write_fmt::h64f5987220b618f4 at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/io/mod.rs:1584:15 6: 0x55ef64fb4fbb - std::sys_common::backtrace::_print::h7f1a4097308f2e0a at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:49:5 7: 0x55ef64fb4fbb - std::sys_common::backtrace::print::h1f799fc2ca7f5035 at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:36:9 8: 0x55ef64fb4fbb - std::panicking::default_hook::{{closure}}::hf38436e8a3ce1071 at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:208:50 9: 0x55ef64fb4a8d - std::panicking::default_hook::he2f8f3fae11ed1dd at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:225:9 10: 0x55ef64fb55cd - std::panicking::rust_panic_with_hook::h79a18548bd90c7d4 at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:591:17 11: 0x55ef64fb5167 - std::panicking::begin_panic_handler::{{closure}}::h212a72cc08e25126 at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:497:13 12: 0x55ef64fb33cc - std::sys_common::backtrace::__rust_end_short_backtrace::hbd6897dd42bc0fcd at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:141:18 13: 0x55ef64fb50c9 - rust_begin_unwind at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:493:5 14: 0x55ef640705b1 - core::panicking::panic_fmt::h77ecd04e9b1dd84d at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/panicking.rs:92:14 15: 0x55ef640704a3 - core::option::expect_failed::h128888968e00dc4d at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/option.rs:1241:5 16: 0x55ef64c98d96 - core::option::Option::expect::hfd5283429a3ca068 at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:349:21 17: 0x55ef64b3b2c3 - tokio::runtime::blocking::pool::spawn_blocking::h73b73ab528cf5775 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/runtime/blocking/pool.rs:85:14 18: 0x55ef64b77d79 - tokio::task::blocking::spawn_blocking::hecd29129753d2b89 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/task/blocking.rs:114:9 19: 0x55ef64b62ca5 - >::call::h31b4af7b70058748 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.5/src/client/connect/dns.rs:120:24 20: 0x55ef642c42ee - ::resolve::h1fabd82a6c07dc8e at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.5/src/client/connect/dns.rs:344:13 21: 0x55ef642c0865 - hyper::client::connect::dns::resolve::{{closure}}::h620691f13af18024 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.5/src/client/connect/dns.rs:354:5 22: 0x55ef641a1d13 - as core::future::future::Future>::poll::h7a3b0cef5256cf42 at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80:19 23: 0x55ef64471150 - hyper::client::connect::http::HttpConnector::call_async::{{closure}}::h7eb48140bfc1934b at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.5/src/client/connect/http.rs:334:25 24: 0x55ef641a3043 - as core::future::future::Future>::poll::hb9d50198fa4ce8da at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80:19 25: 0x55ef64451e1e - as tower_service::Service>::call::{{closure}}::ha41061e9258bf4ce at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.5/src/client/connect/http.rs:269:40 26: 0x55ef641a1663 - as core::future::future::Future>::poll::h665a5a95285841bc at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80:19 27: 0x55ef64212695 - as core::future::future::Future>::poll::h8a9fabd01ed15584 at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:120:9 28: 0x55ef6444eb36 - as core::future::future::Future>::poll::h04a37e09e813f89b at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.5/src/client/connect/http.rs:397:9 29: 0x55ef641f4f02 - as tower_service::Service>::call::{{closure}}::ha4da616c5ed666d7 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-tls-0.5.0/src/client.rs:136:23 30: 0x55ef641a3971 - as core::future::future::Future>::poll::hd3c5514e528a5a07 at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80:19 31: 0x55ef64212715 - as core::future::future::Future>::poll::hc4c51ea063432354 at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:120:9 32: 0x55ef6421367e - as core::future::future::Future>::poll::ha05adc60e4d71275 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-tls-0.5.0/src/client.rs:162:9 33: 0x55ef64219bf7 - as core::future::future::Future>::poll::hc0c0cf1821161ab3 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.5/src/service/oneshot.rs:50:28 34: 0x55ef6420406a - ::try_poll::h5313cfc45bf2095b at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.14/src/future.rs:84:9 35: 0x55ef64451876 - as core::future::future::Future>::poll::h65f02705297d1485 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.14/src/future/try_future/into_future.rs:35:9 36: 0x55ef64329211 - as core::future::future::Future>::poll::h993f0f35400a8832 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.14/src/future/future/map.rs:55:37 37: 0x55ef641cc4c6 - as core::future::future::Future>::poll::h1c63eb48b0f2abc9 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.14/src/lib.rs:102:13 38: 0x55ef64280b66 - as core::future::future::Future>::poll::h7d6c881707f843de at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.14/src/lib.rs:102:13 39: 0x55ef642a4e4a - ::try_poll::h44f6b8c472e83341 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.14/src/future.rs:84:9 40: 0x55ef644517d6 - as core::future::future::Future>::poll::h234d340842466596 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.14/src/future/try_future/into_future.rs:35:9 41: 0x55ef643285e4 - as core::future::future::Future>::poll::h3eaf4210f99ea67f at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.14/src/future/future/map.rs:55:37 42: 0x55ef641cc566 - as core::future::future::Future>::poll::h269e8dbb6abb99b0 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.14/src/lib.rs:102:13 43: 0x55ef64280ac6 - as core::future::future::Future>::poll::h3eff1de07cb3720b at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.14/src/lib.rs:102:13 44: 0x55ef642a4eaa - ::try_poll::h4eb0bda125efde17 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.14/src/future.rs:84:9 45: 0x55ef641a7fa9 - ::Ok> as core::future::future::Future>::poll::ha852b255acd65147 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.14/src/future/try_future/try_flatten.rs:48:34 46: 0x55ef64280ff6 - as core::future::future::Future>::poll::h61b9631309ac7aa5 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.14/src/lib.rs:102:13 47: 0x55ef64281046 - as core::future::future::Future>::poll::h9cf6f77b83ae739d at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.14/src/lib.rs:102:13 48: 0x55ef642cdfbb - as core::future::future::Future>::poll::h2efdd02eb36a7335 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.14/src/future/either.rs:72:32 49: 0x55ef642134e6 - as core::future::future::Future>::poll::ha42b78ebebaeab12 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.5/src/common/lazy.rs:65:28 50: 0x55ef641f7d58 - futures_util::future::future::FutureExt::poll_unpin::hcacf4b641122a132 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.14/src/future/future/mod.rs:562:9 51: 0x55ef643bec68 - as core::future::future::Future>::poll::hac6aa32f59e1de47 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.14/src/future/select.rs:101:36 52: 0x55ef6419217d - hyper::client::client::Client::connection_for::{{closure}}::h4aa93b6fe06e3db8 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.5/src/client/client.rs:340:15 53: 0x55ef6419fc59 - as core::future::future::Future>::poll::h082af39749e3cb38 at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80:19 54: 0x55ef6418fa36 - hyper::client::client::Client::send_request::{{closure}}::h63c871cb614add03 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.5/src/client/client.rs:227:26 55: 0x55ef641a3b89 - as core::future::future::Future>::poll::hd9fbbc47f1e71f47 at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80:19 56: 0x55ef64193e92 - hyper::client::client::Client::retryably_send_request::{{closure}}::h9a0e0b95d01418f3 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.5/src/client/client.rs:197:25 57: 0x55ef641a1b79 - as core::future::future::Future>::poll::h739cdf82640eb421 at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80:19 58: 0x55ef64b264d9 - as core::future::future::Future>::poll::hf90922d5986f5ada at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:120:9 59: 0x55ef64b420a0 - ::poll::h26bec2a53d140d55 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.5/src/client/client.rs:579:9 60: 0x55ef6428ea0e - ruma_client::Client::request_with_url_params::{{closure}}::h65378487fe619e61 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/ruma-client-0.5.0-alpha.2/src/lib.rs:373:30 61: 0x55ef641a0999 - as core::future::future::Future>::poll::h4622cd31175aa0f9 at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80:19 62: 0x55ef642995c5 - ruma_client::Client::request::{{closure}}::haee1db3f23a0d4c7 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/ruma-client-0.5.0-alpha.2/src/lib.rs:337:9 63: 0x55ef641a35b9 - as core::future::future::Future>::poll::hcaba2c8311e20fa0 at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80:19 64: 0x55ef6429729c - ruma_client::Client::log_in::{{closure}}::h34e437f74e8ead1a at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/ruma-client-0.5.0-alpha.2/src/lib.rs:222:24 65: 0x55ef641a2929 - as core::future::future::Future>::poll::ha38c82440f4fa11e at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80:19 66: 0x55ef6421aa73 - waasabi_matrix::matrix_bot::{{closure}}::h7c78714a508fe941 at /zpool/work/waasabi/waasabi-matrix/src/main.rs:61:5 67: 0x55ef641a2559 - as core::future::future::Future>::poll::h918a854a5a730d14 at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80:19 68: 0x55ef6421ca78 - waasabi_matrix::main::{{closure}}::h1971cf8b38b8c149 at /zpool/work/waasabi/waasabi-matrix/src/main.rs:137:5 69: 0x55ef641a41d9 - as core::future::future::Future>::poll::hf3e36faf16a5ad8b at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80:19 70: 0x55ef64478fe0 - tokio::runtime::enter::Enter::block_on::{{closure}}::h1f92ff425afefaf0 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/runtime/enter.rs:160:58 71: 0x55ef642688e2 - tokio::coop::with_budget::{{closure}}::h54e7d6a43fc7610e at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/coop.rs:127:9 72: 0x55ef643915b8 - std::thread::local::LocalKey::try_with::h51c783bcc612352f at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:376:16 73: 0x55ef64390ffd - std::thread::local::LocalKey::with::h5ea89025d8ebca82 at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:352:9 74: 0x55ef64478d35 - tokio::coop::with_budget::h684626c1987aad4b at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/coop.rs:120:5 75: 0x55ef64478d35 - tokio::coop::budget::h169f1c6756ccc2c6 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/coop.rs:96:5 76: 0x55ef64478d35 - tokio::runtime::enter::Enter::block_on::h7cbee5c0601e0c79 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/runtime/enter.rs:160:35 77: 0x55ef641c74de - tokio::runtime::thread_pool::ThreadPool::block_on::he43233d105a5acb9 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/runtime/thread_pool/mod.rs:82:9 78: 0x55ef644790ec - tokio::runtime::Runtime::block_on::{{closure}}::h04a859620b2a0383 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/runtime/mod.rs:446:39 79: 0x55ef643a8171 - tokio::runtime::context::enter::hf0ab9ba2aa0b6150 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/runtime/context.rs:72:5 80: 0x55ef641c9690 - tokio::runtime::handle::Handle::enter::hfdc9b22aa0b1a533 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/runtime/handle.rs:76:9 81: 0x55ef64479055 - tokio::runtime::Runtime::block_on::h14ef9c4a6a511684 at /home/flaki/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/runtime/mod.rs:441:9 82: 0x55ef6421c03a - waasabi_matrix::main::h607ebd34987c2e5c at /zpool/work/waasabi/waasabi-matrix/src/main.rs:85:1 83: 0x55ef642ea5cb - core::ops::function::FnOnce::call_once::h262de38f21145b28 at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5 84: 0x55ef64349b3e - std::sys_common::backtrace::__rust_begin_short_backtrace::hd92da783caaa279a at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:125:18 85: 0x55ef64252b51 - std::rt::lang_start::{{closure}}::h4d9b68d4cb2ebe1d at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:49:18 86: 0x55ef64fb5aca - core::ops::function::impls:: for &F>::call_once::hc4354216bf39217c at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/ops/function.rs:259:13 87: 0x55ef64fb5aca - std::panicking::try::do_call::hb68eb312780385cf at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:379:40 88: 0x55ef64fb5aca - std::panicking::try::h22b8e08595060b8b at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:343:19 89: 0x55ef64fb5aca - std::panic::catch_unwind::hc64f1a6a0e71b1fc at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panic.rs:431:14 90: 0x55ef64fb5aca - std::rt::lang_start_internal::h4461fc58637f04f8 at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/rt.rs:34:21 91: 0x55ef64252b30 - std::rt::lang_start::h89ef74f08ebefb3a at /home/flaki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:48:5 92: 0x55ef6421d06c - main 93: 0x7fc6452d60b3 - __libc_start_main 94: 0x55ef64070d4e - _start 95: 0x0 - ```
flaki commented 3 years ago

Apparently the issue was caused by conflicting Tokio versions, with 0.2.x and 1.x present concurrently across various dependencies. Upgrading the dependencies resolved the issue.