Share
Embed
Moments When Things Go Wrong
Talk by Aurimas Liutikas at KotlinConf 2026
Aurimas Liutikas
May 22, 2026
Transcript
139 slides
-
Why listen to me? 🤔 Hate broken things 14 years
@ Google working on OSS 10 years on AndroidX -
Why listen to me? 🤔 Hate broken things 14 years
@ Google working on OSS 10 years on AndroidX Regularly test pre-release Gradle and KGP catching issues before they ship to you -
Why listen to me? 🤔 Hate broken things 14 years
@ Google working on OSS 10 years on AndroidX Regularly test pre-release Gradle and KGP catching issues before they ship to you 130 issues reported on Gradle issue tracker 77 issues reported on YouTrack -
Why care about things going wrong? Blocker for progress 🛑
Distraction / wasted engineering time / LLM token cost 💰🔥 -
Why care about things going wrong? Blocker for progress 🛑
Distraction / wasted engineering time / LLM token cost 💰🔥 Training to ignore issues 🫣 -
Why care about things going wrong? Blocker for progress 🛑
Distraction / wasted engineering time / LLM token cost 💰🔥 Training to ignore issues 🫣 Corrupted product / false confidence in output quality 💔 -
How to know things went wrong? Unexpected logs Unexpected artifact
contents Unexpectedly slow -
How to know things went wrong? Unexpected logs Unexpected artifact
contents Unexpectedly slow Non-deterministic behavior -
Flaky build failure > Task :sqlite:sqlite-framework:commonizeCInterop Exception in thread "main"
java.lang.IllegalStateException: Unresolved classifier: platform/linux/va_list at org.jetbrains.kotlin.commonizer.metadata.CirTypeAliasExpansion$Companion.cre ate(CirTypeAliasExpander.kt:183) at org.jetbrains.kotlin.commonizer.metadata.CirDeserializers.type(CirDeserializ ers.kt:348) at org.jetbrains.kotlin.commonizer.metadata.CirDeserializers.valueParameter(Cir Deserializers.kt:180) ... -
Caused by: org.gradle.process.ProcessExecutionException: Process 'command '/mnt/disks/build-disk/src/android/androidx-main/prebuilts/jdk/jdk21/linux-x86/bin/java'' finished with non-zero exit
value 1 at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:450) at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:58) at org.gradle.process.internal.DefaultExecActionFactory.javaexec(DefaultExecActionFactory.java:209) at org.gradle.process.internal.DefaultExecOperations.javaexec(DefaultExecOperations.java:42) at org.jetbrains.kotlin.internal.compilerRunner.native.KotlinNativeToolRunner.runViaExec(KotlinNativeToolRunner.kt:117) at org.jetbrains.kotlin.internal.compilerRunner.native.KotlinNativeToolRunner.runTool(KotlinNativeToolRunner.kt:70) at org.jetbrains.kotlin.compilerRunner.GradleCliCommonizerKt$GradleCliCommonizer$1.invoke(GradleCliCommonizer.kt:39) at org.jetbrains.kotlin.commonizer.CliCommonizer.commonizeLibraries(CliCommonizer.kt:49) at org.jetbrains.kotlin.gradle.targets.native.internal.CInteropCommonizerTask.commonize(CInteropCommonizerTask.kt:244) at org.jetbrains.kotlin.gradle.targets.native.internal.CInteropCommonizerTask.access$commonize(CInteropCommonizerTask.kt:50) at org.jetbrains.kotlin.gradle.targets.native.internal.CInteropCommonizerTask$commonizeCInteropLibraries$1.invoke(CInteropCommonizerTask.kt:231) at org.jetbrains.kotlin.gradle.targets.native.internal.CInteropCommonizerTask$commonizeCInteropLibraries$1.invoke(CInteropCommonizerTask.kt:230) at org.jetbrains.kotlin.compilerRunner.ReportUtilsKt.addBuildMetricsForTaskAction(reportUtils.kt:283) at org.jetbrains.kotlin.gradle.targets.native.internal.CInteropCommonizerTask.commonizeCInteropLibraries(CInteropCommonizerTask.kt:230) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58) -
Caused by: org.gradle.process.ProcessExecutionException: Process 'command '/mnt/disks/build-disk/src/android/androidx-main/prebuilts/jdk/jdk21/linux-x86/bin/java'' finished with non-zero exit
value 1 at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:450) at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:58) at org.gradle.process.internal.DefaultExecActionFactory.javaexec(DefaultExecActionFactory.java:209) at org.gradle.process.internal.DefaultExecOperations.javaexec(DefaultExecOperations.java:42) at org.jetbrains.kotlin.internal.compilerRunner.native.KotlinNativeToolRunner.runViaExec(KotlinNativeToolRunner.kt:117) at org.jetbrains.kotlin.internal.compilerRunner.native.KotlinNativeToolRunner.runTool(KotlinNativeToolRunner.kt:70) at org.jetbrains.kotlin.compilerRunner.GradleCliCommonizerKt$GradleCliCommonizer$1.invoke(GradleCliCommonizer.kt:39) at org.jetbrains.kotlin.commonizer.CliCommonizer.commonizeLibraries(CliCommonizer.kt:49) at org.jetbrains.kotlin.gradle.targets.native.internal.CInteropCommonizerTask.commonize(CInteropCommonizerTask.kt:244) at org.jetbrains.kotlin.gradle.targets.native.internal.CInteropCommonizerTask.access$commonize(CInteropCommonizerTask.kt:50) at org.jetbrains.kotlin.gradle.targets.native.internal.CInteropCommonizerTask$commonizeCInteropLibraries$1.invoke(CInteropCommonizerTask.kt:231) at org.jetbrains.kotlin.gradle.targets.native.internal.CInteropCommonizerTask$commonizeCInteropLibraries$1.invoke(CInteropCommonizerTask.kt:230) at org.jetbrains.kotlin.compilerRunner.ReportUtilsKt.addBuildMetricsForTaskAction(reportUtils.kt:283) at org.jetbrains.kotlin.gradle.targets.native.internal.CInteropCommonizerTask.commonizeCInteropLibraries(CInteropCommonizerTask.kt:230) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58) CInteropCommonizerTask.commonize(CInteropCommonizerTask.kt:244) -
Tool to query failed builds Mock of an Internal Tool
Unresolved classifier: platform/ Search Last 365 days Time range aosp-androidx-main Branch * Target Count 2 4 6 8 Build type Branch Target Link Creation time Time Presubmit aosp-androidx-main androidx ab/1234 20251216 2229 Presubmit aosp-androidx-main androidx ab/1236 20251216 2223 -
Reminder on the exception Exception in thread "main" java.lang.IllegalStateException: Unresolved
classifier: platform/linux/va_list -
Running locally Looking at :sqlite:sqlite-framework:commonizeCInterop inputs we find commonizerDependenciesClasspath assume
that to get platform/linux/va_list we use ~/.konan/kotlin-native-prebuilt-linux-x86_64-2.3.0/klib/ platform/linux_x64/org.jetbrains.kotlin.native.platform.linux -
Develocity Build Scan https://androidx.develocity.cloud/s/itacb7e5lyabk Configuration cache bug? No, no CC
hit, not incremental target -
Develocity Build Scan https://androidx.develocity.cloud/s/itacb7e5lyabk Build cache? Maybe :sqlite:sqlite-framework:commonizeCInterop no build
cache hit. :sqlite:sqlite-framework:downloadKotlinNativeDistribution build cache hit. -
Forcing a failure? rm -fr out/.konan/kotlin-native-prebuilt-linux-x86_64-2.3.0/klib/pl atform/linux_arm64/org.jetbrains.kotlin.native.platform.linu x rm -fr
out/.konan/kotlin-native-prebuilt-linux-x86_64-2.3.0/klib/pl atform/linux_x64/org.jetbrains.kotlin.native.platform.linux ./gradlew :sqlite:sqlite-framework:commonizeCInterop -
Forcing a failure? rm -fr out/.konan/kotlin-native-prebuilt-linux-x86_64-2.3.0/klib/pl atform/linux_arm64/org.jetbrains.kotlin.native.platform.linu x rm -fr
out/.konan/kotlin-native-prebuilt-linux-x86_64-2.3.0/klib/pl atform/linux_x64/org.jetbrains.kotlin.native.platform.linux ./gradlew :sqlite:sqlite-framework:commonizeCInterop Bingo! The same failure stacktrace -
Forcing a failure? There are two problems here: Why does
KGP not put back this missing dependency? It looks like there is missing task output/input tracking -
Forcing a failure? There are two problems here: Why does
KGP not put back this missing dependency? It looks like there is missing task output/input tracking How do we end up in this situation where cinterop task runs but the dependencies are not yet prepared for us? -
KotlinNativeDownloadTask build caching is unsafe Workaround: tasks.named { it ==
"downloadKotlinNativeDistribution" } .configureEach { outputs.cacheIf { false } } -
Are we done? A real bug, but it does not
explain our failure. -
Missing task dependency Workaround: tasks.named { it == "commonizeNativeDistribution" }
.configureEach { dependsOn("downloadKotlinNativeDistribution") } -
2 workarounds allow us to upgrade back to KGP 2.3.0
Fixed properly in 2.3.20 -
Tool to query failed builds Estimate impact Finding failed build
examples Visualize occurrences by time Which build targets are affected -
Frequent tool updates Larger jumps result in more changes Recent
breakages get more attention -
Creating reproduction projects Start with empty project and add (preferred,
not always possible) -
Creating reproduction projects Start with empty project and add (preferred,
not always possible) vs Start with full project and reduce (only doable for open source projects) -
[KOTLIN] [IC] Incremental compilation was attempted but failed: Failed to
compute files to recompile: java.lang.IllegalStateException: The following FqNames can't be derived from DirtyData.dirtyLookupSymbols: androidx.compose.ui.text.style.TextDecoration. DirtyData = DirtyData(dirtyLookupSymbols=[LookupSymbol(name=hashCode, scope=kotlinx.coroutines.channels.ChannelResult), LookupSymbol(... at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.toProgramSymbols(ClasspathChangesComputer.kt:364) at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.computeFineGrainedKotlinClassChanges(ClasspathChangesComputer.kt:264) at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.computeKotlinClassChanges(ClasspathChangesComputer.kt:164) at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.computeClassChanges(ClasspathChangesComputer.kt:137) at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.computeChangedAndImpactedSet(ClasspathChangesComputer.kt:87) at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.computeClasspathChanges(ClasspathChangesComputer.kt:55) at org.jetbrains.kotlin.incremental.dirtyFiles.ClasspathSnapshotBasedImpactDeterminer.determineChangedAndImpactedSymbols(ClasspathSnapshotBasedImpact Determiner.kt:42) at org.jetbrains.kotlin.incremental.dirtyFiles.JvmSourcesToCompileCalculator.calculateSourcesToCompileImpl(JvmSourcesToCompileCalculator.kt:41) at org.jetbrains.kotlin.incremental.dirtyFiles.JvmSourcesToCompileCalculator.calculateWithClasspathSnapshot(JvmSourcesToCompileCalculator.kt:97) at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.calculateSourcesToCompile(IncrementalJvmCompilerRunner.kt:60) -
[KOTLIN] [IC] Incremental compilation was attempted but failed: Failed to
compute files to recompile: java.lang.IllegalStateException: The following FqNames can't be derived from DirtyData.dirtyLookupSymbols: androidx.compose.ui.text.style.TextDecoration. DirtyData = DirtyData(dirtyLookupSymbols=[LookupSymbol(name=hashCode, scope=kotlinx.coroutines.channels.ChannelResult), LookupSymbol(... at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.toProgramSymbols(ClasspathChangesComputer.kt:364) at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.computeFineGrainedKotlinClassChanges(ClasspathChangesComputer.kt:264) at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.computeKotlinClassChanges(ClasspathChangesComputer.kt:164) at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.computeClassChanges(ClasspathChangesComputer.kt:137) at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.computeChangedAndImpactedSet(ClasspathChangesComputer.kt:87) at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.computeClasspathChanges(ClasspathChangesComputer.kt:55) at org.jetbrains.kotlin.incremental.dirtyFiles.ClasspathSnapshotBasedImpactDeterminer.determineChangedAndImpactedSymbols(ClasspathSnapshotBasedImpact Determiner.kt:42) at org.jetbrains.kotlin.incremental.dirtyFiles.JvmSourcesToCompileCalculator.calculateSourcesToCompileImpl(JvmSourcesToCompileCalculator.kt:41) at org.jetbrains.kotlin.incremental.dirtyFiles.JvmSourcesToCompileCalculator.calculateWithClasspathSnapshot(JvmSourcesToCompileCalculator.kt:97) at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.calculateSourcesToCompile(IncrementalJvmCompilerRunner.kt:60) Failed to compute files to recompile: java.lang.IllegalStateException: The following FqNames can't be derived from DirtyData.dirtyLookupSymbols: androidx.compose.ui.text.style.TextDecoration. -
What do we know? Mock of an Internal Tool The
following fqNames canʼt be Search Last 720 days Time range aosp-androidx-main Branch * Target Count 2 4 6 8 July 2024 April 2026 -
What do we know? Relatively low frequency Only happens on
incremental builders Gradle exits with success, but the log is printed out -
Time cost dilemma Cost of investigating the issue vs Cost
of wasted time in retries, nuisance to developers -
Attempt to reproduce it rm -fr compose/material3/material3/material3-samples/build/ git co aosp/androidx-main
./gradlew :compose:material3:material3:material3-samples:compileReleaseKotlin --no-build-cache git co testincremental ./gradlew :compose:material3:material3:material3-samples:compileReleaseKotlin --no-build-cache -
Attempt to reproduce it rm -fr compose/material3/material3/material3-samples/build/ git co aosp/androidx-main
./gradlew :compose:material3:material3:material3-samples:compileReleaseKotlin --no-build-cache git co testincremental ./gradlew :compose:material3:material3:material3-samples:compileReleaseKotlin --no-build-cache BINGO! [KOTLIN] [IC] Incremental compilation was attempted but failed: Failed to compute files to recompile: java.lang.IllegalStateException: The following FqNames can't be derived from DirtyData.dirtyLookupSymbols: -
Kotlin Gradle Plugin Self-Recovery Falling back to non-incremental compilation (reason
= IC_FAILED_TO_COMPUTE_FILES_TO_RECOMPILE) To help us fix this issue, please file a bug at https://youtrack.jetbrains.com/issues/KT with the above stack trace. (Be sure to search for the above exception in existing issues first to avoid filing duplicated bugs.) -
Kotlin Gradle Plugin Self-Recovery Falling back to non-incremental compilation (reason
= IC_FAILED_TO_COMPUTE_FILES_TO_RECOMPILE) To help us fix this issue, please file a bug at https://youtrack.jetbrains.com/issues/KT with the above stack trace. (Be sure to search for the above exception in existing issues first to avoid filing duplicated bugs.) 🆕 youtrack.jetbrains.com/issue/KT84271 -
project vs maven coordinates Lowest version of a dependency that
has all required APIs Sometimes bleeding edge APIs are needed implementation("androidx.foo:foo:1.0.0") ↓ implementation(project(":foo:foo")) -
Gradle build logs are chatty Gradle output can be very
verbose (especially with --stacktrace) A needle in the haystack for the important messages -
build_log_simplifier Started as a tool to make PR failures more
obvious Huge help for humans and LLMs -
20260504 184436.212270 Task :wear:compose:compose-material3-macrobenchmark-target:checkReleaseAarMetadata UPTODATE 20260504 184436.212272 Task
:wear:compose:compose-foundation:compileReleaseLibraryResources UPTODATE 20260504 184436.212274 Task :wear:compose:compose-material3:extractDeepLinksRelease UPTODATE 20260504 184436.212276 Task :wear:compose:compose-material-core:extractDeepLinksRelease UPTODATE 20260504 184436.212278 Task :wear:compose:compose-material3-integration-tests:extractDeepLinksRelease UPTODATE 20260504 184436.212280 Task :wear:compose:compose-material:extractDeepLinksRelease UPTODATE 20260504 184436.212282 Task :wear:compose:compose-material3-macrobenchmark-target:extractDeepLinksRelease UPTODATE 20260504 184436.212284 Task :wear:compose:compose-material3-macrobenchmark-common:extractDeepLinksRelease UPTODATE 20260504 184436.212286 Task :viewpager2:integration-tests:testapp:generateDebugUnitTestLintModel UPTODATE 20260504 184436.212288 Task :wear:compose:compose-material3-macrobenchmark-common:compileReleaseLibraryResources UPTODATE 20260504 184436.212291 Task :tv:integration-tests:playground:generateDebugAndroidTestLintModel 20260504 184436.212293 Task :wear:compose:compose-material3:generateReleaseAndroidTestLintModel 20260504 184436.212295 Task :wear:compose:compose-material3:compileReleaseLibraryResources UPTODATE 20260504 184436.212297 Task :wear:compose:integration-tests:demos:common:packageReleaseResources UPTODATE 20260504 184436.212298 Task :wear:compose:compose-material3-macrobenchmark-target:mergeReleaseJniLibFolders UPTODATE 20260504 184436.212300 Task :wear:compose:compose-material3-integration-tests:compileReleaseLibraryResources UPTODATE 20260504 184436.212306 Task :wear:compose:compose-material3-macrobenchmark-target:generateReleaseAssets UPTODATE 20260504 184436.212309 Task :wear:compose:compose-material:compileReleaseLibraryResources UPTODATE 20260504 184436.212310 Task :wear:compose:compose-material-core:compileReleaseLibraryResources UPTODATE 20260504 184436.212312 Task :wear:compose:compose-foundation-benchmark:lintAnalyzeReleaseAndroidTest FROMCACHE 20260504 184436.212314 Task :viewpager2:integration-tests:testapp:lintAnalyzeDebugUnitTest UPTODATE 20260504 184436.212316 Task :wear:compose:compose-material3-samples:extractDeepLinksRelease UPTODATE 20260504 184436.212318 Task :tv:integration-tests:playground:generateDebugUnitTestLintModel 20260504 184436.212320 Task :wear:compose:integration-tests:demos:common:extractDeepLinksRelease UPTODATE 20260504 184436.212322 Task :tv:integration-tests:playground:generateDebugLintReportModel 20260504 184436.212324 Task :wear:compose:compose-ui-tooling:extractDeepLinksRelease UPTODATE 20260504 184436.212326 Task :wear:compose:compose-navigation:extractDeepLinksRelease UPTODATE 20260504 184436.212328 Task :wear:compose:compose-navigation:lintAnalyzeReleaseAndroidTest FROMCACHE 20260504 184436.212333 Task :tv:integration-tests:macrobenchmark-target:optimizeReleaseResources UPTODATE 20260504 184436.212335 Task :tv:integration-tests:macrobenchmark-target:compileReleaseArtProfile UPTODATE 20260504 184436.212339 Task :wear:compose:compose-material3-macrobenchmark-target:preDebugBuild UPTODATE 20260504 184436.212343 Task :wear:compose:compose-material3-macrobenchmark-target:extractProguardFiles UPTODATE 20260504 184436.212369 Task :wear:compose:compose-ui-tooling:mapReleaseSourceSetPaths UPTODATE 20260504 184436.212371 Task :wear:compose:integration-tests:demos:common:parseReleaseLocalResources UPTODATE 20260504 184436.212373 Task :wear:compose:compose-material-benchmark:generateReleaseAndroidTestLintModel 20260504 184436.212375 Task :wear:compose:integration-tests:demos:common:mapReleaseSourceSetPaths UPTODATE 20260504 184436.212379 Task :wear:compose:compose-material3-macrobenchmark-target:extractReleaseVersionControlInfo UPTODATE 20260504 184436.212405 Task :wear:compose:compose-navigation:mapReleaseSourceSetPaths UPTODATE 20260504 184436.212408 Task :wear:compose:compose-material3-benchmark:generateReleaseUnitTestLintModel UPTODATE -
20260504 184436.212410 Task :wear:compose:compose-material3-macrobenchmark-target:preDebugAndroidTestBuild SKIPPED 20260504 184436.212412 Task
:wear:compose:compose-material3-benchmark:lintAnalyzeReleaseUnitTest UPTODATE 20260504 184436.212446 Task :wear:compose:compose-material3-macrobenchmark-target:preDebugUnitTestBuild UPTODATE 20260504 184436.212448 Task :wear:compose:compose-material3-samples:assembleRelease UPTODATE 20260504 184436.212450 Task :wear:compose:compose-material3-macrobenchmark-target:validateSigningRelease UPTODATE 20260504 184436.212452 Task :wear:compose:compose-material3-samples:mapReleaseSourceSetPaths UPTODATE 20260504 184436.212810 20260504 184436.212824 Task :pdf:pdf-viewer:generateApi 20260504 184436.212828 src/main/kotlin/androidx/pdf/annotation/models/PdfAnnotation.kt:30: error: Parcelable requires a `CREATOR` field; missing in androidx.pdf.annotation.models.PdfAnnotation ParcelCreator] 20260504 184436.212831 src/main/kotlin/androidx/pdf/annotation/models/PdfAnnotation.kt:30: error: Parcelable classes must be final: androidx.pdf.annotation.models.PdfAnnotation is not final ParcelNotFinal] 20260504 184436.212834 20260504 184436.212836 Your change has API lint issues. Fix the code according to the messages above. 20260504 184436.212838 20260504 184436.212841 If a check is broken, suppress it in code in Kotlin with Suppress("id")/@get:Suppress("id") 20260504 184436.212843 and in Java with SuppressWarnings("id") and file bug to 20260504 184436.212846 https://issuetracker.google.com/issues/new?component=739152&template=1344623 20260504 184436.212848 20260504 184436.212850 If you are doing a refactoring or suppression above does not work, use ./gradlew updateApiLintBaseline 20260504 184436.212872 20260504 184436.311075 20260504 184436.311104 Task :pdf:pdf-viewer:generateApi FAILED 20260504 184436.311145 Task :wear:compose:compose-material3-samples:createLibraryBuildInfoFilesAnchor 20260504 184436.311149 Task :wear:compose:compose-material3-macrobenchmark:processReleaseNavigationResources UPTODATE 20260504 184436.311166 Task :wear:compose:compose-material3-macrobenchmark-target:processReleaseNavigationResources UPTODATE 20260504 184436.311179 Task :wear:compose:compose-material3-macrobenchmark-target:mergeReleaseStartupProfile UPTODATE 20260504 184436.311182 Task :wear:compose:compose-material3-macrobenchmark-target:writeReleaseSigningConfigVersions UPTODATE 20260504 184436.311224 Task :wear:compose:compose-material3-macrobenchmark-target:writeReleaseAppMetadata UPTODATE 20260504 184436.311228 Task :tv:integration-tests:playground:mergeReleaseJavaResource UPTODATE 20260504 184436.311230 Task :wear:compose:compose-material3-macrobenchmark-target:checkDocsTipOfTree UPTODATE 20260504 184436.311235 Task :wear:compose:compose-material3:lintAnalyzeReleaseAndroidTest FROMCACHE 20260504 184436.311252 Task :wear:compose:compose-material3-macrobenchmark-target:generateDebugResources UPTODATE -
20260504 184436.311255 Task :viewpager2:integration-tests:testapp:lintReportDebug UPTODATE 20260504 184436.311257 Task
:wear:compose:compose-material3-macrobenchmark-target:mergeReleaseArtProfile UPTODATE 20260504 184436.311272 Task :tv:integration-tests:playground:lintAnalyzeDebugUnitTest FROMCACHE 20260504 184436.311284 Task :wear:compose:compose-material3-benchmark:generateReleaseAndroidTestLintModel 20260504 184436.311287 Task :tv:integration-tests:playground:lintAnalyzeDebugAndroidTest FROMCACHE 20260504 184436.311298 Task :wear:compose:compose-material3-macrobenchmark-target:javaPreCompileDebug UPTODATE 20260504 184436.311300 Task :wear:compose:compose-material3-macrobenchmark-target:mapDebugSourceSetPaths UPTODATE 20260504 184436.311309 Task :wear:compose:compose-material3-macrobenchmark-target:processDebugNavigationResources UPTODATE 20260504 184436.311312 Task :wear:compose:compose-material3-macrobenchmark-target:checkDebugAarMetadata UPTODATE 20260504 184436.311328 Task :wear:compose:compose-ui-tooling:compileReleaseLibraryResources UPTODATE 20260504 184436.311330 Task :wear:compose:compose-material3-macrobenchmark-target:extractDeepLinksDebug UPTODATE 20260504 184436.311371 Task :wear:compose:compose-material3-macrobenchmark-target:createDebugCompatibleScreenManifests UPTODATE 20260504 184436.311374 Task :wear:compose:compose-material3-macrobenchmark-target:ktCheck UPTODATE 20260504 184436.311380 Task :wear:compose:compose-material3-samples:checkKotlinApiTarget UPTODATE 20260504 184436.311382 Task :wear:compose:compose-material-benchmark:lintAnalyzeReleaseAndroidTest FROMCACHE 20260504 184436.311385 Task :wear:compose:compose-material3-samples:checkDocsTipOfTree UPTODATE 20260504 184436.311387 Task :wear:compose:compose-navigation:compileReleaseLibraryResources UPTODATE 20260504 184436.311391 Task :wear:compose:compose-material3-samples:compileReleaseLibraryResources UPTODATE 20260504 184436.311394 Task :wear:compose:compose-material3-samples:ktCheck UPTODATE 20260504 184436.311401 Task :tv:integration-tests:macrobenchmark-target:packageRelease UPTODATE 20260504 184436.311406 Task :wear:compose:integration-tests:demos:common:compileReleaseLibraryResources UPTODATE 20260504 184436.311419 Task :wear:compose:integration-tests:demos:common:generateReleaseRFile UPTODATE 20260504 184436.311421 Task :wear:compose:compose-material3-samples:releaseVerifyELFRegionAlignment NOSOURCE 20260504 184436.311425 Task :wear:compose:compose-material3-samples:runErrorProneRelease NOSOURCE 20260504 184436.311428 Task :wear:compose:compose-material3-macrobenchmark:parseReleaseLocalResources UPTODATE 20260504 184436.311433 Task :wear:compose:compose-material3-macrobenchmark-target:compileReleaseNavigationResources UPTODATE 20260504 184436.311436 Task :wear:compose:compose-material3-macrobenchmark-target:parseReleaseLocalResources UPTODATE 20260504 184436.311447 Task :wear:compose:compose-material3-macrobenchmark-target:mergeReleaseAssets UPTODATE 20260504 184436.311449 Task :wear:compose:compose-material3-samples:generateReleaseLintReportModel UPTODATE 20260504 184436.311453 Task :wear:compose:compose-material3-macrobenchmark-target:mergeReleaseNativeLibs UPTODATE 20260504 184436.311499 Task :wear:compose:compose-material3-benchmark:lintAnalyzeReleaseAndroidTest FROMCACHE 20260504 184436.311510 Task :tv:integration-tests:playground:lintAnalyzeDebug FROMCACHE 20260504 184436.311513 Task :wear:compose:compose-material3-macrobenchmark-target:processReleaseMainManifest UPTODATE -
20260504 184436.511026 Task :wear:compose:compose-material3-macrobenchmark-target:mergeReleaseResources UPTODATE 20260504 184436.611038 Task
:compose:ui:ui:compileAndroidDeviceTest FROMCACHE 20260504 184436.611064 Task :wear:compose:compose-material-samples:lintReportRelease 20260504 184436.611068 Task :tv:integration-tests:macrobenchmark-target:createReleaseApkListingFileRedirect UPTODATE 20260504 184436.611070 Task :wear:compose:compose-material3-macrobenchmark-target:checkReleaseDuplicateClasses UPTODATE 20260504 184436.611073 Task :graphics:integration-tests:testapp-compose:packageRelease 20260504 184436.611075 Task :graphics:integration-tests:testapp-compose:createReleaseApkListingFileRedirect UPTODATE 20260504 184436.611077 Task :wear:compose:compose-foundation-benchmark:lintReportRelease 20260504 184436.611080 Task :wear:compose:compose-foundation:lintReportRelease 20260504 184436.711036 Task :wear:compose:compose-material:lintReportRelease 20260504 184436.711063 Task :tv:integration-tests:macrobenchmark-target:lintReportDebug 20260504 184437.410979 Task :pdf:integration-tests:testapp:compileDebugKotlin 20260504 184437.411003 Task :pdf:integration-tests:testapp:compileReleaseKotlin 20260504 184437.811032 Task :pdf:pdf-viewer:lintAnalyzeReleaseAndroidTest 20260504 184438.711030 Task :pdf:pdf-viewer:lintAnalyzeReleaseUnitTest 20260504 184438.911056 Task :pdf:pdf-ink:generateApi 20260504 184439.311011 Task :docs-public:zipDocs 20260504 184446.010981 Task :pdf:pdf-viewer:lintAnalyzeRelease 20260504 184446.111027 20260504 184446.111052 FAILURE Build failed with an exception. 20260504 184446.111055 20260504 184446.111058 What went wrong: 20260504 184446.111061 Execution failed for task ':pdf:pdf-viewer:generateApi' (registered by plugin 'com.android.internal.library'). 20260504 184446.111063 A failure occurred while executing androidx.build.metalava.MetalavaWorkAction 20260504 184446.111066 > Process 'command '/mnt/disks/build-disk/src/android/androidx-main/prebuilts/jdk/jdk21/linux-x86/bin/java'' finished with non-zero exit value 255 20260504 184446.111069 20260504 184446.111071 Try: 20260504 184446.111074 Run with --info or --debug option to get more log output. 20260504 184446.111077 Get more help at https://help.gradle.org. -
20260504 184446.111082 Exception is: 20260504 184446.111085 org.gradle.api.tasks.TaskExecutionException: Execution failed
for task ':pdf:pdf-viewer:generateApi' (registered by plugin 'com.android.internal.library'). 20260504 184446.111088 at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1ExecuteActionsTaskExecuter.java:135 20260504 184446.111098 at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:288 20260504 184446.111126 at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:133 20260504 184446.111129 at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:121 20260504 184446.111131 at org.gradle.api.internal.tasks.execution.ProblemsTaskPathTrackingTaskExecuter.execute(ProblemsTaskPathTrackingTaskExecuter.java:41 20260504 184446.111134 at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51 20260504 184446.111136 at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46 20260504 184446.111139 at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57 20260504 184446.111141 at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74 20260504 184446.111144 at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36 20260504 184446.111146 at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77 20260504 184446.111149 at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55 20260504 184446.111151 at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52 20260504 184446.111153 at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:210 20260504 184446.111156 at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:205 20260504 184446.111158 at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:67 20260504 184446.111161 at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:60 20260504 184446.111163 at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:167 20260504 184446.111165 at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:60 20260504 184446.111168 at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:54 20260504 184446.111170 at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52 20260504 184446.111172 at org.gradle.execution.plan.DefaultNodeExecutor.executeLocalTaskNode(DefaultNodeExecutor.java:55 20260504 184446.111175 at org.gradle.execution.plan.DefaultNodeExecutor.execute(DefaultNodeExecutor.java:34 20260504 184446.111177 at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355 20260504 184446.111180 at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343 -
20260504 184446.111183 at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.lambda$execute$0DefaultTaskExecutionGraph.java:339 20260504 184446.111189 at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:84 20260504 184446.111191
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:339 20260504 184446.111194 at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:328 20260504 184446.111197 at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:459 20260504 184446.111199 at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:376 20260504 184446.111202 at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64 20260504 184446.111204 at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47 20260504 184446.111207 Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing androidx.build.metalava.MetalavaWorkAction 20260504 184446.111210 at org.gradle.workers.internal.DefaultWorkerExecutor$WorkItemExecution.waitForCompletion(DefaultWorkerExecutor.java:278 20260504 184446.111212 at org.gradle.internal.work.DefaultAsyncWorkTracker.lambda$waitForItemsAndGatherFailures$2DefaultAsyncWorkTracker.java:132 20260504 184446.111215 at org.gradle.internal.Factories$1.create(Factories.java:30 20260504 184446.111217 at org.gradle.internal.work.DefaultWorkerLeaseService.lambda$withoutLocksBlocking$3DefaultWorkerLeaseService.java:390 20260504 184446.111220 at org.gradle.internal.work.ResourceLockStatistics$1.measure(ResourceLockStatistics.java:43 20260504 184446.111222 at org.gradle.internal.work.DefaultWorkerLeaseService.withoutLocksBlocking(DefaultWorkerLeaseService.java:385 20260504 184446.111225 at org.gradle.internal.work.DefaultWorkerLeaseService.blocking(DefaultWorkerLeaseService.java:239 20260504 184446.111228 at org.gradle.internal.work.DefaultWorkerLeaseService.blocking(DefaultWorkerLeaseService.java:221 20260504 184446.111230 at org.gradle.internal.work.DefaultAsyncWorkTracker.lambda$waitForItemsAndGatherFailures$3DefaultAsyncWorkTracker.java:128 20260504 184446.111232 at org.gradle.internal.Factories$1.create(Factories.java:30 20260504 184446.111235 at org.gradle.internal.resources.AbstractResourceLockRegistry.whileDisallowingLockChanges(AbstractResourceLockRegistry.java:50 20260504 184446.111240 at org.gradle.internal.work.DefaultWorkerLeaseService.whileDisallowingProjectLockChanges(DefaultWorkerLeaseService.java:244 20260504 184446.111243 at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForItemsAndGatherFailures(DefaultAsyncWorkTracker.java:127 20260504 184446.111245 at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForItemsAndGatherFailures(DefaultAsyncWorkTracker.java:93 20260504 184446.111247 at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForAll(DefaultAsyncWorkTracker.java:79 20260504 184446.111250 at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForCompletion(DefaultAsyncWorkTracker.java:67 20260504 184446.111252 at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:267 20260504 184446.111254 at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:30 20260504 184446.111257 at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:27 20260504 184446.111259 at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:67 -
Interesting log pattern Thousands of lines of logs> Failed task
logs Hundreds of lines of logs> FAILURE Build failed with an exception. 180+ lines of exception stacktrace> BUILD FAILED in 1m 13s 47292 actionable tasks: 7630 executed, 912 from cache, 38750 up-to-date -
> Task :pdf:pdf-viewer:generateApi src/main/kotlin/androidx/pdf/annotation/models/PdfAnnotation.kt:30: error: Parcelable requires a `CREATOR` field;
missing in androidx.pdf.annotation.models.PdfAnnotation [ParcelCreator] src/main/kotlin/androidx/pdf/annotation/models/PdfAnnotation.kt:30: error: Parcelable classes must be final: androidx.pdf.annotation.models.PdfAnnotation is not final [ParcelNotFinal] Your change has API lint issues. Fix the code according to the messages above. If you are doing a refactoring, use ./gradlew updateApiLintBaseline -
Execution failed for task ':pdf:pdf-viewer:generateApi'. > A failure occurred while
executing androidx.build.metalava.MetalavaWorkAction > Process 'command '$CHECKOUT/prebuilts/jdk/jdk21/linux-x86/bin/java'' finished with non-zero exit value 255 * Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':pdf:pdf-viewer:generateApi). Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing androidx.build.metalava.MetalavaWorkAction Caused by: org.gradle.process.ProcessExecutionException: Process 'command '$CHECKOUT/prebuilts/jdk/jdk21/linux-x86/bin/java'' finished with non-zero exit value 255 at androidx.build.metalava.MetalavaWorkAction.execute(MetalavaRunner.kt:106) BUILD FAILED in 1m 13s -
Gradle command failed: ./gradlew --ci -Pandroidx.allowLockfileMismatch=false buildOnServer createAllArchives checkExternalLicenses listTaskOutputs
exportSboms generateJavaKzip generateKotlinKzip -
Expecting the unexpected Creating a list of known log messages
to find the expected messages -
Expecting the unexpected For example: Daemon will be stopped at
the end of the build \[Incubating\] Problems report is available at\:.* [0-9]+ actionable tasks: [0-9]+ executed, [0-9]+ up\-to\-date Configuration cache entry reused\. Configuration cache entry stored\. Configuration on demand is an incubating feature\. Parallel Configuration Cache is an incubating feature\. -
[KOTLIN] [IC] Incremental compilation was attempted but failed: Failed to
compute files to recompile: java.lang.IllegalStateException: The following FqNames can't be derived from DirtyData.dirtyLookupSymbols: androidx.compose.ui.text.style.TextDecoration. DirtyData = DirtyData(dirtyLookupSymbols=[LookupSymbol(name=hashCode, scope=kotlinx.coroutines.channels.ChannelResult), LookupSymbol(... at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.toProgramSymbols(ClasspathChangesComputer.kt:364) at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.computeFineGrainedKotlinClassChanges(ClasspathChangesComputer.kt:264) at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.computeKotlinClassChanges(ClasspathChangesComputer.kt:164) at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.computeClassChanges(ClasspathChangesComputer.kt:137) at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.computeChangedAndImpactedSet(ClasspathChangesComputer.kt:87) at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathChangesComputer.computeClasspathChanges(ClasspathChangesComputer.kt:55) at org.jetbrains.kotlin.incremental.dirtyFiles.ClasspathSnapshotBasedImpactDeterminer.determineChangedAndImpactedSymbols(ClasspathSnapshotBasedImpact Determiner.kt:42) at org.jetbrains.kotlin.incremental.dirtyFiles.JvmSourcesToCompileCalculator.calculateSourcesToCompileImpl(JvmSourcesToCompileCalculator.kt:41) at org.jetbrains.kotlin.incremental.dirtyFiles.JvmSourcesToCompileCalculator.calculateWithClasspathSnapshot(JvmSourcesToCompileCalculator.kt:97) at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.calculateSourcesToCompile(IncrementalJvmCompilerRunner.kt:60) Failed to compute files to recompile: java.lang.IllegalStateException: The following FqNames can't be derived from DirtyData.dirtyLookupSymbols: androidx.compose.ui.text.style.TextDecoration. -
An AndroidX Library Developer Report XXX, YYY, ZZZ started failing
after the two changes back to back landed at r.android.com/3818967 and r.android.com/3818966. Temporarily disabled a few but surprised they passed presubmit. They all fail locally as reported in fully synced repo. -
Figure out the scope Passing locally Reporting in CI Device
tests ✅ ✅ Host tests on Linux ❌ ❌ Host tests on Mac ✅ ✅ -
Figure out the timeline Find when test reports stopped, down
to two changes: - r.android.com/3916953 - r.android.com/3923957 -
Figure out the timeline Find when test reports stopped, down
to two changes: - r.android.com/3916953 - r.android.com/3923957 -
Rule out potential causes No docker image changes No CI
infrastructure changes -
Digging into the build log Unexpectedly found these files generated
or modified by the build: ./compose/runtime/runtime/core Generated files should go in OUT_DIR instead because that is where developers expect to find them (to make it easier to diagnose build problems: inspect or delete these files) Copied these generated files into /mnt/disks/build-disk/src/android/androidx-main/out/dist/new_files -
Unexpected files Build have predictable outputs Regular build should write
only to build/ directories There should be no modifications of sources or build.gradle.kts There should be no new files -
Unexpected files Unexpected files mean something went wrong We wrote
verify_no_caches_in_source_repo.sh to ensure there are no unexpected new files or modifications to existing ones -
Unexpected files Unexpected files mean something went wrong We wrote
verify_no_caches_in_source_repo.sh to ensure there are no unexpected new files or modifications to existing ones Unexpectedly found these files generated or modified by the build: ./compose/runtime/runtime/core -
Unexpectedly found these files In our case, compose/runtime/runtime/core showed that
Kotlin native tests were crashing the test process org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compose:runtime:runtime:linuxX64Test'. Caused by: java.lang.Error: Test running process exited unexpectedly. Current test: hostDefault_throwsForMissingNonNullableKey -
Why does this break test reporting? busytown/impl/build.sh calls busytown/impl/verify_no_caches_in_source_repo.sh that
has set -e and exists when files are found with exit 1 This skips our test report processing. -
Presubmit failure for PR upgrading to KGP 2.0.0 Ran two
consecutive builds of the same tasks, and in the second build, observed: task :compose:material:material:compileTestKotlinDesktop not UP-TO-DATE. It was out-of-date because: Value of input property 'friendPathsSet$kotlin_gradle_plugin_common' has changed for task ':compose:material:material:compileTestKotlinDesktop'. * Exception is: org.gradle.api.GradleException: Ran two consecutive builds of the same tasks, and in the second build, observed: task :compose:material:material:compileTestKotlinDesktop not UP-TO-DATE. It was out-of-date because: Value of input property 'friendPathsSet$kotlin_gradle_plugin_common' has changed for task ':compose:material:material:compileTestKotlinDesktop'. at androidx.build.uptodatedness.TaskUpToDateValidator.onFinish(TaskUpToDateValidator.kt:192) -
Task up-to-date validation Running build 2x should result in second
build being no-op 100 actionable tasks: 100 executed 100 actionable tasks: 100 up-to-date -
Task up-to-date validation Automated CI workflow to prevent regressions Start
with an allowlist for tasks that are allowed to rerun -
Figure out timeline Never seen before based on our failed
build log search Must be new in KGP 2.0.0, as 1.9.21 passes. -
Reason for the task rerun Value of input property 'friendPathsSet$kotlin_gradle_plugin_common'
has changed for task ':compose:material:material:compileTestKotlinDesktop'. -
Creating a repro Started from an empty project and built
up until it failed -
A good repro is worth a thousand words 5 days
from sharing a repro to a fix -
Use debugger on Gradle code println debugging works, but it
is 100x slower than local debugger -
Default task timeout fun Project.configureTaskTimeouts() { tasks.configureEach { task ->
task.timeout.set( Duration.ofMinutes(30) ) } } -
Validating the contents of artifacts Write validation tasks that check
your AAR/JAR/APK Make sure that your vital configuration files, API keys, string translations are present -
Validating the contents of artifacts AndroidX has a check to
validate META-INF/androidx.foo_foo.version is included in the JARs. -
Takeaways Invest in your tools to detect and investigate -
Log grep and occurrence graphing - Develocity - Unexpected logs - Unexpected files - Unexpected runtime length - Unexpected reruns