Skip to content

Gradle OOM error across different platforms #131006

Closed

Description

@christopherfujino

For example: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8775032916537102849/+/u/run_test.dart_for_build_tests_shard_and_subshard_3_3/test_stdout

[        ] 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.

Activity

  1. christopherfujino commented on Jul 20, 2023

    @christopherfujino
    ContributorAuthor
  2. christopherfujino commented on Jul 20, 2023

    @christopherfujino
    Author
  3. christopherfujino commented on Jul 20, 2023

    @christopherfujino
    Author
  4. keyonghan commented on Jul 20, 2023

    @keyonghan
    Contributor

    This ran on a VM. @reidbaker do you have any insight on this error?

  5. added
    team-androidOwned by Android platform team
    fyi-infraFor the attention of Infrastructure team
    and removed
    team-infraOwned by Infrastructure team
    on Jul 20, 2023
  6. christopherfujino commented on Jul 27, 2023

    @christopherfujino
    ContributorAuthor

    Flaky bot filed p0 because of this issue: #131322

  7. reidbaker commented on Jul 27, 2023

    @reidbaker
    Contributor

    keyonghan Do you have any idea what the heap space is on the machines? Could this be a legitimate OOM?

  8. keyonghan commented on Jul 27, 2023

    @keyonghan
    Contributor

    keyonghan Do you have any idea what the heap space is on the machines? Could this be a legitimate OOM?

    The issue happened across different platforms/testbeds, which sounds less likely a machine issue.

  9. added
    P0Critical issues such as a build break or regression
    on Aug 1, 2023
  10. 2 remaining items

  11. reidbaker commented on Aug 1, 2023

    @reidbaker
    Contributor

    On but not on the top of my list.

  12. eliasyishak commented on Aug 2, 2023

    @eliasyishak
    Contributor
  13. changed the title [-]Gradle OOM error in devicelab[/-] [+]Gradle OOM error across different platforms[/+] on Aug 2, 2023
  14. reidbaker commented on Aug 3, 2023

    @reidbaker
    Contributor

    Note from triage, On my plate for next week.

  15. reidbaker commented on Aug 18, 2023

    @reidbaker
    Contributor

    This is still on my radar. It is the next task after flutter-team-archive/engine#44724

  16. reidbaker commented on Aug 21, 2023

    @reidbaker
    Contributor

    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

  17. reidbaker commented on Aug 21, 2023

    @reidbaker
    Contributor

    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).

  18. stuartmorgan-g commented on Aug 21, 2023

    @stuartmorgan-g
    Contributor

    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

    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?" 🙂

  19. github-actions commented on Sep 5, 2023

    @github-actions

    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 -v and a minimal reproduction of the issue.

  20. locked as resolved and limited conversation to collaborators on Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P0Critical issues such as a build break or regressionfyi-infraFor the attention of Infrastructure teamteam-androidOwned by Android platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions