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

Parallel compilation may be causing go module races #537

Closed
tylerphelan opened this issue Nov 13, 2018 · 3 comments
Closed

Parallel compilation may be causing go module races #537

tylerphelan opened this issue Nov 13, 2018 · 3 comments

Comments

@tylerphelan
Copy link

We've observed non-deterministic behavior when running ginkgo:

for i in `seq 1 20`; do rm -rf /root/go/pkg; ginkgo -r -skipPackage=integration,brats; done

Produces a roughly 50% failure to compile with varying compilation errors.

for i in `seq 1 20`; do rm -rf /root/go/pkg; ginkgo -r -skipPackage=integration,brats -compilers=1; done

Succeeds 100% of the time.

Forcing module download before running tests, for example with go mod download, will also produce 100% success rate.

Our theory is that parallel compilation, and thus parallel module fetching, really confuses go, leading to races in module resolution/solving/whatever you call it.

@Zanadar

@onsi onsi changed the title Parellel compilation may be causing go module races Parallel compilation may be causing go module races Nov 13, 2018
@onsi
Copy link
Owner

onsi commented Nov 13, 2018

I think this is surfacing a bug in go mod download. Seems like go should be able to handle multiple downloads in parallel. I'd suggest y'all open an issue there.

For now the -compilers=1 flag workaround will have to do :/

@tylerphelan
Copy link
Author

Looks like the issue is golang/go#26794

@tylerphelan
Copy link
Author

Will close for now.

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

No branches or pull requests

2 participants