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

16 data races #6595

Closed
kpp opened this issue Aug 21, 2019 · 11 comments
Closed

16 data races #6595

kpp opened this issue Aug 21, 2019 · 11 comments
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@kpp
Copy link
Contributor

kpp commented Aug 21, 2019

Version information:

go-ipfs version: 0.5.0-dev-d61269f41
Repo version: 7
System version: amd64/linux
Golang version: go1.12.8

Howto build

go build -race  "-asmflags=all='-trimpath='" "-gcflags=all='-trimpath='" -ldflags="-X "github.com/ipfs/go-ipfs".CurrentCommit=d61269f41" -o "cmd/ipfs/ipfs" "github.com/ipfs/go-ipfs/cmd/ipfs"

Run

./cmd/ipfs/ipfs daemon 2> data_races.txt

Description:

I got 16 data races from ipfs daemon while running ipfs cat ...

data_races.txt

@kpp kpp added the kind/bug A bug in existing code (including security flaws) label Aug 21, 2019
@Stebalien
Copy link
Member

Most of these are libp2p/go-libp2p#257. The MDNS library has races.

However, the address race is new (and luckily not in 0.4.22): libp2p/go-libp2p-swarm#136.

@kpp
Copy link
Contributor Author

kpp commented Aug 23, 2019

The MDNS library has races.

@Stebalien here is the fix whyrusleeping/mdns#5

@Stebalien
Copy link
Member

@kpp. I've merged the changes into go-ipfs master. Mind testing?

@kpp
Copy link
Contributor Author

kpp commented Aug 26, 2019

Which branch?

@Stebalien
Copy link
Member

Master.

@Stebalien
Copy link
Member

Wait, nevermind. I haven't merged it yet 🙄.

@Stebalien
Copy link
Member

Ok, now it has been merged.

@kpp
Copy link
Contributor Author

kpp commented Aug 26, 2019

Fixed.

@Stebalien
Copy link
Member

Awesome! Thanks making this happen!

@kpp
Copy link
Contributor Author

kpp commented Aug 26, 2019

The question is: did I fix mdns data races without affecting the logic? You will have make integration tests ;)

@Stebalien
Copy link
Member

Unfortunately, reliable mdns integration tests require some form of fake network. That will have to wait for some of our test network work. :(.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

2 participants