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

if protocol selection fails, reset remembered protocols #168

Closed
wants to merge 1 commit into from

Conversation

whyrusleeping
Copy link
Contributor

I beleive this happens if a node downgrades to an older version, and then restarts and reconnects quickly, and then bitswap tries to open a new stream on a misremembered protocol before the identify handshake can complete.

This wouldnt be a problem if identify was inline...

I'll see about adding a test soon, but if anyone has good ideas on how to easily test this first let me know.

@whyrusleeping whyrusleeping added the status/in-progress In progress label Dec 17, 2016
@Kubuxu
Copy link
Member

Kubuxu commented Dec 17, 2016

no fmt import

@ghost
Copy link

ghost commented Dec 18, 2016

LGTM 👍

@whyrusleeping
Copy link
Contributor Author

This doesnt actually solve the problem... meh

@whyrusleeping
Copy link
Contributor Author

Heres the log file from the reporter: http://sprunge.us/TPJW

The line in question is the 'protocol not supported', which is something that will never be returned by newStream since it only creates a lazyConn which first off won't actually do anything until its written to, and secondly, the lazyConn doesnt ever return that error through any of its write paths... So the problem isnt coming from where i thought it was.

Seeing the error the way we're seeing it implies that the other side doesnt actually have any compatible bitswap protocols available, which can't be right (or can it?). This requires further investigation...

cc @Kubuxu and @lgierth for help

@whyrusleeping
Copy link
Contributor Author

Interesting... peers exhibiting this issue don't support any protocols... i cant even ping between them

@whyrusleeping
Copy link
Contributor Author

Its looking like peers can get into this state where they have no available protocols. I cant ping them, dht to them, or bitswap to them.

@whyrusleeping
Copy link
Contributor Author

I think the peers i'm seeing exhibit this behaviour are mediachain peers.

@whyrusleeping whyrusleeping deleted the fix/invalid-proto-remembering branch January 5, 2017 14:38
@whyrusleeping whyrusleeping removed the status/in-progress In progress label Jan 5, 2017
marten-seemann added a commit that referenced this pull request Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants