-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Bazel consumes too much memory and hangs in docker container #3645
Comments
Confirmed this also happens on release 0.5.4 |
Another sample, got a different behavior, instead of hanging it fails with an error:
|
Hi, this prevents Angular bazel apps from using CircleCI, which is our recommendation. Can someone triage this? I might be able to fix it if I could tell what is wrong. |
Ping! |
@gregmagolan tracked it down (thanks!) Under the docker container, the amount of memory available to a process is limited Bazel should determine the amount of available RAM (you hint at this in https://docs.bazel.build/versions/master/user-manual.html#flag--ram_utilization_factor ) (Edited by @laszlocsomor on 2018/06/14: fix broken URL) |
Closes #8
/cc: @jhfield @ulfjack @ericfelly Summary: #3645 (comment) Who should work on this? |
We have no idea what's going on there, and I don't think we can debug this without seeing jvm.out. In order to get better debug information in the future, we will also need to add code to bazel client to cat jvm.out. |
This isn't the first time that not having jvm.out is preventing us from making progress. |
I think I opened an issue a while back to add documentation on “what should
you report” when seeing serious bazel issues (I think I was talking about
reproducibility).
…On Thu, 14 Jun 2018 at 10:51 Ulf Adams ***@***.***> wrote:
This isn't the first time that not having jvm.out is preventing us from
making progress.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3645 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIF87V8AeAGft38-2Bnc2n13YKwsEuks5t8hYRgaJpZM4PICpo>
.
|
Builds are timing out, eg: https://travis-ci.org/whilp/dotfiles/builds/438142354 Perhaps this is because bazel's estimates for available resources aren't super when running in docker. bazelbuild/bazel#3645 bazelbuild/bazel#2946
I have run into similar issues and the |
- Upgrade `bazel` to `0.24.0` - Restructure `.circleci/config.yml` to use `machine` executor. This removes memory limitations (see bazelbuild/bazel#3645) and removes the need to upgrade `libstdc++` (Ubuntu's bundled on is up-to-date enough) - Disable building code multiple times on CircleCI
@ulfjack This issue is still bothering Angular. Is it possible to make Bazel auto-tune the memory usage (eg. adjusting the parallel job number) according to the RAM size? |
Hi there! We're doing a clean up of old issues and will be closing this one. Please reopen (or ping me to reopen) if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so. |
@sgowroji Not stale, has a Bazel team assignee. |
I think #16512 does fix this. |
@larsrc-google Please reopen, my fix only applied to CPU shares, not RAM. |
The memory usage in general is hard to control - Bazel needs to hold your build graph in memory. The amount of parallel actions can be controlled with |
Description of the problem / feature request / question:
I have a sass_binary rule from https://github.com/bazelbuild/rules_sass
And build in this docker image on CircleCI
https://github.com/alexeagle/ngcontainer/blob/master/Dockerfile
Most of the time the build hangs while compiling C++, but sometimes it succeeds.
If possible, provide a minimal example to reproduce the problem:
https://circleci.com/gh/alexeagle/angular-bazel-example/1
is a (somewhat) minimal example.
Source: https://github.com/alexeagle/angular-bazel-example
Environment info
Operating System:
Debian linux (jessie) (in docker)
Bazel version (output of
bazel info release
):Build label: 0.5.1
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Jun 6 10:34:11 2017 (1496745251)
Build timestamp: 1496745251
Build timestamp as int: 1496745251
Have you found anything relevant by searching the web?
(e.g. StackOverflow answers,
GitHub issues,
email threads on the
bazel-discuss
Google group)Anything else, information or logs or outputs that would be helpful?
(If they are large, please upload as attachment or provide link).
The text was updated successfully, but these errors were encountered: