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

Close frame for closed substream #1832

Closed
divagant-martian opened this issue Oct 26, 2020 · 4 comments
Closed

Close frame for closed substream #1832

divagant-martian opened this issue Oct 26, 2020 · 4 comments

Comments

@divagant-martian
Copy link
Collaborator

divagant-martian commented Oct 26, 2020

Description

On latest versions (around ~0.3.0) we started getting this error

Oct 26 22:24:57.797 DEBG RPC Error
err: IO Error: Protocol error: Received `Close` frame for closed substream.
protocol: metadata
service: libp2p

This debug msg is printed, as far as I can tell, exclusively on metadata messages, but there is also this log:

Oct 26 22:32:45.009 DEBG Connection closed
connections: 0
cause: Some(IO(Custom { kind: Other, error: "Protocol error: Received `Close` frame for closed substream." }))
service: libp2p

This means this error is killing connections with peers, most likely quite rapidly. I expect this to affect head syncing the most

We should investigate what's the source of these errors and check if they really should be killing connections with a peer

Version

master on 92c8eba

Present Behaviour

Connections are killed by this errors

Expected Behaviour

Probably ignore the error

Steps to resolve

detective tasks

@romanb
Copy link

romanb commented Oct 28, 2020

Does this error occur

a) between communicating nodes that all use the same rust-libp2p version?
b) between communicating nodes that use different rust-libp2p versions?
c) between nodes using rust-libp2p and nodes using other libp2p implementations?

If a), it may indicate a bug in rust-libp2p. If b) it may indicate that older versions of rust-libp2p potentially send duplicate Close frames and the newer version thus needs to be more lenient to maintain backwards-compatibility. If c) it may indicate that rust-libp2p needs to be more lenient in accepting duplicate Close frames because other implementations may send them.

cc @mxinden

@divagant-martian
Copy link
Collaborator Author

divagant-martian commented Oct 28, 2020

Thanks @romanb after checking some more this only happens with a golang client, so I guess c it is
EDIT: May worth noting that checking the versions of the other client that I have registered on my logs for these errors (around 2k logs, not much, with 16 different identifiable versions) shows they haven't changed anything related to substream management

@romanb
Copy link

romanb commented Oct 28, 2020

Thanks for the feedback. libp2p-mplex-0.23.1 has been published which should resolve this problem by ignoring duplicate Close frames, as was the case in earlier versions.

@divagant-martian
Copy link
Collaborator Author

Hey @romanb, thanks a lot. I'll close after we can upgrade and test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants