Status Update
Comments
cm...@google.com <cm...@google.com>
na...@gmail.com <na...@gmail.com> #2
Also, here are some more folks likely seeing the same thing:
je...@google.com <je...@google.com>
ga...@google.com <ga...@google.com> #3
I've uploaded buildSrc.zip which contains JacocoTaskDelegate
class with added logging. It will print to stdout which jar/dir/file it tries to instrument. It should hopefully help pinpoint the class file that is causing Jacoco to be stuck.
To start using this unzip buildSrc.zip
in the root directory. In case you already have buildSrc
in your project please add buildSrc/src/main/java/gradle-core/src/main/java/com/android/build/gradle/internal/tasks/JacocoTaskDelegate.java
to it and update buildSrc/build.gradle
with
dependencies {
compile 'com.android.tools.build:gradle:3.6.2'
compile group: 'org.jacoco', name: 'org.jacoco.core', version: '0.7.9'
}
To verify this is the version of JacocoTaskDelegate
you are using you should see
**************************************
Using modified Jacoco instrumentation
**************************************
in the logs. Can you please run the build a few times and share the logs?
ga...@google.com <ga...@google.com> #4
Also, if the build is making no progress, please capture a couple of thread dumps (e.g. 10) using jstack
as that should help us figure out what is going on.
ph...@gmail.com <ph...@gmail.com> #5
gradle task ":app:jacocoDebug" is stuck for over +12 minutes in AGP 3.6.3
ph...@gmail.com <ph...@gmail.com> #6
ga...@google.com <ga...@google.com> #7
Re #5, #6: Can you please follow instructions in #3 and share the logs?
ke...@gmail.com <ke...@gmail.com> #8
My team also suffer from the same issue, stuck at jacocoDebug task from time to time, almost every 5 builds. Cancel and restart the build solve the issue.
I have followed the instructions in
I'm happy to add more logs if you need to.
ga...@google.com <ga...@google.com> #9
Can you please add this version of JacocoTaskDelegate
to the buildSrc
project, and share logs of the build that is stuck? It contains more logging that should help in figuring this out.
ke...@argos.co.uk <ke...@argos.co.uk> #10
Have done the replacement and here the results.
I have also added the happy build log, in case that helps.
Happy to provide more logs.
ga...@google.com <ga...@google.com> #11
Thank you so much for sharing the logs, I managed to figure out what is causing the issue.
The issue is the following, and it happens only in incremental builds:
- AGP keeps a Guava
Multimap
frombaseDirectory
->fileToProcess
- for all changed files we find to which base directory it belongs to
- for every
baseDirectory
we launch Jacoco instrumentation for all changed files
The problem is in step 3). From multimap basePathToProcess
in order to fetch all base paths to process we do basePathToProcess.keys()
In your incremental run (initial-logs.txt) there are 1500+ changed classes to instrument under app/build/intermediates/javac/consumerDebug/
. AGP will instrument all 1500 files 1500 times, which is taking forever. Clean builds do not have this issue as we are using a different mechanism to compute set of files to process.
ga...@google.com <ga...@google.com> #12
ba...@gmail.com <ba...@gmail.com> #13
ga...@google.com <ga...@google.com> #14
ms...@vivino.com <ms...@vivino.com> #15
This should narrow the search down.
ga...@google.com <ga...@google.com> #16
To summarize, this will be fixed in 4.1.0-alpha11 and 4.0.1. Thank you all for your help in debugging this issue.
ba...@gmail.com <ba...@gmail.com> #17
(although much less frequently than before) I am still seeing the
occasional infinite build. This is particularly prevalent if I have just
changed some dagger configuration. It may be completely unrelated but I now
see the following warning at the start of a build for every single module
in the project:
Kotlin plugin is applied to the project :module_name but we cannot find the
KaptTask. Make sure you apply the kotlin-kapt plugin because it is
necessary to use kotlin with data binding.
On Wed, 27 May 2020 at 14:25, <buganizer-system@google.com> wrote:
ga...@google.com <ga...@google.com> #18
Re #17: Can you please file a separate issue regarding this, with thread dump of a stuck build?
Description
AI-192.7142.36.36.6308749, JRE 1.8.0_212-release-1586-b4-5784211x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.15.3, screens 1680x1050; Retina
AS: 3.6.2; Kotlin plugin: 1.3.61; Android Gradle Plugin: 3.6.2; Gradle: 5.6.4; NDK: from local.properties: 15.2.4203891, latest from SDK: 21.0.6113669; LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: 3.10.2, from PATH: (not found)Source: user_sentiment_feedback
IMPORTANT: Please read
Hi guys,
I'm bringing this issue back as its still very much alive and causes the absolute _most_ pain for me and my team every single day. It's simply a disaster of epic scale that the build gets stuck and CPU goes to 100% until manually cancelled.
I've reached out to the jacoco team as well and they say all is good with there plugin -
Again I've provided a few traces and log files and anything else you need _please_ ask as we really need to find a solution for this. We have a huge project and there may very well be some other factor causing this - but I have no idea where to start looking. So any help would be greatly appreciated.
Log files: