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

Bump Bazel version -> 4.1.0 and Protobuf version -> 3.17.3 #1115

Merged
merged 1 commit into from
Aug 5, 2021

Conversation

sampajano
Copy link
Collaborator

@sampajano sampajano commented Aug 4, 2021

Bazel -> 4.1.0 (Reducing memory-related crash on Mac)

Similar Bazel crashes to what's reported here (github) or here (stackoverflow) was seen while building the prereqs image on macOS/Docker (16-inch intel mbp):

$ docker-compose build --no-cache common prereqs

...

Server terminated abruptly (error code: 14, error message: 'Socket closed', log file: '/root/.cache/bazel/_bazel_root/.../server/jvm.out')

------

failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c bazel build javascript/net/grpc/web/... &&   cp $(bazel info bazel-genfiles)/javascript/net/grpc/web/protoc-gen-grpc-web   /usr/local/bin/protoc-gen-grpc-web]: exit code: 37

The reason is that Bazel will crash under memory pressure. And bumping Bazel version to 4.1.0 fixes it on my Macbook (2019 16-inch mbp) for default Docker on Macsetup (uses 2GB memory).

Although, ./scripts/run_basic_tests.sh would still crash with the same error, which is only fixable after bumping the runtime memory option (e.g. to 4GB) in Docker for Mac settings .

(Also big thanks @stanley-cheung for helping with the debugging :))

Protobuf

Updating Protobuf too because Bazel 4.0+ demands Protobuf 3.13+ (see bazelbuild/bazel#12887 (comment)).

@sampajano sampajano changed the title Bump Bazel version to 4.1.0 (to avoid bazel build crash on Mac/Docker) Bump Bazel version to 4.1.0 (to avoid bazel build crash on macOS/Docker) Aug 4, 2021
@sampajano sampajano force-pushed the 1-bazel-version branch 3 times, most recently from 21cde5c to f9bee02 Compare August 4, 2021 08:26
@sampajano sampajano changed the title Bump Bazel version to 4.1.0 (to avoid bazel build crash on macOS/Docker) Bump Bazel version -> 4.1.0 and Protobuf version -> 3.17.3 Aug 5, 2021
@stanley-cheung stanley-cheung merged commit ef0f44e into grpc:master Aug 5, 2021
@sampajano sampajano deleted the 1-bazel-version branch August 5, 2021 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants