We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Running tests on CI with -race (#545) uncovered a data race:
-race
=== RUN TestAutoRelay ================== WARNING: DATA RACE Read at 0x00c0000788d8 by goroutine 49: github.com/libp2p/go-libp2p-autonat.(*AmbientAutoNAT).Status() /home/travis/gopath/pkg/mod/github.com/libp2p/[email protected]/autonat.go:88 +0x3e github.com/libp2p/go-libp2p/p2p/host/relay.(*AutoRelayHost).background() /home/travis/gopath/src/github.com/libp2p/go-libp2p/p2p/host/relay/autorelay.go:98 +0x1ff Previous write at 0x00c0000788d8 by goroutine 48: github.com/libp2p/go-libp2p-autonat.(*AmbientAutoNAT).autodetect() /home/travis/gopath/pkg/mod/github.com/libp2p/[email protected]/autonat.go:173 +0x663 github.com/libp2p/go-libp2p-autonat.(*AmbientAutoNAT).background() /home/travis/gopath/pkg/mod/github.com/libp2p/[email protected]/autonat.go:112 +0x148 Goroutine 49 (running) created at: github.com/libp2p/go-libp2p/p2p/host/relay.NewAutoRelayHost() /home/travis/gopath/src/github.com/libp2p/go-libp2p/p2p/host/relay/autorelay.go:71 +0x431 github.com/libp2p/go-libp2p/config.(*Config).NewNode() /home/travis/gopath/src/github.com/libp2p/go-libp2p/config/config.go:211 +0xc51 github.com/libp2p/go-libp2p.NewWithoutDefaults() /home/travis/gopath/src/github.com/libp2p/go-libp2p/libp2p.go:68 +0x132 github.com/libp2p/go-libp2p.New() /home/travis/gopath/src/github.com/libp2p/go-libp2p/libp2p.go:54 +0x12f github.com/libp2p/go-libp2p/p2p/host/relay_test.TestAutoRelay() /home/travis/gopath/src/github.com/libp2p/go-libp2p/p2p/host/relay/autorelay_test.go:150 +0x445 testing.tRunner() /home/travis/.gimme/versions/go1.11.5.linux.amd64/src/testing/testing.go:827 +0x162 Goroutine 48 (running) created at: github.com/libp2p/go-libp2p-autonat.NewAutoNAT() /home/travis/gopath/pkg/mod/github.com/libp2p/[email protected]/autonat.go:82 +0x1e3 github.com/libp2p/go-libp2p/p2p/host/relay.NewAutoRelayHost() /home/travis/gopath/src/github.com/libp2p/go-libp2p/p2p/host/relay/autorelay.go:68 +0x2e5 github.com/libp2p/go-libp2p/config.(*Config).NewNode() /home/travis/gopath/src/github.com/libp2p/go-libp2p/config/config.go:211 +0xc51 github.com/libp2p/go-libp2p.NewWithoutDefaults() /home/travis/gopath/src/github.com/libp2p/go-libp2p/libp2p.go:68 +0x132 github.com/libp2p/go-libp2p.New() /home/travis/gopath/src/github.com/libp2p/go-libp2p/libp2p.go:54 +0x12f github.com/libp2p/go-libp2p/p2p/host/relay_test.TestAutoRelay() /home/travis/gopath/src/github.com/libp2p/go-libp2p/p2p/host/relay/autorelay_test.go:150 +0x445 testing.tRunner() /home/travis/.gimme/versions/go1.11.5.linux.amd64/src/testing/testing.go:827 +0x162 ================== --- FAIL: TestAutoRelay (5.98s) testing.go:771: race detected during execution of test FAIL
Possibly related to libp2p/go-libp2p-autonat#16.
The text was updated successfully, but these errors were encountered:
What's the race here? It seems that it is on the Status(), which is totally benign.
Sorry, something went wrong.
This is not a critical bug, a rather benign race that is easily fixed by mutex protecting the boolean access.
Fixed in libp2p/go-libp2p-autonat#17
No branches or pull requests
Running tests on CI with
-race
(#545) uncovered a data race:Possibly related to libp2p/go-libp2p-autonat#16.
The text was updated successfully, but these errors were encountered: