-
Notifications
You must be signed in to change notification settings - Fork 4k
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
6.0.0 have a memory regression triggering OOM in JVM while doing android desugaring #17665
Comments
This happened with the Andrdoid desugarer but it might be more relevant for @larsrc-google since it's about workers. |
I don't know the details of all the worker implementations. Does it happen without the build_tools_version change on 6.0.0? You could check with |
@larsrc-google yes it hits the same OOM issue if I remove the |
Ok, so I'm trying to reproduce this on my Linux box, using cgroups to limit the amount of memory available for the Bazel process and its subprocesses. At 1GB, it's marginal, sometimes working, sometimes crashing, always slow (because the JVM notices cgroups memory limits and reduces heap accordingly).
That's not the same error as yours. The line You also said you have some kernel diffs, does it still happen without those? I'm having trouble recreating it, even with bazel/src/main/java/com/google/devtools/build/lib/rules/android/DexArchiveAspect.java Line 537 in 56a9efb
|
I tried to add But the line it pointed out in the generated build file (from the output of
so maybe something changed in if you have some other args that could produce more debugging info I'm happy to run them. |
I would expect this would be a rules change rather than a Bazel change. @timpeut, could you take a look? |
I have the same issue as @fishy . I'm using bazel
I can build it on my Mac with 16gb of RAM, I can build it inside docker in which I limit RAM even to 2GBs, but when I building it on our CI on AWS runner I got a problem with memory. This runner has 8GB of RAM, when I switch it 16GB compilation is successful, but I would rather want to stay with this 8GB's one. I tried compilation with flags What I think it's also interesting I my case it tries to allocate the same amount of memory (8589934592 ) as in @fishy 's case .. |
I made additional test and I limited my app to empty
I'm building just it and I still facing the same problem.
This log is also little disturbing, why such a large number of targets has been configured for such a small project, may it be connected to the problem that @fishy and I described ? |
Description of the bug:
I'm at the
android
directory under https://github.com/fishy/notifbot/tree/v0.9.1, with some local changes:Running it with bazel 6.0.0 will hit a memory issue on one of my machines:
Switching to 5.4.0 (by changing
.bazelversion
file) it will work correctly, so this is definitely an issue between 6.0.0 and 5.4.0.The memory issue with 6.0.0 happens on a crostini environment (with 8GB total system memory, but according to
free
it seems crostini only got 6GB of them), but not on a linux machine with 32GB of memory. There are also some kernel diff which might contribute to it, but either way it should not require >6GB memory to build an Android app.Crostini (with the issue):
Linux machine (without the issue):
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
See above.
Which operating system are you running Bazel on?
No response
What is the output of
bazel info release
?release 6.0.0
If
bazel info release
returnsdevelopment 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 master; git rev-parse HEAD
?Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?
Full log file of `/home/fishy/.cache/bazel/_bazel_fishy/321239f8e86392297cce34a42c99650d/execroot/notifbot/hs_err_pid13072.log`
The text was updated successfully, but these errors were encountered: