From c5e2cae6943f6b8fc6bfe3a766f853d91c8e46b3 Mon Sep 17 00:00:00 2001 From: agent Date: Fri, 18 Sep 2026 18:15:52 -0400 Subject: [PATCH] android-ci: 2 GB of Gradle heap for the cuprated release packaging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Run 414 (PR #114) died in `:app:packageRelease` after a clean build: Execution failed for task ':app:packageRelease'. > A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable with no `Caused by` line and nothing else in the log — and it is not reproducible on the same content: runs 412 and 413 (this tree, 1 GB heap) packaged fine. The one budget in this build that got tight when cuprate came in is the single-use Gradle daemon's heap, which now compresses a 55 MB SDK lib (plus RandomX's 1.1 MB) in-process; the runner has 15 GB and the job's peak RSS is ~3 GB, so 2 GB of heap costs nothing and removes the most likely mechanism. android-release.yml gets the same number: it packages the same APK. --- .forgejo/workflows/android-ci.yml | 9 ++++++++- .forgejo/workflows/android-release.yml | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/android-ci.yml b/.forgejo/workflows/android-ci.yml index 58df49d..1262a87 100644 --- a/.forgejo/workflows/android-ci.yml +++ b/.forgejo/workflows/android-ci.yml @@ -230,6 +230,13 @@ jobs: docker volume create "$GRADLE_VOLUME" >/dev/null docker rm -f "$BUILD_CONTAINER" >/dev/null 2>&1 || true docker pull "$ANDROID_IMAGE" + # 2 GB of Gradle heap, not 1: the only budget in this build that is close + # is the single-use daemon's heap, which now has to package a 55 MB SDK + # lib (plus RandomX's 1.1 MB) through AGP's in-daemon packaging. Run 414 + # died in `:app:packageRelease` with the cause hidden inside + # `PackageAndroidArtifact$IncrementalSplitterRunnable` — no "Caused by" + # line, nothing in the log — so give it room instead of guessing again. + # The runner has 15 GB and the job's peak RSS is ~3 GB. docker create --name "$BUILD_CONTAINER" -i \ -e CARGO_TERM_COLOR=never \ -e CARGO_BUILD_JOBS="$CARGO_BUILD_JOBS" \ @@ -243,7 +250,7 @@ jobs: -e ONIONWIRE_REQUIRE_RELEASE_KEY=false \ -e RUST_TOOLCHAIN="$RUST_TOOLCHAIN" \ -e ANDROID_CMDLINE_TOOLS_URL="$ANDROID_CMDLINE_TOOLS_URL" \ - -e GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs=-Xmx1024m -XX:MaxMetaspaceSize=384m -Dfile.encoding=UTF-8" \ + -e GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8" \ -v "$SDK_VOLUME":/opt/android-sdk \ -v "$CARGO_VOLUME":/cargo \ -v "$TARGET_VOLUME":/cargo-target \ diff --git a/.forgejo/workflows/android-release.yml b/.forgejo/workflows/android-release.yml index a1d2874..f725ddd 100644 --- a/.forgejo/workflows/android-release.yml +++ b/.forgejo/workflows/android-release.yml @@ -299,6 +299,13 @@ jobs: docker volume create "$GRADLE_VOLUME" >/dev/null docker rm -f "$BUILD_CONTAINER" >/dev/null 2>&1 || true docker pull "$ANDROID_IMAGE" + # 2 GB of Gradle heap, not 1: the only budget in this build that is close + # is the single-use daemon's heap, which now has to package a 55 MB SDK + # lib (plus RandomX's 1.1 MB) through AGP's in-daemon packaging. Run 414 + # died in `:app:packageRelease` with the cause hidden inside + # `PackageAndroidArtifact$IncrementalSplitterRunnable` — no "Caused by" + # line, nothing in the log — so give it room instead of guessing again. + # The runner has 15 GB and the job's peak RSS is ~3 GB. docker create --name "$BUILD_CONTAINER" -i \ -e CARGO_TERM_COLOR=never \ -e CARGO_BUILD_JOBS="$CARGO_BUILD_JOBS" \ @@ -314,7 +321,7 @@ jobs: -e ONIONWIRE_VERSION="$VERSION" \ -e RUST_TOOLCHAIN="$RUST_TOOLCHAIN" \ -e ANDROID_CMDLINE_TOOLS_URL="$ANDROID_CMDLINE_TOOLS_URL" \ - -e GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs=-Xmx1024m -XX:MaxMetaspaceSize=384m -Dfile.encoding=UTF-8" \ + -e GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8" \ -v "$SDK_VOLUME":/opt/android-sdk \ -v "$CARGO_VOLUME":/cargo \ -v "$TARGET_VOLUME":/cargo-target \