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: leaking goroutines on aborted /add requests #1732

Merged
merged 1 commit into from Jul 8, 2022

Commits on Jul 8, 2022

  1. Fix: leaking goroutines on aborted /add requests

    It has been observed that some peers have a growing number of goroutines,
    usually stuck in go-libp2p-gorpc.MultiStream() function, which is waiting to
    read items from the arguments channel.
    
    We suspect this is due to aborted /add requests. In situations when the add
    request is aborted or fails, Finalize() is never called and the blocks channel
    stays open, so MultiStream() can never exit, and the BlockStreamer can never
    stop streaming etc.
    
    As a fix, we added the requirement to call Close() when we stop using a
    ClusterDAGService (error or not). This should ensure that the blocks channel
    is always closed and not just on Finalize().
    hsanjuan committed Jul 8, 2022
    Configuration menu
    Copy the full SHA
    d19c7fa View commit details
    Browse the repository at this point in the history