Skip to content

tcp: Listener terminated with error causing litep2p backend to exit #437

@lexnv

Description

@lexnv

Some Paseo validators have reported the following error:

Sep 06 15:54:25 vo-phx1 polkadot\[957593\]: 2025-09-06 15:54:25.480 ERROR tokio-runtime-worker litep2p::tcp: TCP listener terminated with error error=Os { code: 103, kind: ConnectionAborted, message: "Software caused connection abort" }
Sep 06 15:54:25 vo-phx1 polkadot\[957593\]: 2025-09-06 15:54:25.480 ERROR tokio-runtime-worker litep2p::transport-manager: Installed transports terminated, ignore if the node is stopping
Sep 06 15:54:25 vo-phx1 polkadot\[957593\]: 2025-09-06 15:54:25.480 ERROR tokio-runtime-worker sub-libp2p: Litep2p backend terminated
Sep 06 15:54:25 vo-phx1 polkadot\[957593\]: 2025-09-06 15:54:25.588  INFO tokio-runtime-worker sub-authority-discovery: Successfully persisted AddrCache on disk
Sep 06 15:54:26 vo-phx1 polkadot\[957593\]: 2025-09-06 15:54:26.370  WARN tokio-runtime-worker parachain::availability-recovery: Recovery of available data failed. candidate\_hash=0xf8be43ec2e00ab7210e6f864e71f5dfcc25b1137b854fc066fcfb7f549aba6ca traceID=>
Sep 06 15:54:26 vo-phx1 polkadot\[957593\]: 2025-09-06 15:54:26.370  WARN tokio-runtime-worker parachain::availability-recovery: Error during recovery: Data is unavailable

The TCP Listener has returned an error, which is propagated to the TCP transport as stream terminated (Some(None)):

Some(Err(error)) => {
tracing::error!(
target: LOG_TARGET,
?error,
"TCP listener terminated with error",
);
Poll::Ready(None)
}

The downstream effect of this is that the TCP transport will terminate on a None event. Then, the litep2p backend will terminate on the None event propagated from the TCP transport.

This is effectively causing a cascade of events that terminate the litep2p backend.

The error originates from the Tokio TCP listener:

match listener.poll_accept(cx) {
Poll::Pending => {}
Poll::Ready(Err(error)) => {
self.poll_index = (self.poll_index + 1) % len;
return Poll::Ready(Some(Err(error)));
}

This might happen under unstable network conditions; however, we should retry the operation or reinitialize the listener.

cc @paritytech/networking

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: mediumImportant but not urgent tasks that should be addressed after high-priority issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions