bazel-buildfarm
bazel-buildfarm copied to clipboard
android ndk build error
I can run android/ndk example (https://github.com/bazelbuild/examples.git) local, but can not run rightly on remote mechine.
the local common: ~/bin/bazel build //app/src/main:jni_lib --config=android_armeabi-v7a
with bazel-buildfarm: ~/bin/bazel build //app/src/main:jni_lib --config=android_armeabi-v7a --remote_executor=grpc://30.28.211.176:8980 --verbose_failures
the error like:
Compiling app/src/main/cpp/native-lib.cpp failed: (Exit 34): java.io.IOException: com.google.devtools.build.lib.remote.ExecutionStatusException: FAILED_PRECONDITION: Action 4e8159fe33dc6f86bf3267de54a68a13f9932b61712547ce402b3aab7433fb85/142 is invalid: A requested input (or the Action or its Command) was not found in the CAS.; A requested input (or the Action or its Command) was not found in the CAS.; A requested input (or the Action or its Command) was not found in the CAS. ...
at com.google.devtools.build.lib.remote.GrpcRemoteExecutor.executeRemotely(GrpcRemoteExecutor.java:223)
at com.google.devtools.build.lib.remote.RemoteSpawnRunner.lambda$exec$0(RemoteSpawnRunner.java:370)
at com.google.devtools.build.lib.remote.Retrier.execute(Retrier.java:244)
at com.google.devtools.build.lib.remote.RemoteRetrier.execute(RemoteRetrier.java:125)
at com.google.devtools.build.lib.remote.RemoteRetrier.execute(RemoteRetrier.java:114)
at com.google.devtools.build.lib.remote.RemoteSpawnRunner.exec(RemoteSpawnRunner.java:348)
at com.google.devtools.build.lib.exec.SpawnRunner.execAsync(SpawnRunner.java:240)
at com.google.devtools.build.lib.exec.AbstractSpawnStrategy.exec(AbstractSpawnStrategy.java:140)
at com.google.devtools.build.lib.exec.AbstractSpawnStrategy.exec(AbstractSpawnStrategy.java:102)
at com.google.devtools.build.lib.actions.SpawnStrategy.beginExecution(SpawnStrategy.java:47)
at com.google.devtools.build.lib.exec.SpawnStrategyResolver.beginExecution(SpawnStrategyResolver.java:65)
at com.google.devtools.build.lib.rules.cpp.CppCompileAction.beginExecution(CppCompileAction.java:1452)
at com.google.devtools.build.lib.actions.Action.execute(Action.java:127)
at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$5.execute(SkyframeActionExecutor.java:855)
at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.continueAction(SkyframeActionExecutor.java:1016)
at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.run(SkyframeActionExecutor.java:975)
at com.google.devtools.build.lib.skyframe.ActionExecutionState.runStateMachine(ActionExecutionState.java:129)
at com.google.devtools.build.lib.skyframe.ActionExecutionState.getResultOrDependOnFuture(ActionExecutionState.java:81)
at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.executeAction(SkyframeActionExecutor.java:472)
at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.checkCacheAndExecuteIfNeeded(ActionExecutionFunction.java:834)
at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.compute(ActionExecutionFunction.java:307)
at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:477)
at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:398)
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)
I flow the README in build_buildfarm project
add execution_policies in worker.config.example
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer" #export SDKROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" export ANDROID_HOME='/Users/xxx/Library/Android/sdk' export ANDROID_NDK_HOME="/Users/xxx/Library/Android/sdk/ndk/21.4.7075529" export SDKROOT="/Users/xxx/Library/Android/sdk/ndk/21.4.7075529"
how can I do now ?
I recommend taking a look at the --experimental_remote_grpc_log from bazel per our troubleshooting docs. You should be able to look at the operation that failed and see whether there's anything unique about it.
Since this example sounds simple, I'd check to see if increasing your CAS size (either for memory or shard) changes the results - if your actions' inputs are too large for a single storage in the CAS given your maximum size, they will evict each other before having the opportunity to run.