bazelbuild / bazel

a fast, scalable, multi-language and extensible build system
https://bazel.build
Apache License 2.0
23.24k stars 4.08k forks source link

`bazel info` is blocked by `bazel build` runs #21891

Open dkashyn-sfdc opened 7 months ago

dkashyn-sfdc commented 7 months ago

Description of the bug:

We do have quite costly bazel build run and to check how server is doing we want to run bazel info from time to time.

The issue is: if costly bazel build is running and Bazel server starting to experience memory pressure, we are unable to see spike of GCs in time.

Which category does this issue belong to?

Core

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

Run bazel build and try to run bazel info in parallel.

You will see something like

 bazel info
Another command (pid=605545) is running. Waiting for it to complete on the server (server_pid=598401)...

When in reality info has no implications on already executed commands since it is a RO operation.

Which operating system are you running Bazel on?

RHEL9

What is the output of bazel info release?

7.0.1

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

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

No response

fzakaria commented 7 months ago

I think the Make environment expansion might? I see this line in the code:

var unused = configurationSupplier.get(); // We'll need this later anyway

That configuration supplier seems to execute on the remote instances I think