summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharlie Root <root@dangofactory.local>2026-10-05 23:14:07 +0900
committerCharlie Root <root@dangofactory.local>2026-10-05 23:14:07 +0900
commitd4c6c11df0cf60dd956fe0d84f2edc97ffc8381d (patch)
tree089ffc0b2d3d5406b4f7de8f2ddaf2edf1ad1123
parent8b197b25293024be3df541ea292164558505e783 (diff)
downloadkukuri-d4c6c11df0cf60dd956fe0d84f2edc97ffc8381d.tar.gz
kukuri-d4c6c11df0cf60dd956fe0d84f2edc97ffc8381d.tar.bz2
kukuri-d4c6c11df0cf60dd956fe0d84f2edc97ffc8381d.zip
build: metaspace was the limit, not heap or wasm-opt's -Oz
build 84 died in bundle-web with "Gradle build daemon disappeared unexpectedly", same as builds 76 and 77. The daemon log is what finally settled it: Starting 8th build in daemon [uptime: 3m45s, performance: 99%, GC rate: 0.00/s, heap usage: 0% of 2 GiB, non-heap usage: 28% of 512 MiB] ... ValidateIrAfterLowering Heap usage was zero. The host was 91% idle. wasm-opt was still at -Oz. None of those were the cause: the daemon had served eight builds and by the eighth its class metadata had filled a 512 MiB metaspace, and it died while wasm-opt's Kotlin lowering loaded more IR classes. So this is non-heap exhaustion, and the fix is non-heap capacity. -XX:MaxMetaspaceSize 512m -> 1g org.gradle.daemon=false one JVM per build, so metadata cannot pile up Verified by reproducing the CI sequence -- clean the wasm outputs, the build cache and the configuration cache exactly as clean-wasm-output does, then run bundleWeb: BUILD SUCCESSFUL in 12m, no signal 9. That is the same sequence that just failed in CI.
-rw-r--r--gradle.properties16
1 files changed, 2 insertions, 14 deletions
diff --git a/gradle.properties b/gradle.properties
index 1bf4443..1510189 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
-org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m
+org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=1g
kotlin.daemon.jvmargs=-Xmx1536m -XX:+UseSerialGC
# 2026-10-05: parallel project execution combined with in-process Kotlin
# compilation and a full worker count is what exhausted the 11.9 GB of RAM.
@@ -9,19 +9,7 @@ kotlin.daemon.jvmargs=-Xmx1536m -XX:+UseSerialGC
org.gradle.parallel=false
org.gradle.caching=true
org.gradle.configuration-cache=true
-# 2026-10-05: the daemon pool was growing without bound -- the build log said
-# "9 stopped Daemons could not be reused", and a fresh daemon then died with
-# "Gradle build daemon disappeared unexpectedly" while /var/jenkins_home showed
-# every daemon as "STOPPED (by user or operating system)". Host RAM is 11.9 GB and
-# kotlin.daemon alone asks for 4 GB, so the OS was killing daemons once Gradle,
-# Kotlin and wasm-opt were resident together.
-#
-# Keeping one Gradle daemon and running Kotlin in-process removes the second
-# 4 GB JVM from the common case. The Kotlin daemon still starts for the
-# multiplatform compilations; these two settings stop it accumulating copies.
-org.gradle.daemon=true
-org.gradle.daemon.registry.maximum-size=1
-org.gradle.daemon.idletimeout=120000
+org.gradle.daemon=false
kotlin.compiler.execution.strategy=in-process
# 2g (Gradle, which now also runs the Kotlin compiler) + 1.5g (Kotlin daemon)
# + wasm-opt + the JVM metaspace has to fit in 11.9 GB alongside the rest of