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

Ninja work dir not added automatically as input dir #45

Open
YngveNPettersen opened this issue Apr 30, 2024 · 2 comments
Open

Ninja work dir not added automatically as input dir #45

YngveNPettersen opened this issue Apr 30, 2024 · 2 comments

Comments

@YngveNPettersen
Copy link

YngveNPettersen commented Apr 30, 2024

I am currently working to configure reclient to use a buildfarm remote execution backend, and presently testing on Linux in its remote-only mode (NOT racing or fallback; I want to be sure this configuration works for remote execution).

One problem I have encountered now that I finally have a working remote end, is that Chromium's //third_party/angle submodule have 300+ targets that trigger this kind of error:

reclient[<guid>]: RemoteErrorResultStatus: rpc error: code = FailedPrecondition desc = Action <hash>/147 is invalid: working directory is not an input directory. details = violations: {
  type: "INVALID"
  subject: "The `Command` of the `Action` was invalid."
  description: "working directory is not an input directory"
}

Inspecting the command and treelayout shows that these commands does not include the out/foo directory as an input, unless it is referenced in the command somehow, e.g. -Igen causes "set_by_reclient/a/gen/" to be added as a input directory, and those builds work (unless there are other compile issues; separate issue). If the remote working dir "set_by_reclient/a" is not included somehow in the input directory the result is the above error.

@werkt
Copy link

werkt commented Apr 30, 2024

For reference, the validation's justification is presented here:

From remote_execution.proto on the remote-apis repository:
https://github.com/bazelbuild/remote-apis/blob/1f36c310b28d762b258ea577ed08e8203274efae/build/bazel/remote/execution/v2/remote_execution.proto#L689-L692

  // The working directory, relative to the input root, for the command to run
  // in. It must be a directory which exists in the input tree. If it is left
  // empty, then the action is run in the input root.
  string working_directory = 6;

@monaka
Copy link

monaka commented May 6, 2024

In buildfarm/buildfarm#1718,

Technically, I can work around this by using reclient's racing or local fallback mode, which is likely to be the production configuration.

I had a similar issue.

In my case, just RBE_CXX_EXEC_STRATEGY="racing" helps my builds.
"remote_local_fallback" made builds halting.
(Just FYI. I had some other issues like #47. So remote_local_fallback may work as a workaround on other envs.)

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

3 participants