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

[Rust] thread 'main' panicked at 'Removing an unknown connection' #91

Closed
Fitzsimmons opened this issue Mar 13, 2018 · 3 comments
Closed

Comments

@Fitzsimmons
Copy link

This is happening with the gnirehtet-v2.2 release from github on linux, but also with a fresh build from the master branch.

This happens a few minutes after a gnirehtet run. I'm not sure what causes it, since I'm typically not actively using my phone when it crashes. The time before a crash is also not consistent.

Messages like this sometimes but not always precede the crash:

2018-03-13 10:56:11.087 ERROR TcpConnection: [redacted] -> [redacted] Cannot read: [ConnectionReset] Connection reset by peer (os error 104)

I've done a debug build of the master branch and run it with RUST_BACKTRACE=1. Here's the output:

thread 'main' panicked at 'Removing an unknown connection', /checkout/src/libcore/option.rs:891:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at /checkout/src/libstd/sys_common/backtrace.rs:68
             at /checkout/src/libstd/sys_common/backtrace.rs:57
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/panicking.rs:381
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:397
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:577
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:538
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:522
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:498
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:71
   9: core::option::expect_failed
             at /checkout/src/libcore/option.rs:891
  10: <core::option::Option<T>>::expect
             at /checkout/src/libcore/option.rs:302
  11: relaylib::relay::router::Router::remove
             at src/relay/router.rs:140
  12: relaylib::relay::tcp_connection::TcpConnection::remove_from_router
             at src/relay/tcp_connection.rs:208
  13: relaylib::relay::tcp_connection::TcpConnection::process
             at src/relay/tcp_connection.rs:246
  14: relaylib::relay::tcp_connection::TcpConnection::on_ready
             at src/relay/tcp_connection.rs:212
  15: relaylib::relay::tcp_connection::TcpConnection::new::{{closure}}
             at src/relay/tcp_connection.rs:188
  16: <F as relaylib::relay::selector::EventHandler>::on_ready
             at src/relay/selector.rs:34
  17: relaylib::relay::selector::Selector::run_handlers
             at src/relay/selector.rs:116
  18: relaylib::relay::relay::Relay::poll_loop
             at src/relay/relay.rs:75
  19: relaylib::relay::relay::Relay::run
             at src/relay/relay.rs:45
  20: relaylib::relay
             at src/lib.rs:33
  21: gnirehtet::cmd_relay
             at src/main.rs:449
  22: gnirehtet::cmd_run
             at src/main.rs:347
  23: <gnirehtet::RunCommand as gnirehtet::Command>::execute
             at src/main.rs:148
  24: gnirehtet::main
             at src/main.rs:583
  25: std::rt::lang_start::{{closure}}
             at /checkout/src/libstd/rt.rs:74
  26: std::panicking::try::do_call
             at /checkout/src/libstd/rt.rs:59
             at /checkout/src/libstd/panicking.rs:480
  27: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:101
  28: std::rt::lang_start_internal
             at /checkout/src/libstd/panicking.rs:459
             at /checkout/src/libstd/panic.rs:365
             at /checkout/src/libstd/rt.rs:58
  29: std::rt::lang_start
             at /checkout/src/libstd/rt.rs:74
  30: main
  31: __libc_start_main
  32: _start

Let me know if there's anything else I can do to help debug this issue.

@rom1v
Copy link
Collaborator

rom1v commented Mar 13, 2018

Thank you for your report.

This is a duplicate of #61 and #85.

This bug has already been fixed on the dev branch: #61 (comment).

@rom1v rom1v closed this as completed Mar 13, 2018
@Fitzsimmons
Copy link
Author

Fitzsimmons commented Mar 13, 2018

Are there any blockers preventing the fix on the dev branch from being released? I'm happy to run a dev build since I'm a rust developer, but this is a show stopping bug for everyone else.

It might make sense to leave the issue open until the fix is released instead of when the fix is merged, to cut down on dupes.

@rom1v
Copy link
Collaborator

rom1v commented Mar 13, 2018

Are there any blockers preventing the fix on the dev branch from being released?

No, you're right, this is an important fix. 👍

I just released a new version (2.2.1).

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

2 participants