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

FAILED_PRECONDITION: duplicate files #603

Closed
luxe opened this issue Nov 24, 2020 · 3 comments
Closed

FAILED_PRECONDITION: duplicate files #603

luxe opened this issue Nov 24, 2020 · 3 comments

Comments

@luxe
Copy link
Contributor

luxe commented Nov 24, 2020

Many of our schedulers are producing this error:

ERROR: <path>/BUILD:39:1: C++ compilation of rule '<target>' failed (Exit 34): java.io.IOException: com.google.devtools.build.lib.remote.ExecutionStatusException: FAILED_PRECONDITION: Action 47a406c798e283a9bc73cd37f2802fd96cd4a4407b644bae5d5e3d599050330e/143 is invalid: One of the input `Directory` has multiple entries with the same file name. This will also occur if the worker filesystem considers two names to be the same, such as two names that vary only by case on a case-insensitive filesystem, or two names with the same normalized form on a filesystem that performs Unicode normalization on filenames.; One of the input `Directory` has multiple entries with the same file name. This will also occur if the worker filesystem considers two names to be the same, such as two names that vary only by case on a case-insensitive filesystem, or two names with the same normalized form on a filesystem that performs Unicode normalization on filenames.; One of the input `Directory` has multiple entries with the same file name. This will also occur if the worker filesystem considers two names to be the same, such as two names that vary only by case on a case-insensitive filesystem, or two names with the same normalized form on a filesystem that performs Unicode normalization on filenames. ...
--
  | at com.google.devtools.build.lib.remote.GrpcRemoteExecutor.executeRemotely(GrpcRemoteExecutor.java:192)
  | at com.google.devtools.build.lib.remote.RemoteSpawnRunner.lambda$exec$0(RemoteSpawnRunner.java:324)
  | at com.google.devtools.build.lib.remote.Retrier.execute(Retrier.java:237)
  | at com.google.devtools.build.lib.remote.RemoteRetrier.execute(RemoteRetrier.java:116)
  | at com.google.devtools.build.lib.remote.RemoteSpawnRunner.exec(RemoteSpawnRunner.java:304)
  | at com.google.devtools.build.lib.exec.SpawnRunner.execAsync(SpawnRunner.java:238)
  | at com.google.devtools.build.lib.exec.AbstractSpawnStrategy.exec(AbstractSpawnStrategy.java:126)
  | at com.google.devtools.build.lib.exec.AbstractSpawnStrategy.exec(AbstractSpawnStrategy.java:96)
  | at com.google.devtools.build.lib.actions.SpawnStrategy.beginExecution(SpawnStrategy.java:39)
  | at com.google.devtools.build.lib.exec.ProxySpawnActionContext.beginExecution(ProxySpawnActionContext.java:60)
  | at com.google.devtools.build.lib.rules.cpp.CppCompileAction.beginExecution(CppCompileAction.java:1402)
  | at com.google.devtools.build.lib.actions.Action.execute(Action.java:124)
  | at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$4.execute(SkyframeActionExecutor.java:961)
  | at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.continueAction(SkyframeActionExecutor.java:1109)
  | at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.run(SkyframeActionExecutor.java:1080)
  | at com.google.devtools.build.lib.skyframe.ActionExecutionState.runStateMachine(ActionExecutionState.java:137)
  | at com.google.devtools.build.lib.skyframe.ActionExecutionState.getResultOrDependOnFuture(ActionExecutionState.java:80)
  | at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.executeAction(SkyframeActionExecutor.java:601)
  | at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.checkCacheAndExecuteIfNeeded(ActionExecutionFunction.java:907)
  | at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.compute(ActionExecutionFunction.java:297)
  | at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:438)
  | at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:399)
  | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  | at java.base/java.lang.Thread.run(Unknown Source)

Find out why this is happening. See if error message can be extended to produce the actual filename that has the clash or if that doesn't make sense since they are hashed names.

@werkt
Copy link
Member

werkt commented Nov 24, 2020

bf-cat ... Action 47a406c798e283a9bc73cd37f2802fd96cd4a4407b644bae5d5e3d599050330e/143 -> Input Root Digest
bf-cat ... TreeLayout <Input Root Digest> -> Scan this list and find the directory with the repeated filename

@luxe
Copy link
Contributor Author

luxe commented Nov 24, 2020

I'm not seeing any duplicates in the TreeLayout. I shouldn't post the output as it contains the majority of our tree. Maybe I can re-serialize the TreeLayout and run it though buildfarm's validation to see if it still fails.

@werkt
Copy link
Member

werkt commented Nov 26, 2020

bazelbuild/bazel#12564 over on bazel will drastically improve this output on the client side, which is where the output itself comes from. There will need to be changes on the buildfarm side to clean up some of the logging, and I want to add configurable help messages for the client to take action - these can provide brief instructions and an url to go to for more information, and even prepopulate content with the error information

@luxe luxe closed this as completed Jan 6, 2021
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