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

Race in TestDirectDialWorks #2411

Closed
MarcoPolo opened this issue Jul 7, 2023 · 1 comment · Fixed by #2419
Closed

Race in TestDirectDialWorks #2411

MarcoPolo opened this issue Jul 7, 2023 · 1 comment · Fixed by #2419

Comments

@MarcoPolo
Copy link
Collaborator

https://github.com/libp2p/go-libp2p/actions/runs/5470148505/jobs/9959884856?pr=2410#step:10:1703

@sukunrt any chance this is related to smart dialing changes?

@sukunrt
Copy link
Member

sukunrt commented Jul 7, 2023

This test is super hacky.

func TestDirectDialWorks(t *testing.T) {
	// mark all addresses as public
	cpy := manet.Private4
	manet.Private4 = []*net.IPNet{}
	defer func() { manet.Private4 = cpy }()

It's related to black hole detection. We check whether an address is public or not when checking for black hole status. That check depends on manet.Private and this test modifies manet.Private.

I need to check why there is no synchronisation between that check in swarm.dialAddr and this write in defer.

We can skip this test for now, or keep it as is. Once #2403 is in, we can modify this test to disable black hole detection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants