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

Generating Descriptor Set proto_library (Segmentation fault): sandbox-exec failed: error executing command #14469

Closed
USB-05 opened this issue Dec 23, 2021 · 5 comments

Comments

@USB-05
Copy link

USB-05 commented Dec 23, 2021

Description of the problem / feature request:

Generating Descriptor Set proto_library @go_googleapis//google/iam/v1:iam_proto failed: (Segmentation fault): sandbox-exec failed: error executing command
(14:21:34) ERROR: /private/var/tmp/_bazel_udhamsingh/c318b2e3ffcdc99819999255aa864929/external/go_googleapis/google/iam/v1/BUILD.bazel:4:14: Generating Descriptor Set proto_library @go_googleapis//google/iam/v1:iam_proto failed: (Segmentation fault): sandbox-exec failed: error executing command (cd /private/var/tmp/_bazel_udhamsingh/c318b2e3ffcdc99819999255aa864929/sandbox/darwin-sandbox/355/execroot/harness_monorepo && \ exec env - \ PATH=/bin:/usr/bin:/usr/local/bin \ TMPDIR=/var/folders/vs/rxltpcn91hz8cnxf_9bw5vkw0000gr/T/ \ VERIFICATION_SERVICE_SECRET=67d9b94d9856665afc21acd3aa745401 \ /usr/bin/sandbox-exec -f /private/var/tmp/_bazel_udhamsingh/c318b2e3ffcdc99819999255aa864929/sandbox/darwin-sandbox/355/sandbox.sb /var/tmp/_bazel_udhamsingh/install/d3bd16a8b22c859ba58f5dca04a9b1aa/process-wrapper '--timeout=0' '--kill_delay=15' bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/com_google_protobuf/protoc '--proto_path=bazel-out/darwin-fastbuild/bin/external/com_google_protobuf/_virtual_imports/descriptor_proto' '--proto_path=external/go_googleapis' '--descriptor_set_out=bazel-out/darwin-fastbuild/bin/external/go_googleapis/google/iam/v1/iam_proto-descriptor-set.proto.bin' '-Igoogle/iam/v1/iam_policy.proto=external/go_googleapis/google/iam/v1/iam_policy.proto' '-Igoogle/iam/v1/options.proto=external/go_googleapis/google/iam/v1/options.proto' '-Igoogle/iam/v1/policy.proto=external/go_googleapis/google/iam/v1/policy.proto' '-Igoogle/api/annotations.proto=external/go_googleapis/google/api/annotations.proto' '-Igoogle/api/client.proto=external/go_googleapis/google/api/client.proto' '-Igoogle/api/field_behavior.proto=external/go_googleapis/google/api/field_behavior.proto' '-Igoogle/api/http.proto=external/go_googleapis/google/api/http.proto' '-Igoogle/api/resource.proto=external/go_googleapis/google/api/resource.proto' '-Igoogle/protobuf/descriptor.proto=bazel-out/darwin-fastbuild/bin/external/com_google_protobuf/_virtual_imports/descriptor_proto/google/protobuf/descriptor.proto' '-Igoogle/type/expr.proto=external/go_googleapis/google/type/expr.proto' --direct_dependencies google/api/annotations.proto:google/api/client.proto:google/api/field_behavior.proto:google/api/http.proto:google/api/resource.proto:google/type/expr.proto:google/iam/v1/iam_policy.proto:google/iam/v1/options.proto:google/iam/v1/policy.proto '--direct_dependencies_violation_msg=%s is imported, but @go_googleapis//google/iam/v1:iam_proto doesn'\''t directly depend on a proto_library that '\''srcs'\'' it.' external/go_googleapis/google/iam/v1/iam_policy.proto external/go_googleapis/google/iam/v1/options.proto external/go_googleapis/google/iam/v1/policy.proto) (14:21:34) ERROR: /private/var/tmp/_bazel_udhamsingh/c318b2e3ffcdc99819999255aa864929/external/go_googleapis/google/iam/v1/BUILD.bazel:18:17 GoCompilePkg external/go_googleapis/google/iam/v1/iam_go_proto.a failed: (Segmentation fault): sandbox-exec failed: error executing command (cd /private/var/tmp/_bazel_udhamsingh/c318b2e3ffcdc99819999255aa864929/sandbox/darwin-sandbox/355/execroot/harness_monorepo && \ exec env - \ PATH=/bin:/usr/bin:/usr/local/bin \ TMPDIR=/var/folders/vs/rxltpcn91hz8cnxf_9bw5vkw0000gr/T/ \ VERIFICATION_SERVICE_SECRET=67d9b94d9856665afc21acd3aa745401 \ /usr/bin/sandbox-exec -f /private/var/tmp/_bazel_udhamsingh/c318b2e3ffcdc99819999255aa864929/sandbox/darwin-sandbox/355/sandbox.sb /var/tmp/_bazel_udhamsingh/install/d3bd16a8b22c859ba58f5dca04a9b1aa/process-wrapper '--timeout=0' '--kill_delay=15' bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/com_google_protobuf/protoc '--proto_path=bazel-out/darwin-fastbuild/bin/external/com_google_protobuf/_virtual_imports/descriptor_proto' '--proto_path=external/go_googleapis' '--descriptor_set_out=bazel-out/darwin-fastbuild/bin/external/go_googleapis/google/iam/v1/iam_proto-descriptor-set.proto.bin' '-Igoogle/iam/v1/iam_policy.proto=external/go_googleapis/google/iam/v1/iam_policy.proto' '-Igoogle/iam/v1/options.proto=external/go_googleapis/google/iam/v1/options.proto' '-Igoogle/iam/v1/policy.proto=external/go_googleapis/google/iam/v1/policy.proto' '-Igoogle/api/annotations.proto=external/go_googleapis/google/api/annotations.proto' '-Igoogle/api/client.proto=external/go_googleapis/google/api/client.proto' '-Igoogle/api/field_behavior.proto=external/go_googleapis/google/api/field_behavior.proto' '-Igoogle/api/http.proto=external/go_googleapis/google/api/http.proto' '-Igoogle/api/resource.proto=external/go_googleapis/google/api/resource.proto' '-Igoogle/protobuf/descriptor.proto=bazel-out/darwin-fastbuild/bin/external/com_google_protobuf/_virtual_imports/descriptor_proto/google/protobuf/descriptor.proto' '-Igoogle/type/expr.proto=external/go_googleapis/google/type/expr.proto' --direct_dependencies google/api/annotations.proto:google/api/client.proto:google/api/field_behavior.proto:google/api/http.proto:google/api/resource.proto:google/type/expr.proto:google/iam/v1/iam_policy.proto:google/iam/v1/options.proto:google/iam/v1/policy.proto '--direct_dependencies_violation_msg=%s is imported, but @go_googleapis//google/iam/v1:iam_proto doesn'\''t directly depend on a proto_library that '\''srcs'\'' it.' external/go_googleapis/google/iam/v1/iam_policy.proto external/go_googleapis/google/iam/v1/options.proto external/go_googleapis/google/iam/v1/policy.proto) (14:21:34) INFO: Elapsed time: 23.351s, Critical Path: 7.57s (14:21:34) INFO: 332 processes: 3 remote cache hit, 239 internal, 22 darwin-sandbox, 68 worker. (14:21:34) FAILED: Build did NOT complete successfully

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

