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

(Segmentation fault): protoc failed when building #9172

Closed
peleyal opened this issue Oct 31, 2021 · 3 comments
Closed

(Segmentation fault): protoc failed when building #9172

peleyal opened this issue Oct 31, 2021 · 3 comments

Comments

@peleyal
Copy link

peleyal commented Oct 31, 2021

Disclaimer: I just upgraded my MAC to Monterey (12.0.1) a few days ago, and I think that this issue started just after.

What version of protobuf and what language are you using?
Version: v3.13.0 and I also tried v3.19.1
Language: Python

What operating system (Linux, Windows, ...) and version?
MacOS Monterey (12.0.1)

What runtime / compiler are you using (e.g., python version or gcc version)
Python 3.9.6

What did you do?
Steps to reproduce the behavior:
(I Just pushed peleyal/peleyal@5dc65ae for that purpose...)

  1. Clone the stupid repo https://github.com/peleyal/peleyal
  2. bazel build ...

What did you expect to see
Success build :)

What did you see instead?

peleyal$ bazel build ...
INFO: SHA256 (https://golang.org/dl/?mode=json&include=all) = d8c610666c9794bb761bc0dacd7ebc9edae139a4b6044cfee291a5623136317c
INFO: Analyzed 3 targets (25 packages loaded, 831 targets configured).
INFO: Found 3 targets...
INFO: From Linking external/com_google_protobuf/libprotobuf.a:
/Library/Developer/CommandLineTools/usr/bin/libtool: file: bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/com_google_protobuf/_objs/protobuf/error_listener.o has no symbols
INFO: From Linking external/com_google_protobuf/libprotobuf_lite.a:
/Library/Developer/CommandLineTools/usr/bin/libtool: file: bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/com_google_protobuf/_objs/protobuf_lite/io_win32.o has no symbols
INFO: From Linking external/com_google_protobuf/libprotobuf_lite.a [for host]:
/Library/Developer/CommandLineTools/usr/bin/libtool: file: bazel-out/host/bin/external/com_google_protobuf/_objs/protobuf_lite/io_win32.o has no symbols
ERROR: /private/var/tmp/_bazel_peleyal/030f6eee7f9fec574720f87e326c8c2a/external/com_google_protobuf/BUILD:971:17: ProtoCompile external/com_google_protobuf/python/google/protobuf/compiler/plugin_pb2.py failed: (Segmentation fault): protoc failed: error executing command bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/com_google_protobuf/protoc '--python_out=bazel-out/darwin-fastbuild/bin/external/com_google_protobuf/python' -Iexternal/com_google_protobuf/python ... (remaining 2 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
INFO: Elapsed time: 168.081s, Critical Path: 20.27s
INFO: 410 processes: 35 internal, 375 darwin-sandbox.
FAILED: Build did NOT complete successfully

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment

Thank you! I really appreciate your time.
Eyal

@acozzette
Copy link
Member

I would guess that this is probably the same issue as #8884.

@jvolkman
Copy link
Contributor

jvolkman commented Dec 9, 2021

This is fixed in Bazel 4.2.2 by bazelbuild/bazel#14275

@peleyal
Copy link
Author

peleyal commented Dec 9, 2021

Thanks! It is indeed working now!!! 🥇 🥇 🥇 🥇 🥇

@peleyal peleyal closed this as completed Dec 9, 2021
ChrisCummins added a commit to ChrisCummins/CompilerGym that referenced this issue Dec 10, 2021
A segmentation fault in protoc caused by the macOS Monterey update is
mitigated by updating bazel version to 4.2.2. See:

protocolbuffers/protobuf#9172 (comment)

Issue facebookresearch#494.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants