You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Windows]: build failed with Unexpected IO error #4035
Do it twice. In the first pass, you will get bazel 0.8.0, then you should invoke this command again with this new built bazel.
Environment info
Operating System:
Windows 10
Bazel version (output of bazel info release):
development version
If bazel info release returns "development version" or "(@Non-Git)", please tell us what source tree you compiled Bazel from; git commit hash is appreciated (git rev-parse HEAD): cff0dc9
Have you found anything relevant by searching the web?
Anything else, information or logs or outputs that would be helpful?
ERROR: D:/os/bazel/third_party/protobuf/3.4.0/BUILD:423:1: C++ compilation of rule '//third_party/protobuf/3.4.0:protoc_lib' failed: Unexpected IO error.: D:/bazel_build/execroot/io_bazel (Not a directory)
Thanks for reporting! However we can't look at this bug this week because we're attending the Bazel conference in Sunnyvale, CA. I'll take a look when we're back in Munich.
@snnn : Can you reliably repro the failure the way you described? Also, what's in your ".bazelrc" file? (Because --config opt is only effective if you have entries like build:opt in your .bazelrc).
I failed to repro this issue like so:
$ cd /c/work/bazel
$ git checkout origin/release-0.8.0
Hi @laszlocsomor , It's strange. I can 100% re-produce this problem on my local host. I don't have any .bazelrc. How can I provide more information to you?
privatestaticPathcreateActionTemp(PathexecRoot) throwsIOException {
// Use this executor thread's ID as the directory name's suffix.// The ID is safe for the following reasons:// - being a thread ID, it's guaranteed to be unique among other action executor threads// - this thread will only execute one action at a time, so there's no risk of concurrently// running actions using the same temp directory.// The next action that this thread executes can reuse the temp directory name. The only caveat// is, if {@link #start} fails to delete directory after the action is done, the next// action will see stale files in its temp directory.StringidStr = Long.toHexString(Thread.currentThread().getId());
Pathresult = execRoot.getRelative("tmp" + idStr);
if (!result.exists() && !result.createDirectory()) {
thrownewIOException(String.format("Could not create temp directory '%s'", result));
}
returnresult;
}
You can't do this on Windows. DeleteFile is an async operation. You shouldn't recreate the directory shortly after deleting it.
Activity
dslomov commentedon Nov 7, 2017
Potential release blocker for 0.8: #3772
laszlocsomor commentedon Nov 7, 2017
Thanks for reporting! However we can't look at this bug this week because we're attending the Bazel conference in Sunnyvale, CA. I'll take a look when we're back in Munich.
laszlocsomor commentedon Nov 14, 2017
@snnn : Can you reliably repro the failure the way you described? Also, what's in your ".bazelrc" file? (Because
--config optis only effective if you have entries likebuild:optin your.bazelrc).I failed to repro this issue like so:
For me, both builds succeed.
snnn commentedon Nov 15, 2017
Hi @laszlocsomor , It's strange. I can 100% re-produce this problem on my local host. I don't have any .bazelrc. How can I provide more information to you?
Thanks.
snnn commentedon Nov 17, 2017
Ok... I guess I find the reason.
In LocalSpawnRunner.java
You can't do this on Windows. DeleteFile is an async operation. You shouldn't recreate the directory shortly after deleting it.
snnn commentedon Nov 17, 2017
This bug is introduced in cfccdf1
laszlocsomor commentedon Nov 17, 2017
Wow, that's an impressive diagnosis! Thank you!
I still couldn't repro this issue, however your explanation seems plausible.
dslomov commentedon Nov 17, 2017
This is a release blocker for 0.8.0
laszlocsomor commentedon Nov 20, 2017
This commit broke some of our internal tests. I'll take a look and fix them soon (this morning or early afternoon).
Add a random number to action temp dir
Add a random number to action temp dir
Add a random number to action temp dir
Add a random number to action temp dir
Add a random number to action temp dir
Add a random number to action temp dir