-
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
java.lang.OutOfMemoryError when upgrading from Bazel 7.0.2 to 7.1.1 #21803
Comments
@ivan-golub How many CPUs do you have on your machine? And how many repos are there that could potentially be fetched in parallel? My suspicion: Loom doesn't use non-blocking file I/O yet and instead creates additional native threads when a virtual thread is blocked on file operations. If too many repos are blocked on them in parallel, this could run into the same thread limits as with a native thread pool. Hopefully we don't reach the OS limit and just need to tweak some native memory settings. |
Thanks for the report. Some questions:
|
32 cores
7131
Bzlmod disabled
Definitely happens with wildcard |
@bazel-io fork 7.2.0 |
We (Figma) experienced this too.
|
@ivan-golub @jfirebaugh Could you share at least a rough breakdown of which rulesets/repo rules contribute to this number of external repos? |
its an android repo in our case, so androidx, android_tools, dagger, kotlin, jdk, robelectric, some jetbrains libs, internal protobuf repos and 1st/3rd party libs |
Is this still on track for 7.2? We're aiming to create the first RC on 5/13. |
This one is hard to pin down. We'd still like to fix if we can get a hold of it, but it's possible that the fix will only be in time for a 7.2.1. Marked #21815 as a soft blocker. |
I've also been experiencing this for a while now. In my case, building a Python zip after changing more than a couple requirement versions in
I tried many different flags like I was again trying to solve this issue today, and saw the I tried running a I hope other folks running into |
We also experience this issue after updating bazel from 6.4.0 to 7.1.2. We use I can confirm, that I can't reproduce the issue with bazel 7.0.2. Is there an estimate for when it will be resolved? UPD:
This fixed issue for me as well. Thanks @mpereira ! |
I tried to reproduce this for a while, both on synthetic and real-world projects, but I haven't observed any meaningful difference between 7.0.2 and 7.1.2. The flip of If you reported an issue in this thread, could you try running with 7.2.0rc2 and an explicit |
I found a clean reproducer on Slack (thanks @hugocarr): https://github.com/hugocarr/cloud_repro/tree/hugo/requirements_oom I get an OOM with The profiles show that with |
Good news: I tested the repro with 7.2.0rc3 and it seems that the issue is fixed there. I don't know why though. |
Maybe somehow fixed by #22573? @ivan-golub Can you please also verify this issue no longer exists with 7.2.0rc3? |
Just to reiterate: Chatting with @fmeum in Bazel slack about an OOM we were experiencing during the fetch stage when we run It appears that upgrading from |
This is fixed in 7.2.0 for us too. |
Thanks for the reports! I'll go ahead and close this for now. If new reports surface, we can revisit. |
Description of the bug:
Upgrading from bazel 7.0.2 to 7.1.1 resulted in consistent OOM exception being thrown during
bazel query
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.
No response
Which operating system are you running Bazel on?
linux
What is the output of
bazel info release
?No response
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 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?
Suggestion from bazel public slack to disable experimental_worker_for_repo_fetching with
--experimental_worker_for_repo_fetching=off
resolved issuesAny other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: