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

fix: in the swarm move Connectedness emit after releasing conns #2373

Merged

Commits on Jun 16, 2023

  1. fix: in the swarm move Connectedness emit after releasing conns

    go-libp2p-kad-dht now listen to both EvtPeerIdentificationCompleted and EvtPeerConnectednessChanged
    and EvtPeerIdentificationCompleted calls .ConnsToPeer inorder to do some filtering.
    
    However it happens that it deadlocks because if the swarm is trying to emit a EvtPeerConnectednessChanged
    while the subscriber is trying to process an EvtPeerIdentificationCompleted, the subscriber is stuck on
    s.conns.RLock() while the swarm wont release it before having sent EvtPeerConnectednessChanged.
    Deadlock !
    
    I havn't confirmed this fixes my bug given this takes time to reproduce, I'll startup a new experiment soon.
    Jorropo committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    cbc2e56 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b275104 View commit details
    Browse the repository at this point in the history
  3. Make test a little faster

    MarcoPolo committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    fd74518 View commit details
    Browse the repository at this point in the history
  4. Bind on localhost

    MarcoPolo committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    c19bc57 View commit details
    Browse the repository at this point in the history