-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: "can't find import" error due to race during concurrent build #22423
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
Comments
Note that our build system runs concurrent |
Easy to test if there is an issue in your makefile: force sequential compilation in the Go compiler. Does the error go away? |
@ALTree with Looking at the copyFile function I see that it attempts to remove the file before copying. I can't imagine this being safe to do when concurrent builds of I'm going to change our makefile to only run concurrently across build platforms, and sequentially within a build platform. I'll report back here. |
Running concurrent |
@ianlancetaylor yes I see why now. Fixed our makefile to avoid that. Thanks! |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.9.1 linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?What did you do?
on a machine with 16 cores (like a c4.4xlarge instance in EC2) I run the
rook
build system as follows:What did you expect to see?
I expect the build to succeed every time.
What did you see instead?
Instead, I see intermittent errors that look like a race in the go build process. For example:
Note that the
cp
command happened after thecan't find import
error.The text was updated successfully, but these errors were encountered: