Repository navigation
Gradle OOM error across different platforms #131006
Copy link
Copy link
Closed
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressionfyi-infraFor the attention of Infrastructure teamFor the attention of Infrastructure teamteam-androidOwned by Android platform teamOwned by Android platform team
Description
[ ] Execution failed for task ':app:packageDebug'.
[ ] > A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
[ ] > java.lang.OutOfMemoryError (no error message)
and
[ ] Caused by: java.lang.OutOfMemoryError: Java heap space
[ ] at java.base/java.io.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:81)
[ ] at com.android.zipflinger.NoCopyByteArrayOutputStream.<init>(NoCopyByteArrayOutputStream.java:27)
[ ] at com.android.zipflinger.Compressor.deflate(Compressor.java:35)
[ ] at com.android.zipflinger.BytesSource.build(BytesSource.java:89)
[ ] at com.android.zipflinger.BytesSource.<init>(BytesSource.java:50)
[ ] at com.android.zipflinger.Sources.from(Sources.java:40)
[ ] at com.android.zipflinger.Sources.from(Sources.java:32)
[ ] at com.android.builder.internal.packaging.ApkFlinger$writeFile$1.call(ApkFlinger.kt:198)
[ ] at com.android.builder.internal.packaging.ApkFlinger$writeFile$1.call(ApkFlinger.kt:195)
[ ] at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1428)
[ ] at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
[ ] at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
[ ] at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
[ ] at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
[ ] at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
I have been seeing this intermittently all week.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressionfyi-infraFor the attention of Infrastructure teamFor the attention of Infrastructure teamteam-androidOwned by Android platform teamOwned by Android platform team
Activity
christopherfujino commentedon Jul 20, 2023
Earlier reported by cbracken July 11 in https://ci.chromium.org/p/flutter/builders/prod/Linux%20build_tests_3_3/1832?
christopherfujino commentedon Jul 20, 2023
christopherfujino commentedon Jul 20, 2023
keyonghan commentedon Jul 20, 2023
This ran on a VM. @reidbaker do you have any insight on this error?
christopherfujino commentedon Jul 27, 2023
Flaky bot filed p0 because of this issue: #131322
reidbaker commentedon Jul 27, 2023
keyonghan Do you have any idea what the heap space is on the machines? Could this be a legitimate OOM?
keyonghan commentedon Jul 27, 2023
The issue happened across different platforms/testbeds, which sounds less likely a machine issue.
MiB Mem : 30073.3 total, 3000.9 free, 955.5 used, 26116.9 buff/cachePhysMem: 3739M used (1450M wired), 12G unused.PhysMem: 5180M used (2584M wired), 27G unused.2 remaining items
reidbaker commentedon Aug 1, 2023
On but not on the top of my list.
eliasyishak commentedon Aug 2, 2023
Flakey bot also filed 2 more P0 issues:
[-]Gradle OOM error in devicelab[/-][+]Gradle OOM error across different platforms[/+]reidbaker commentedon Aug 3, 2023
Note from triage, On my plate for next week.
reidbaker commentedon Aug 18, 2023
This is still on my radar. It is the next task after flutter-team-archive/engine#44724
reidbaker commentedon Aug 21, 2023
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8772165294008113857/+/u/run_test.dart_for_build_tests_shard_and_subshard_3_3/test_stdout
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8772574967373488945/+/u/run_test.dart_for_build_tests_shard_and_subshard_3_3/test_stdout
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8772671673376919969/+/u/run_test.dart_for_build_tests_shard_and_subshard_3_3/test_stdout
All look like flutter gallery. Will increase the memory allocated to gradle for that project.
reidbaker commentedon Aug 21, 2023
Using 4g since that appears to be used in a few places in packages https://github.com/search?q=repo%3Aflutter%2Fpackages%20gradle.properties&type=code even though build scan shows we only used 880Mib on my machine. https://scans.gradle.com/s/blb3dit4srnuu/performance/build
Bump memory usage for flutter gallery (#132968)
reidbaker commentedon Aug 21, 2023
If this issue shows up again when building flutter gallery we should reopen this issue. If it happens again for a different project we should open a new issue and reference this issue (and its solution).
stuartmorgan-g commentedon Aug 21, 2023
FWIW I believe I picked that number via the rigorous scientific process of "I really don't want to deal with this again in another year; what's a big number that should make it go away for the foreseeable number, but is well within the machines' capabilities?" 🙂
Bump memory usage in gradle for platform views (#133155)
github-actions commentedon Sep 5, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.