crash: 'handle does not refer to a valid socket'
Happens seemingly randomly; probably need additional checks before garbage collecting closed sockets.
2023-03-15 17:58:53.567 669-799 onionmasq org.torproject.artitoyvpn E onionmasq_mobile::panic_handling: panic: panicked at 'handle does not refer to a valid socket', /Users/eta/.cargo/registry/src/github.com-1ecc6299db9ec823/smoltcp-0.8.2/src/iface/socket_set.rs:101:21
2023-03-15 17:58:53.852 669-799 onionmasq org.torproject.artitoyvpn E onionmasq_mobile::panic_handling: backtrace: 0: onionmasq_mobile::panic_handling::panic_hook
1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
at rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/alloc/src/boxed.rs:2032:9
std::panicking::rust_panic_with_hook
at rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/panicking.rs:692:13
2: std::panicking::begin_panic::{{closure}}
3: std::sys_common::backtrace::__rust_end_short_backtrace
4: std::panicking::begin_panic
5: smoltcp::iface::socket_set::SocketSet::get
6: <onion_tunnel::socket::TcpSocket as tokio::io::async_read::AsyncRead>::poll_read
7: <onion_tunnel::proxy::InteractiveCopier<R,W> as core::future::future::Future>::poll
8: <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
9: onion_tunnel::OnionTunnel<S>::proxy::{{closure}}
10: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
11: tokio::runtime::task::core::Core<T,S>::poll
12: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
13: std::panicking::try
14: tokio::runtime::task::harness::poll_future
15: tokio::runtime::task::harness::Harness<T,S>::poll_inner
16: tokio::runtime::task::harness::Harness<T,S>::poll
17: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
18: tokio::macros::scoped_tls::ScopedKey<T>::set
19: tokio::runtime::scheduler::multi_thread::worker::run
20: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
21: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
22: tokio::runtime::task::core::Core<T,S>::poll
23: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
24: std::panicking::try
25: tokio::runtime::task::harness::poll_future
26: tokio::runtime::task::harness::Harness<T,S>::poll_inner
27: tokio::runtime::task::harness::Harness<T,S>::poll
28: tokio::runtime::task::UnownedTask<S>::run
29: std::sys_common::backtrace::__rust_begin_short_backtrace
30: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
31: std::panicking::try
32: std::panic::catch_unwind
33: core::ops::function::FnOnce::call_once{{vtable.shim}}
34: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/alloc/src/boxed.rs:2000:9
<alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/alloc/src/boxed.rs:2000:9
std::sys::unix::thread::Thread::new::thread_start
at rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/sys/unix/thread.rs:108:17
35: _ZL15__pthread_startPv
36: __start_thread