I tried running bazel build //.... Everything was working till yesterday and suddenly today nothing is working

What operating system are you running Bazel on?

macOS Monterey Version 12.1

What's the output of bazel info release?

release 4.2.1

Have you found anything relevant by searching the web?

i found that uninstalling protobuf using brew uninstall protobuf solves this but in my case it is not solving.

Any other information, logs, or outputs that you want to share?

gcc --version Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/4.2.1 Apple clang version 13.0.0 (clang-1300.0.27.3) Target: x86_64-apple-darwin21.2.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@USB-05
Copy link
Author

USB-05 commented Dec 24, 2021

i tried following available solutions on internet but nothing is working in my macbook.

  1. installing and uninstalling protobuf using brew.
  2. installing latest version of XCode app and commandline tools both, current version of xcode app on my macbook is 13.2.1.
  3. restarting/shuting down macbook and trying again.
  4. cleaning all bazel related directories and trying clean build from scratch.

Nothing above mentioned is working for me :(

@USB-05
Copy link
Author

USB-05 commented Dec 24, 2021

Following are the flags i am passing to my build command from rc files.
`(10:27:35) INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=222

(10:27:35) INFO: Reading rc options for 'build' from /Users/udhamsingh/Documents/harness-github/portal_master/bazelrc.gcp:
'build' options: --google_credentials=platform-bazel-cache-dev.json

(10:27:35) INFO: Reading rc options for 'build' from /Users/udhamsingh/Documents/harness-github/portal_master/bazelrc.common:
'build' options: --java_language_version=8 --enable_platform_specific_config --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_vanilla --java_toolchain=@bazel_tools//tools/jdk:toolchain_vanilla --action_env=HARNESS_GENERATION_PASSPHRASE --workspace_status_command=tools/bazel/workspace_status_command.sh --strict_java_deps=warn --java_header_compilation=false --javacopt=-XepDisableAllChecks --javacopt=-Xlint:none --action_env=VERIFICATION_SERVICE_SECRET=XXXXXXX --test_env=MAX_ALLOWED_THREAD_LEAKS --test_env=TEST_OWNERS_ROOT_DIR --test_env=TEST_MONGO_URI --test_output=errors --test_env=LC_ALL=en_US.UTF-8 --define=HARNESS_ARGS=

(10:27:35) INFO: Reading rc options for 'build' from /Users/udhamsingh/Documents/harness-github/portal_master/bazelrc.cache:
'build' options: --experimental_guard_against_concurrent_changes

(10:27:35) INFO: Reading rc options for 'build' from /Users/udhamsingh/Documents/harness-github/portal_master/bazelrc.local:
'build' options: --disk_cache=~/.bazel-dirs/cache --symlink_prefix=/ --experimental_convenience_symlinks=ignore --experimental_no_product_name_out_symlink=true

(10:27:35) INFO: Reading rc options for 'build' from /Users/udhamsingh/Documents/harness-github/portal_master/.bazelrc:
'build' options: --sandbox_debug --announce_rc --show_timestamps --incompatible_strict_action_env --remote_timeout=1000s

(10:27:35) INFO: Found applicable config definition build:macos in file /Users/udhamsingh/Documents/harness-github/portal_master/bazelrc.common: --javabase=@openjdk8u242_macos_archive//:runtime --host_javabase=@openjdk8u242_macos_archive//:runtime`

@iamricard
Copy link

iamricard commented Dec 24, 2021

AFAICT this was fixed in 4.2.2 (I had the same issue). See #14275.

@USB-05
Copy link
Author

USB-05 commented Jan 3, 2022

Sure let me try with Bazel version 4.2.2

@USB-05
Copy link
Author

USB-05 commented Jan 4, 2022

Bazel 4.2.2 is solving this issue. Thanks

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