-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Heap usage regression in 8.3-rc-1 #25834
Comments
@erdi Thank you for the heads up! You can use Gradle Project Replicator to reproduce the structure of your project and see whether the issue persists. |
A small update on this, @ov7a. I took some heap dumps using |
Hi Marcin 👋 |
I’m off until Tuesday so I unfortunately won’t be able to provide any more info before then as I don’t even have access to the project atm. It’s also highly unlikely that I will be able to provide you with full heap dumps as that poses a risk of leaking credentials that are being passed to the build. My current plan is to prioritise investigating this further as soon as I’m back at work so that I can provide feedback in as timely manner as possible. Just FYI, it’s clearly a regression but there is a third party plugin involved so it might be just due to that plugin doing something silly. I will come back to you on Tuesday even if it will be just to let you know that I’ve not made any progress. |
Do I understand correctly that you managed to track this issue down on your end with #25949 being a potential fix? Do you still need me to investigate and provide more info, @eskatos, @ljacomet, @jvandort? FYI, I'm more than happy to test any nightlies with a potential fix as they become available, just let me know. |
We have determined the root cause of holding references to the detached configurations, which the PR attempts to resolve. An optimization was added in 8.3 which cached all resolved components in a given build in memory. This would normally be acceptable, however detached configurations themselves create ad-hoc components which in this case causes the memory regression. We are still looking into a proper solution to this, as the above linked PR will undo other important memory optimizations for non-detached-configuration situations. |
@erdi Could you try increasing memory to have the build pass and communicate how much more is needed? |
Thank you for the additional information. Builds affected by this regression should stick with Gradle 8.2.1. |
Thanks for the explanation. We will skip 8.3 and I will report back here if it has been fixed in 8.4 when an RC for that version is released. |
@ljacomet does this issue also affect Gradle 8.2.1? We're getting similar error when we run the
And same error with Gradle 8.3. If you think this is unrelated I can create a new issue. |
This issue is about a regression in Gradle 8.3 so no, 8.2.1 is not affected by this particular issue, @eboudrant. If you're getting this on 8.2.1 then it sounds like you might want to allocate more heap space to Gradle. |
Ok, I will open a new issue since the error I'm getting is with a heap already at 56G. Same OOM in 8.2.1 or 8.3. |
This should have been fixed by #26134 |
@erdi @eboudrant Could you test a recent 8.4 nightly and see if the memory usage is back to normal? |
@ljacomet, here's the heap summary from a dump taken using
And here's the same for
The heap size increase is minimal now (it was double) so I guess the regression has been fixed. |
@erdi Thanks, let's consider this issue as resolved then. @eboudrant Please file another issue, if you did not do it already, as it seems you are hitting a different problem. |
Expected Behavior
8.3-rc-1 does not use significantly more heap space memory.
Current Behavior
A build invocation which passes on
8.2.1
fails withjava.lang.OutOfMemoryError: Java heap space
on8.3-rc-1
.Context (optional)
This is an early heads up that there seems to be a heap space usage regression in
8.3-rc-1
. I need to do some more digging but from what I've seen so far on our fairly large build (1100+ projects) it seems to be related to resolving of a lot of dependency configurations when tasks contributed bycom.github.jk1.dependency-license-report
plugin are executed.The main point is that executing the exact same tasks on
8.2.1
does not throwOutOfMemoryError
but it does on8.3-rc-1
.I will take some heap dumps and compare them between the versions in an effort to try to pin point what it is being kept in memory on
8.3-rc-1
.Steps to Reproduce
Currently unknown.
Gradle version
8.3-rc-1
Gradle version that used to work
8.2.1
Build scan URL (optional)
No response
Your Environment (optional)
No response
The text was updated successfully, but these errors were encountered: