Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle Dokka build intermittently hangs #3606

Open
ianbrandt opened this issue May 13, 2024 · 1 comment
Open

Gradle Dokka build intermittently hangs #3606

ianbrandt opened this issue May 13, 2024 · 1 comment
Labels

Comments

@ianbrandt
Copy link

ianbrandt commented May 13, 2024

Describe the bug
Occasionally my gradlew dokkaHtmlMultiModule CI job hangs indefinitely.

Usually the task completes in just over two hours. When it hangs, I've let it run for 12+ hours before finally killing it.

Expected behaviour
The task always completes.

Screenshots
I'll attach consecutive thread dumps of the hung Gradle Daemon process.

To Reproduce
The issue is intermittent, and I have not been able to reproduce it locally. It would seem the thread dumps will need to be the starting point for troubleshooting.

Dokka configuration

 withType<DokkaMultiModuleTask>().configureEach {
     notCompatibleWithConfigurationCache(
         "Inputs not currently configuration cache compatible."
     )

     moduleName.set("My Project")
 }

 dokkaHtmlMultiModule.configure {
     pluginConfiguration<DokkaBase, DokkaBaseConfiguration> {
         customAssets = listOf(
             // Override the logo image by providing a custom version with
             // the same name as the default.
             rootProject.layout.projectDirectory.file(
                 "shared/dokka/logo-icon.svg"
             ).asFile,
         )

         footerMessage = COPYRIGHT_AS_HTML_DIV
     }
 }

My 'gradle.properties':

org.gradle.caching=true
org.gradle.configuration-cache=true
org.gradle.configureondemand=true
# 6 hours instead of the default 3 (10800000ms)
org.gradle.daemon.idletimeout=21600000
org.gradle.java.compile-classpath-packaging=true
# 10g+ heap size is needed to prevent OutOfMemoryError during Dokka generation
org.gradle.jvmargs=-Xmx11g -Dfile.encoding=UTF-8
org.gradle.parallel=true
kotlin.daemon.jvmargs=-Xmx4g

Installation

  • Operating system: Windows 10
  • Build JVM: OpenJDK 11.0.22
  • Build tool: Gradle v8.7
  • Dokka version: 1.9.20

Additional context
My project has just over 400 Java/Kotlin modules that apply the org.jetbrains.dokka plugin via my project convention precompiled script plugin.
My build agents have 24 available cores each, so this may be a different issue than #2926.

@ianbrandt ianbrandt added the bug label May 13, 2024
@ianbrandt
Copy link
Author

Thread dumps:

  1. thread_dump.zip
  2. thread_redump.zip (~16 min. later)

I diffed the two, and they're nearly identical with the exception of the elapsed times.

Analysis of the first thread dump: https://fastthread.io/my-thread-report.jsp?p=c2hhcmVkLzIwMjQvMDUvOS9lNDc1NjY3MC1hM2E4LTQ4MzktOTRjMi00NzU0NmNiMDJlZjAudHh0LS0xNi0xMC00MQ==&.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant