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

ID service doesn't shut down properly #1217

Closed
marten-seemann opened this issue Oct 3, 2021 · 0 comments · Fixed by #1218
Closed

ID service doesn't shut down properly #1217

marten-seemann opened this issue Oct 3, 2021 · 0 comments · Fixed by #1218
Labels
effort/hours Estimated to take one or several hours kind/bug A bug in existing code (including security flaws)

Comments

@marten-seemann
Copy link
Contributor

Running this test with -count=1000 leads to a massive Go routine buildup:

func TestHostClose(t *testing.T) {
	host, err := libp2p.New(libp2p.ListenAddrStrings("/ip4/127.0.0.1/tcp/0"))
	require.NoError(t, err)
	require.NoError(t, host.Close())
}

From the pprof:

goroutine profile: total 707
701 @ 0x46c0f6 0x47d312 0xfaf4a5 0x49df21
#	0xfaf4a4	github.com/libp2p/go-libp2p/p2p/protocol/identify.(*ObservedAddrManager).worker+0x344	/home/marten/src/go/src/github.com/libp2p/go-libp2p/p2p/protocol/identify/obsaddr.go:258
@marten-seemann marten-seemann added kind/bug A bug in existing code (including security flaws) effort/hours Estimated to take one or several hours labels Oct 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/hours Estimated to take one or several hours kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant