Android builds on Bamboo are hanging for 20+ minutes on lintVital task
Asked Answered
T

1

6

For some time now, all of our Android builds (running on Bamboo) are hanging for 20+ minutes at the lintVital task, at which point the build is usually force stopped:

build   28-Jan-2019 09:25:25    > Task :app-bigscreen:lintVitalProdFiretvRelease
build   28-Jan-2019 09:26:36    Calling mockable JAR artifact transform to create file: /appl/bamboo/gradle-home/caches/transforms-2/files-2.1/552f5f21376c4f273769ade73c6fef92/android.jar with input /appl/bamboo/android-sdk-linux/platforms/android-28/android.jar
error   28-Jan-2019 09:47:00    Force Stop build feature is enabled for current plan. Either Bamboo has detected the build has hung or it has been manually stopped.

However, this is only the case on one our two Bamboo build agents - on the other one, the same build is running without any problems, with the lintVital task finishing within a second. (Builds on the development machines are also running fine.) According to our Bamboo admins the setup on the two build agents is "identical" - I also made sure that the Android SDK folder are in sync and since the line before the error references some files in the Gradle cache I also deleted that folder but that didn't do any good, either.

So, I am basically looking for any hints on what could make the lintVital task hang?

Or, more generally: What does the lintVital task do and what tools or other input (besides the content of our Git repository) does it depend on?

Trochilus answered 28/1, 2019 at 9:47 Comment(0)
T
0

Lint is memory intensive. Give your build more memory.

Put this in the <project root>/gradle.properties file:

# Gradle will get 1 GB of memory to play with.
org.gradle.jvmargs=-Xmx1g

(or add the -Xmx argument to a preexisting org.gradle.jvmargs attribute)

Increase it if it's still not enough. But don't give more than it needs, garbage collection gets slower as the available memory grows. The default value is 512m.

Turfman answered 6/2, 2019 at 14:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.