Skip to content

Gradle Kotlin daemon infinite loop until JVM max memory runs out #193

Open
@kalyncoose

Description

@kalyncoose

Hello, thank you react native community for supporting this Docker image!

Issue Environment:

  • Runtime: GitLab CI/CD Pipeline Job
  • Image: reactnativecommunity/react-native-android:latest (also tried 6.0 and 5.4)
  • Gradle: 7.5.1
  • Android SDK Level: 31
  • jvmargs: -Xmx16g -Xms2g \ -XX\:MetaspaceSize\=512m -XX\:MaxMetaspaceSize\=1g \ -XX\:NewSize\=256m -XX\:MaxNewSize\=3g \ -Dfile.encoding\=UTF-8
  • Dependencies: node_modules is downloaded from previous job which contains the necessary react native modules

Issue Description:
When attempting to run ./gradlew bundleRelease the Gradle daemon starts as expected but on the first task :react-native-gradle-plugin:compileKotlin causes an infinite loop with the Gradle kotlin daemon. When running with no options, the daemon runs out of memory (15.7GiB) and closes at about 15 minutes of running. With info or debug/stacktrace option, daemon runs out of memory and closes at about 45 minutes of running.

Issue Reproduction:
I cannot reproduce this issue locally, only in the pipeline pod which uses this Docker image. Please look through the debug/stacktrace log dump below.

Issue Logs:
job.log

I am grateful for any expert to provide a diagnosis on what could be causing this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions