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

Implement error conversion #133

Open
rubdos opened this issue Feb 12, 2022 · 0 comments
Open

Implement error conversion #133

rubdos opened this issue Feb 12, 2022 · 0 comments

Comments

@rubdos
Copy link
Member

rubdos commented Feb 12, 2022

Currently, the Actix backend does not implement error conversion. We got the first crash in the wild, although the Whisperfish actor seemed to recover after that.

impl From<WsProtocolError> for AwcWebSocketError {
    fn from(e: WsProtocolError) -> AwcWebSocketError {
        todo!("error conversion {:?}", e)
        // return Some(Err(ServiceError::WsError {
        //     reason: e.to_string(),
        // }));
    }
}
[2021-12-22T14:27:25Z TRACE libsignal_service_actix::websocket] Triggering keep-alive
[2021-12-22T14:27:25Z TRACE libsignal_service::messagepipe] Sending request WebSocketRequestMessage { verb: Some("GET"), path: Some("/v1/keepalive"), body: None, headers: [], id: Some(1640183245225) }
[2021-12-22T14:27:25Z TRACE libsignal_service::messagepipe] request on route.
thread 'main' panicked at 'not yet implemented: error conversion Io(Kind(UnexpectedEof))', /home/mersdk/cargo/git/checkouts/libsignal-service-rs-57c3f8dab81a594f/49651bb/libsignal-service-actix/src/websocket.rs:47:9
stack backtrace:
   0:       0x5a74bf1f94 - std::backtrace_rs::backtrace::libunwind::trace::h4053ad6853eb3582
                               at /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:       0x5a74bf1f94 - std::backtrace_rs::backtrace::trace_unsynchronized::h3cd99e1d7628b4b0
                               at /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:       0x5a74bf1f94 - std::sys_common::backtrace::_print_fmt::h3ca5dd6a1c61f5e2
                               at /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/std/src/sys_common/backtrace.rs:67:5
   3:       0x5a74bf1f94 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9c15be0c4a0616a8
                               at /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/std/src/sys_common/backtrace.rs:46:22
   4:       0x5a74752d1c - core::fmt::write::he5c8b5c4e10fee36
                               at /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/core/src/fmt/mod.rs:1092:17
   5:       0x5a74bf1684 - std::io::Write::write_fmt::hb80c9754d7325278
                               at /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/std/src/io/mod.rs:1572:15
   6:       0x5a74bf0fb0 - std::sys_common::backtrace::_print::hf99a40a583c4b2ee
                               at /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/std/src/sys_common/backtrace.rs:49:5
   7:       0x5a74bf0fb0 - std::sys_common::backtrace::print::hf01f1c360c3f3281
                               at /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/std/src/sys_common/backtrace.rs:36:9
   8:       0x5a74bf0fb0 - std::panicking::default_hook::{{closure}}::he97a30ca46a3471d
                               at /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/std/src/panicking.rs:208:50
   9:       0x5a74bf03a0 - std::panicking::default_hook::h28e2b8725e916778
                               at /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/std/src/panicking.rs:225:9
  10:       0x5a74bf03a0 - std::panicking::rust_panic_with_hook::h381a1a1d878d983f
                               at /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/std/src/panicking.rs:591:17
  11:       0x5a74c0a238 - std::panicking::begin_panic_handler::{{closure}}::h3e441aa93da6512f
                               at /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/std/src/panicking.rs:497:13
  12:       0x5a74c0a1b4 - std::sys_common::backtrace::__rust_end_short_backtrace::h6bd7448eccdae96b
                               at /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/std/src/sys_common/backtrace.rs:141:18
  13:       0x5a74c0a168 - rust_begin_unwind
                               at /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/std/src/panicking.rs:493:5
  14:       0x5a74750e50 - core::panicking::panic_fmt::he8b3ba9c2f95546f
                               at /home/rsmet/rpmbuild/BUILD/rustc-1.52.1-src/library/core/src/panicking.rs:92:14
  15:       0x5a74a66658 - tokio::runtime::task::raw::poll::h94e25952ded6141d
  16:       0x5a74c36210 - tokio::task::local::LocalSet::tick::he6168425f2750c9d
  17:       0x5a74897600 - <futures_util::future::poll_fn::PollFn<F> as core::future::future::Future>::poll::h667069554f2a683a
  18:       0x5a74b10e70 - ProcessQtEvent
  19:       0x5a74d5b27c - _ZN5Waker11customEventEP6QEvent
                               at /home/mersdk/cargo/registry/src/github.com-1285ae84e5963aae/qmetaobject-0.2.5/src/future.rs:66:194
  20:       0x5a74d5b27c - _ZN5Waker11customEventEP6QEvent
                               at /home/mersdk/cargo/registry/src/github.com-1285ae84e5963aae/qmetaobject-0.2.5/src/future.rs:59:14
  21:       0x7d62ad8af0 - _ZN7QObject5eventEP6QEvent
  22:       0x7d62aae144 - _ZN16QCoreApplication6notifyEP7QObjectP6QEvent
  23:       0x7d62aae2e8 - _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent
  24:       0x7d62ab06b8 - _ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData
  25:       0x7d62b00648 - <unknown>
  26:       0x7d60c0c234 - g_main_context_dispatch
  27:       0x7d60c0c4a0 - <unknown>
  28:       0x7d60c0c534 - g_main_context_iteration
  29:       0x7d62b00a90 - _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE
  30:       0x7d62aac608 - _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE
  31:       0x7d62ab41d4 - _ZN16QCoreApplication4execEv
  32:       0x5a74887ec8 - qmeta_async::run::h6a7bebc2d3d1853f
  33:       0x5a74718e7c - harbour_whisperfish::main::hfc7c76c99c89e269
  34:       0x5a74a0770c - std::sys_common::backtrace::__rust_begin_short_backtrace::hd45e477692160929
  35:       0x5a7471a484 - main
  36:       0x7d6169311c - __libc_start_main
  37:       0x5a74716874 - <unknown>
[2021-12-22T14:28:10Z DEBUG libsignal_service::messagepipe] WebSocket stream ended.
[2021-12-22T14:28:10Z INFO  libsignal_service::messagepipe] Sink was closed. Reason: Ok(())
[2021-12-22T14:28:10Z DEBUG harbour_whisperfish::worker::client] Attempting reconnect
[2021-12-22T14:28:10Z TRACE libsignal_service_actix::websocket] Will start websocket at Url [REDACTED]
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

No branches or pull requests

1 participant