Hello. The build gets stuck on one of the tasks ex...
# community-support
s
Hello. The build gets stuck on one of the tasks executions (perhaps test execution) and eventually the build process is killed by the CI/CD by timeout. And the build scan is also lost for this reason. Unfortunately there is no easy way to understand which exact task it was as tasks are executed in parallel and last log lines are about last started tasks which do not show actually hanging one. Question: what's the recommended approach to investigate which task is hanging? Is there a way to do something like
jstack
but showing which gradle process/thread is executing which exact task right now and how long? Thanks in advance
a
What about adding a timeout for test tasks? Then Gradle will kill the tasks, and upload the build scan (fingers crossed!)
Copy code
tasks.withType<Test>().configureEach { 
    timeout = Duration.ofMinutes(60)
}
s
as a desperate effort - yes, this can be used. But I was looking for more informative approach with a better diagnostics