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

Recursive dialing can block #816

Open
Stebalien opened this issue Mar 2, 2020 · 2 comments
Open

Recursive dialing can block #816

Stebalien opened this issue Mar 2, 2020 · 2 comments
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@Stebalien
Copy link
Member

Stebalien commented Mar 2, 2020

If two peers advertise each other as, e.g., relays and a third peer tries to dial both of these peers at the same time, the dial will bock.

  • Thread 1: Start dial to peer A
  • Thread 2: Start dial to peer B
  • Thread 1: Try to dial the relay (B) for peer A.
  • Thread 2: Try to dial the relay (A) for peer B.

Now, given that we allow 8 parallel dials per peer (default), this shouldn't be the end of the world. In most cases, we'll also try dialing peer A and B directly, if we have the appropriate addresses.

Also note, each peer will timeout dialing the relay after 60 seconds because that's the default transport dial timeout.

However, we should still provide a solution for this.

Initially reported in libp2p/go-libp2p-swarm#161.

@Stebalien Stebalien added the kind/bug A bug in existing code (including security flaws) label Mar 2, 2020
@Jorropo

This comment has been minimized.

@Stebalien

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

2 participants