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

Investigate libp2p swarm halting after many concurrent streams are open in p2p_stream from a single peer. #2351

Open
CHr15F0x opened this issue Nov 5, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@CHr15F0x
Copy link
Member

CHr15F0x commented Nov 5, 2024

This is a follow up issue for #2334.

Whilst limiting the default max number of concurrent streams in p2p_stream for 1 peer to 1 mitigates the issue of swarm halting we are still not sure what the root cause is.
There are 2 suspects here:

  • p2p_stream implementation contains a bug,
  • libp2p stream is susceptible to being overrun with events when too many concurrent streams are being handled and the queues are too small (by queues I mean these two swarm config settings: notify_handler_buffer_size and per_connection_event_buffer_size); The expectation here is that any limits enforced in the config should result in the other peers' qos being degraded, with "our" libp2p-swarm instance still being responsive and handling events.

Understanding the exact mechanism of the problem is crucial to ensuring DoS resistance in this scenario (many concurrent p2p_stream request/response streams).

@CHr15F0x CHr15F0x added this to the P2P sync milestone Nov 5, 2024
@CHr15F0x CHr15F0x added the bug Something isn't working label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant