Open joshuef opened 5 months ago
Thank you for the report. It looks like it happens when receiving an event from the behaviour.
Could you provide any code to reproduce it and any possible logs?
it seems we had two relay events around the panic time:
[2024-05-20T07:07:36.488761Z INFO sn_networking::event::swarm] relay client event event=OutboundCircuitEstablished { relay_peer_id: PeerId("12D3KooWPQYu4GjLEEwxp1BmgneDDwajawjUhT9ZupTbp6LRT4Ra"), limit: None }```
```May 22 20:41:19 ShuNetV3-node-4 safenode[3790806]: Location: /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libp2p-swarm-0.44.2/src/handler/either.rs:106
May 22 20:41:19 ShuNetV3-node-4 safenode[3790806]: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
May 22 20:41:19 ShuNetV3-node-4 safenode[3790806]: ⋮ 7 frames hidden ⋮
May 22 20:41:19 ShuNetV3-node-4 safenode[3790806]: 8: core::panicking::panic::h584a128616e7fa9b
May 22 20:41:19 ShuNetV3-node-4 safenode[3790806]: at <unknown source file>:<unknown line>
May 22 20:41:19 ShuNetV3-node-4 safenode[3790806]: 9: <libp2p_swarm::handler::select::ConnectionHandlerSelect<TProto1,TProto2> as libp2p_swarm::handler::ConnectionHandler>::on_behaviour_event::h75b996a885f09be9
May 22 20:41:19 ShuNetV3-node-4 safenode[3790806]: at <unknown source file>:<unknown line>
May 22 20:41:19 ShuNetV3-node-4 safenode[3790806]: 10: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll::h0adc49c52e11e997
May 22 20:41:19 ShuNetV3-node-4 safenode[3790806]: at <unknown source file>:<unknown line>
May 22 20:41:19 ShuNetV3-node-4 safenode[3790806]: 11: tokio::runtime::task::core::Core<T,S>::poll::h96755579c44ce1d6
May 22 20:41:19 ShuNetV3-node-4 safenode[3790806]: at <unknown source file>:<unknown line>
May 22 20:41:19 ShuNetV3-node-4 safenode[3790806]: 12: tokio::runtime::task::raw::poll::h5bedef3875a2cdb8
May 22 20:41:19 ShuNetV3-node-4 safenode[3790806]: at <unknown source file>:<unknown line>
trying to gather more logs (it's not super frequent, but we are seeing it often ish, we've restarted nodes with debugger attached just now)
Summary
Seemingly the
unreachable
code on a match in the swarm handler is panicking?!This does not actually crash our app (I assume it's a spawned thread).
But it's not clear to me how this is even possible :|
Expected behavior
no panic
Actual behavior
panic
Relevant log output
Possible Solution
No response
Version
No response
Would you like to work on fixing this bug ?
Maybe