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

build: resource is restricted by Bazel scheduler #12455

Closed
Shikugawa opened this issue Aug 4, 2020 · 6 comments · Fixed by #12487
Closed

build: resource is restricted by Bazel scheduler #12455

Shikugawa opened this issue Aug 4, 2020 · 6 comments · Fixed by #12487

Comments

@Shikugawa
Copy link
Member

Build is not worked parallelly. We can find [Sched] and CPU is not fully used, so that it might be caused by Bazel scheduler behavior. This error can be found after this commit.

shikugawa@machine:~/dev/envoy$ bazel build //test/integration:protocol_integration_test --jobs=60
INFO: Analyzed target //test/integration:protocol_integration_test (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
INFO: From CcCmakeMakeRule external/envoy/bazel/foreign_cc/yaml/include:

INFO: From CcCmakeMakeRule external/envoy/bazel/foreign_cc/event/include:
[3 / 2,332] 60 actions, 1 running
    CcConfigureMakeRule external/envoy/bazel/foreign_cc/gperftools_build/include; 14s linux-sandbox
    [Sched] CcCmakeMakeRule external/envoy/bazel/foreign_cc/nghttp2/include; 24s
    [Sched] CcCmakeMakeRule external/envoy/bazel/foreign_cc/ares/include; 24s
    [Sched] Compiling external/com_google_protobuf/src/google/protobuf/compiler/csharp/csharp_message.cc [for host]; 24s
    [Sched] Compiling external/com_google_protobuf/src/google/protobuf/compiler/java/java_extension_lite.cc [for host]; 24s
    [Sched] Compiling external/com_google_protobuf/src/google/protobuf/compiler/java/java_generator_factory.cc [for host]; 24s
    [Sched] Compiling external/com_google_protobuf/src/google/protobuf/compiler/code_generator.cc [for host]; 24s
    [Sched] Compiling external/com_google_protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc [for host]; 24s ...

Screenshot from 2020-08-04 13-49-15

@lizan
Copy link
Member

lizan commented Aug 4, 2020

I can't reproduce this. Do you have anything in user.bazelrc or ~/.bazerc?

@Shikugawa
Copy link
Member Author

Shikugawa commented Aug 4, 2020

user.bazelrc is only this.

build --config=clang
build --test_output=all

The commits before two weeks ago are worked fine. So It might not be a problem on my environment.

@lizan
Copy link
Member

lizan commented Aug 4, 2020

What if you don't specify --jobs?

@Shikugawa
Copy link
Member Author

It may be caused by --experimental_local_memory_estimate in .bazelrc. It might have a confusional bug. So we prefer to destroy it.

@dio dio added the area/build label Aug 4, 2020
@mattklein123
Copy link
Member

It may be caused by --experimental_local_memory_estimate in .bazelrc. It might have a confusional bug. So we prefer to destroy it.

Yes I hit this also recently. On my underpowered laptop it decided to only run one job with this set. I haven't seen it as an issue on my bigger cloud machine.

@moderation
Copy link
Contributor

I've commented on this in Slack and at #1861 (comment). The behavior changed in Bazel 3.2.0 and any machine without much memory will scale back to a single CPU. I've had to override this setting in .bazelrc on my RPI4 with 4 cores and 8G of RAM and my Lenovo X1 Carbon with 12 cores and 16G of RAM

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

Successfully merging a pull request may close this issue.

5 participants