Comments (9)
Hey @amit-mittal - thanks for reporting!
This type of error message most commonly occurs when your BuildBuddy instance restarts for whatever reason. Are you able to see if your BuildBuddy app has any restarts? Could it be running out of memory?
from buildbuddy.
Hey @siggisim - thanks for looking into it!
No, I don't see any crashes or restarts on the BuildBuddy server side. The node on which BuildBuddy is running has 60 GB memory, while only 16 GB is being used.
So far, we are able to repro this issue only while running tests of one of our Go services (if that is relevant).
from buildbuddy.
Interesting, is there any chance this is a CI run that runs multiple Bazel invocations back-to-back?
By default, Bazel will try to re-use the build event stream connection across invocations - which could be leading to the issues we're seeing here. You can disable this behavior with the bazel flag --keep_backend_build_event_connections_alive=false
. I suspect that might solve this issue.
from buildbuddy.
I added --keep_backend_build_event_connections_alive=false
in our .bazelrc
, but I am seeing below errors while doing bazel build ....
one after another, that never used to happen for us. The below errors go away if I remove this new setting, so I don't think the overhead of creating the new connection as part of every run would work for us.
WARNING: The background upload of the Build Event Protocol for the previous invocation failed with the following exception: 'com.google.devtools.build.lib.util.AbruptExitException: The Build Event Protocol upload failed: All retry attempts failed. UNAVAILABLE: UNAVAILABLE: Channel shutdown invoked UNAVAILABLE: UNAVAILABLE: Channel shutdown invoked'. Ignoring the failure and starting a new invocation..
WARNING: The background upload of the Build Event Protocol for the previous invocation failed to complete in 5.003 seconds. Cancelling and starting a new invocation...
I don't think it should matter, but the run is happening on the developer machine (MacOS).
Regarding the multiple invocations, we are NOT running bazel commands in parallel, but as part of the usual developer workflow, we do run bazel commands one after another. That is one of the reasons, that we have --bes_upload_mode=nowait_for_upload_complete
set, so the developers are not blocked while the events are being uploaded.
from buildbuddy.
There are (unfortunately) lots of Bazel bugs with the --bes_upload_mode=
flag:
There is some work being done to improve the BES artifact uploader:
Do you see the same error without that --bes_upload_mode=
flag?
Do you see the same error if you add the flags --remote_timeout=3600
and --bes_timeout=3600s
(wondering if a timeout is being hit and not handled gracefully)?
from buildbuddy.
That's true! 😞
I don't think we would be able to change the --bes_upload_mode
to a blocking call, but we can try it out. As we upload the events in async mode, we'll also try increasing the timeout and share the findings.
We will also prioritize upgrading bazel to v4.2.1
, to pick up the fixes in the BES uploader, if there were any. Thanks for helping to investigate the issue!
from buildbuddy.
We also see this crash only on our Linux CI (macOS CI is fine). We're on Bazel 4.2.0 and we don't even set --bes_upload_mode
, but we still see the exact same crash. Setting --keep_backend_build_event_connections_alive=false
did not make a difference for us.
from buildbuddy.
This is likely fixed by bazelbuild/bazel#13959 which hasn't made it into any Bazel releases yet.
Are either of you able to share your grpc log for one of these invocations captured with Bazel's --experimental_remote_grpc_log=
? You can send it to [email protected]
from buildbuddy.
Going to close this issue now that bazelbuild/bazel@e855a26 seems to have made it into Bazel 5.0 release candidates bazelbuild/bazel#14013
Please re-open this issue if you're able to reproduce with this with Bazel 5.0 (in which case either a grpc log or a BuildBuddy Cloud invocation would be super helpful).
from buildbuddy.
Related Issues (20)
- [CLI] Queries break for some common attributes HOT 2
- [CLI] Several "too many files open" errors for some builds HOT 2
- Actions using ctx.actions.declare_directory() are never cached HOT 2
- Non-root user in buildbuddy-app-onprem HOT 3
- Build Invocation Data not Shareable Across Docker containers even when stored in S3 HOT 4
- Incorrect name and organization when logging in for the first time HOT 5
- Reclient/chromium build support? HOT 1
- BuildBuddy GitHub app: Passes --heap_dump_on_oom HOT 1
- BuildBuddy GitHub app: Container has a version of `ar` without `--output=` flag HOT 2
- `buildbuddy.yaml`: Set default --config HOT 4
- BuildBuddy GitHub app: Submodules HOT 1
- [CLI] `bb login` fails in `git-worktree` linked worktrees. HOT 2
- Show analysis phase errors explicitly HOT 2
- [CLI] bb specific commands don't work when using `.bazelversion` HOT 5
- Feature Request: Show execution log in artifacts tab HOT 3
- Unreadable test result HOT 9
- [CLI] `Gathering metadata for bazel version...` breaks with some `tools/bazel` wrappers HOT 5
- [CLI] `bb login` should be a no-op if the user already has a valid API key HOT 4
- [CLI] `bb login` should say it's going to open a webpage before doing so HOT 2
- [CLI]: bb plugin hardlink does not work in devcontainer's volume HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buildbuddy.