nox icon indicating copy to clipboard operation
nox copied to clipboard

LibP2P Protocol: unexpected EOF when reading incoming ProtocolMessage

Open folex opened this issue 2 years ago • 0 comments

After updating to the latest libp2p, exceptions started to appear in logs:

[2022-03-22T13:55:36.259798Z WARN  particle_protocol::libp2p_protocol::upgrade] Error processing inbound ProtocolMessage: unexpected end of file

    Location:
        /__w/fluence/fluence/particle-protocol/src/libp2p_protocol/upgrade.rs:126:30

    Stack backtrace:
       0: core::ops::function::Fn::call
       1: eyre::capture_handler
       2: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
       3: <libp2p_core::either::EitherFuture2<AFut,BFut> as core::future::future::Future>::poll
       4: futures_util::future::future::FutureExt::poll_unpin
       5: <libp2p_swarm::protocols_handler::node_handler::NodeHandlerWrapper<TProtoHandler> as libp2p_core::connection::handler::ConnectionHandler>::poll
       6: libp2p_core::connection::Connection<TMuxer,THandler>::poll
       7: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
       8: futures_executor::thread_pool::PoolState::work
       9: std::sys_common::backtrace::__rust_begin_short_backtrace
      10: core::ops::function::FnOnce::call_once{{vtable.shim}}
      11: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                 at ./rustc/ec4bcaac450279b029f3480b8b8f1b82ab36a5eb/library/alloc/src/boxed.rs:1854:9
      12: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                 at ./rustc/ec4bcaac450279b029f3480b8b8f1b82ab36a5eb/library/alloc/src/boxed.rs:1854:9
      13: std::sys::unix::thread::Thread::new::thread_start
                 at ./rustc/ec4bcaac450279b029f3480b8b8f1b82ab36a5eb/library/std/src/sys/unix/thread.rs:108:17
      14: start_thread
      15: clone

[2022-03-22T13:55:36.260040Z WARN  particle_protocol::libp2p_protocol::upgrade] Error sending ProtocolMessage: Custom { kind: WriteZero, error: "e4278881/14: connection is closed" }
[2022-03-22T13:55:37.536056Z WARN  particle_protocol::libp2p_protocol::upgrade] Error processing inbound ProtocolMessage: unexpected end of file

Probably, the channel closing procedure is implemented incorrectly. Need to investigate that.

folex avatar Mar 22 '22 14:03 folex