-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Building fails with "ERROR: Source forest creation failed: ... (File exists)" #3857
Comments
summoning @lberki to help because I have no idea where to start. |
Is there any update on this? We are seeing this issue in CI quite often these days, most of the time with the .bazelrc or the .git folder. Would be really helpful to know what is causing this (might very well be our CI setup ...) |
Seeing this with a The repo itself contains a When bazel creates it's bazel-out, bazel-* symlinks, these only exist in the development container i.e. the symlinks do not point to valid paths on my host system (OSX). One thing I've noticed in the past is that builds have gotten hung up and pegged CPU and bloated memory until an OOM kill. |
I'm also seeing this with
It works if I manually remove the file. However, I then have to manually remove that file before/after every build. |
Also seeing this issue,
On ubuntu 16.04.3 |
Is there any update on this issue? |
@lberki do you know what might be going on, or is there someone else who might know more about this? |
@philwo maybe it's related to the workspace bug on macs? |
I don't know :( Summoning @aehlig . Maybe he knows? |
I have run into this issue as well, on Linux (RHEL 6.9):
.file.log was a broken symlink, that is a symlink that pointed to a destination that no longer existed. "bazel clean" did not solve the issue, but deleting .file.log manually did. |
Something to do with
Until I added this to
The IJ plugin does execute git for |
Thanks @wcurrie this was occurring during the |
I had this same issue with have a target specified in On the third try, I used So at least in my case it seems that Bazel wasn't handling |
After upgrading to Bazel 0.28 on Bionic, I'm hitting this error on a previously working genrule. Is there any way to get more debug information as to what might be failing? I'm stumped. Here is roughly the failing config:
cc @keith |
/cc @meteorcloudy Maybe it's your source forest tree creation change? |
This indeed looks like caused by my change. But I examined the code logic again, this error should not be possible because we clean the execroot ( @mattklein123 Can you reproduce this error reliably? Does it happen to other targets? And if possible, can you show me your definition of the external repositories? |
@meteorcloudy yes it repros every time. It's perma broken now with 0.28. I've narrowed it down to only this target. The definitions of exterernal repositories is basically what we have in Envoy OSS here: https://github.com/envoyproxy/envoy/tree/master/bazel. I'm happy to help gather more info but I don't know where to start. |
I'm also seeing this bug now on 0.28. It repros every time. |
I can reproduce this as well on macOS, the contents of the external directory at the time this fails is just a |
Have you @mattklein123 @keith tried explicitly deleting both your bazel cache folder as well as the bazel-* symlinks in the workspace? That may have just worked for me. i.e
EDIT: Removing |
Ha I think in our case it's because we have a directory called |
@meteorcloudy is that enough info to be able to fix upstream? Otherwise I can probably produce a smaller case |
@keith Thanks! This is enough for me to understand the failure. But I'd like to know why do you need a @lberki Should we allow users to have such an |
/cc @irengrig Well. I have a use case where we absolutely must allow an Unfortunately, it's a hard problem because it clashes with the place where we put external repositories, at least at the moment. I think for now, if @keith can live without Bazel accessing files under Not optimal, but the best we can do barring a very intrusive reshuffling of the execroot. |
@lberki OK, I think it's impossible any user is relying on the files under |
Yea in our case it was a legacy directory for a previous bazel workaround that we think we can remove for now. |
…ot symlink tree. Fixes #3857 (comment) RELNOTES: None PiperOrigin-RevId: 257786258
We also had the problem because
|
…oot symlink tree. Fixes bazelbuild/bazel#3857 (comment) RELNOTES: None PiperOrigin-RevId: 257786258
In CLion 2017.2.2 with the Bazel plugin 2017.08.29.0.2 I import this sample workspace: https://github.com/danieldanciu/clion-bazel
First time I press Sync it says it succeeds, but the second time it does an incremental build and this error is printed:
ERROR: Source forest creation failed: /private/var/tmp/_bazel_ab/fc7ea4530f9bdd4f1119eb797c96880e/execroot/__main__/bazel-clion-bazel (File exists).
You can see here the diff between the first run and the second, and the command which generated that error:
https://gist.github.com/aleb/7f306b83d681f8283c2368c8f5a244c6/revisions
Command: /usr/local/bin/bazel build --tool_tag=ijwb:CLion --keep_going --experimental_build_event_binary_file=/var/folders/yd/nc6_vq355v352hm7_q86gfmw0000gn/T/intellij-bep-627b7f50-2b93-4f0d-bb2d-a5aca85aa48d --noexperimental_build_event_binary_file_path_conversion --curses=no --color=no --noexperimental_ui --noprogress_in_terminal_title --aspects=@intellij_aspect//:intellij_info.bzl%intellij_info_aspect --override_repository=intellij_aspect=/Users/ab/Library/Application Support/CLion2017.2/clwb/aspect --output_groups=intellij-info-cpp,intellij-info-py,intellij-info-generic -- //...:all //:all //bazel-clion-bazel:all
Further "Syncs" fail or succeed depending on whether it's an incremental sync or a full sync, respectively.
Environment info
macOS 10.12.6
release 0.6.0-homebrew
The text was updated successfully, but these errors were encountered: