Skip to content

Serialize webpack and karma tasks on CI to stop runner OOM kills - #38

Merged
solcott merged 2 commits into
mainfrom
fix/ci-runner-oom
Sep 28, 2026
Merged

solcott merged 2 commits into
mainfrom
fix/ci-runner-oom

Conversation

@solcott

@solcott solcott commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Problem

Recent PR and main builds end with The operation was canceled (and in one case The runner has received a shutdown signal), with no Gradle error. Examples: runs 36441940916, 36441963416, 36441623654, 36303975869.

In every one of them the Build step dies during the web bundling phase. In the failing main run, jsBrowserProductionWebpack/wasmJsBrowserProductionWebpack for ui, shared-compose and web overlapped with shared-compose's browser tests. Each webpack task starts a Node process sized for a full Compose bundle, and karma adds a Chrome. Together with the 4 GB Gradle daemon and the Kotlin daemon, that exhausts the 16 GB runner and it gets killed. The one recent green run happened to schedule those tasks one after another.

Fix

A shared build service with maxParallelUsages = 1, used by every KotlinWebpack and KotlinJsTest task. The limit only applies when CI is set, so local builds stay parallel.

Checked locally with CI=true ./gradlew build --dry-run. This PR's own CI run is the real test.

Follow-up if this isn't enough

presenter, ui and shared-compose each build a production webpack bundle during build only because binaries.executable() was added for their browser tests.

🤖 Generated with Claude Code

solcott and others added 2 commits September 28, 2026 09:54
Under org.gradle.parallel, the production webpack and browser-test tasks of
several modules overlap alongside the Gradle and Kotlin daemons and exhaust
ubuntu-latest's 16 GB. The runner is then killed mid-build, and the job ends
as "The operation was canceled" or "The runner has received a shutdown
signal" with no Gradle error.

A shared build service with maxParallelUsages = 1 runs those tasks one at a
time when CI is set; local builds stay parallel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Serializing webpack and karma was not enough: run 36447154005 was still
killed, this time just after :web's production and test Kotlin/JS and Wasm
compiles, which run in the Kotlin daemon rather than webpack. Give the
runner a 12 GB swapfile so the peak pages out, and sample memory, disk and
the largest processes into the Build step's own log so the next failure,
if any, shows what was resident.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@solcott
solcott merged commit fa4ad62 into main Sep 28, 2026
1 check passed
@solcott
solcott deleted the fix/ci-runner-oom branch September 28, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant