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

libp2p not shutting down properly #779

Closed
jacobheun opened this issue Oct 9, 2020 · 1 comment · Fixed by #947
Closed

libp2p not shutting down properly #779

jacobheun opened this issue Oct 9, 2020 · 1 comment · Fixed by #947
Assignees
Labels
exp/expert Having worked on the specific codebase is important kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked

Comments

@jacobheun
Copy link
Contributor

  • Version: 0.29.0
  • Platform: All
  • Subsystem: Shutdown, dialer, latency monitor

Type:

Severity: Med

Description:

When libp2p is stopped the dial queue is not being properly emptied. This can cause in progress outbound dials to not be properly terminated which will hold the process open.

Additionally, the latency monitor is not being stopped by the connection manager which will cause timers to continue.

Steps to reproduce the error:

See ipfs/js-ipfs#3191 (comment)

@jacobheun jacobheun added kind/bug A bug in existing code (including security flaws) exp/expert Having worked on the specific codebase is important status/ready Ready to be worked P2 Medium: Good to have, but can wait until someone steps up labels Oct 9, 2020
@vasco-santos
Copy link
Member

This seems a side effect of the /dnsaddr resolution per libp2p/js-libp2p-tcp#142

The difference of using /dnsaddr seems to be that it will result in a set of other addresses to dial and the dial queue will be working when the stop happens.

What is happening is:

So, what we basically need is to make the resolve abortable, keep a record of the on going resolves and abort all of them on Dialer.destroy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/expert Having worked on the specific codebase is important kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants