Skip to content

Build failure from missing files when using --experimental_action_cache_store_output_metadata #13882

@brentleyjones

Description

@brentleyjones

Description of the problem / feature request:

When using --experimental_action_cache_store_output_metadata, which was introduced in 4e29042, you can get build failures when going from using a remote cache to not using one.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

bazel build --remote_cache=grpc://... --remote_download_toplevel --experimental_action_cache_store_output_metadata -- //...
bazel build --remote_download_toplevel --experimental_action_cache_store_output_metadata -- //...

The second command will fail with errors like this:

(06:29:47) INFO: Writing explanation of rebuilds to 'tmp/logs/explanation.log'
(06:29:49) ERROR: /private/var/tmp/_bazel_iosci/4e089aeca56f6c6b5c9850816d5a6522/external/build_bazel_rules_swift/tools/worker/BUILD:85:10: Linking external/build_bazel_rules_swift/tools/worker/worker [for host] failed: (Aborted): cc_wrapper.sh failed: error executing command
  (cd /private/var/tmp/_bazel_iosci/4e089aeca56f6c6b5c9850816d5a6522/sandbox/darwin-sandbox/9/execroot/repo && \
  exec env - \
    APPLE_SDK_PLATFORM=MacOSX \
    APPLE_SDK_VERSION_OVERRIDE=11.3 \
    PATH=/usr/bin:/bin \
    RELATIVE_AST_PATH=true \
    XCODE_VERSION_OVERRIDE=12.5.1.12E507 \
    ZERO_AR_DATE=1 \
  external/local_config_cc/cc_wrapper.sh @bazel-out/host/bin/external/build_bazel_rules_swift/tools/worker/worker-2.params)
Execution platform: @local_config_platform//:host
 
Use --sandbox_debug to see verbose messages from the sandbox
clang: error: no such file or directory: 'bazel-out/host/bin/external/build_bazel_rules_swift/tools/worker/_objs/worker/worker_main.o'
clang: error: no such file or directory: 'bazel-out/host/bin/external/build_bazel_rules_swift/tools/worker/libcompile_without_worker.a'
clang: error: no such file or directory: 'bazel-out/host/bin/external/build_bazel_rules_swift/tools/worker/libcompile_with_worker.a'
clang: error: no such file or directory: 'bazel-out/host/bin/external/build_bazel_rules_swift/tools/worker/libswift_runner.a'
clang: error: no such file or directory: 'bazel-out/host/bin/external/build_bazel_rules_swift/tools/common/libbazel_substitutions.a'
clang: error: no such file or directory: 'bazel-out/host/bin/external/build_bazel_rules_swift/tools/common/libprocess.a'
clang: error: no such file or directory: 'bazel-out/host/bin/external/build_bazel_rules_swift/third_party/bazel_protos/libworker_protocol_proto.a'
clang: error: no such file or directory: 'bazel-out/host/bin/external/build_bazel_rules_swift/tools/common/libfile_system.a'
clang: error: no such file or directory: 'bazel-out/host/bin/external/build_bazel_rules_swift/tools/common/libpath_utils.a'
clang: error: no such file or directory: 'bazel-out/host/bin/external/com_github_protocolbuffers_protobuf/libprotobuf.a'
clang: error: no such file or directory: 'bazel-out/host/bin/external/com_github_protocolbuffers_protobuf/libprotobuf_lite.a'
clang: error: no such file or directory: 'bazel-out/host/bin/external/zlib/libzlib.a'

What operating system are you running Bazel on?

macOS

What's the output of bazel info release?

release 5.0.0-pre.20210810.4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions