ci: bound the iOS leg's heaps (link out of process, 4 GB; Gradle 2 GB) and fix the watchdog's CPU arithmetic - #136
Merged
Merged
Conversation
… integer The v0.5.225 ios-xcframework leg died in linkReleaseFrameworkIosArm64 with `GC overhead limit exceeded` after 37 min on macos-14 (3-core M1, 7 GB). client/gradle.properties gives Gradle -Xmx8g, and KGP 2.0.21 runs the Kotlin/Native release link INSIDE that JVM by default (KotlinNativeToolRunner.runInProcess; kotlin.native.disableCompilerDaemon flips it to javaexec). 0.5.224 had already taken 3h11m against ~161 min measured, which is what paging looks like; two review batches later it stopped fitting at all. The bound lives on the leg's matrix entry, not in gradle.properties, which is every desktop's setting and an input to the XCFramework cache key: --max-workers=1 one link at a time -Dorg.gradle.jvmargs=-Xmx2g Gradle only configures and waits -Pkotlin.native.disableCompilerDaemon=true the link gets its own JVM per task -Pkotlin.native.jvmArgs=-Xmx4g KGP's default for it is 3g 4 GB is a budget for 7 GB (~1.3 OS/agent, <=2 Gradle, 4 link), not a measurement; the comment says so, and says why -XX:-UseGCOverheadLimit is not an answer. build_xcframework_local.sh is the desktop path and keeps the desktop heap. Building locally before the tag is still the advice. The watchdog on the same leg printed `line 108: 438.74: syntax error` on its first heartbeat and then nothing: BSD ps prints CPU time with hundredths, bash arithmetic rejects the sum, and an expansion error ends the subshell, so the leg ran its last 33 minutes with no heartbeat and no hang detection. cpu_seconds now drops the fraction per process (and handles the GNU day prefix as days, not as another base-60 field) and prints with %d. A --self-test feeds a fake BSD ps, including that exact 438.74, through the same $(( cpu - last_cpu )); testing/test_publish_ios_leg.py runs it, proves it goes red with the fraction left in, keeps the leg's two heaps summing under the runner, and is wired into build.yml's pytest step. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0155SkTGdbwnSnR6tWBqJvUM
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The v0.5.225
ios-xcframeworkleg died withGC overhead limit exceededat 37 min onmacos-14(7 GB). Diagnosis from the KGP 2.0.21 jar: the Kotlin/Native release link runs inside the Gradle JVM by default, under gradle.properties'-Xmx8g— larger than the box. 0.5.224's 3 h 11 m (vs ~161 min measured) was already paging; 0.5.225 stopped fitting.--max-workers=1 -Dorg.gradle.jvmargs=-Xmx2g -Pkotlin.native.disableCompilerDaemon=true -Pkotlin.native.jvmArgs=-Xmx4g(the link gets its own bounded JVM; KGP's own out-of-process default is 3g). The-Doutranks gradle.properties, so the desktop heap and the XCFramework cache key are untouched. Budget arithmetic and why-XX:-UseGCOverheadLimitis not a fix are in the matrix comment.cpu_secondsreturned a float on macOS, the$(( ))expansion errored on the first tick and killed the heartbeat subshell — the leg's last 33 minutes had no hang detection. Now integer (and the GNUdd-day prefix is handled), with--self-test(red on a copy with the fraction left in).Not verifiable without a Mac: that the link's live set fits 4 GB. If not, the leg now fails in minutes with a known-heap OOM instead of after hours of paging; the remedy remains
packaging/build_xcframework_local.shbefore the tag. 84 tests pass; gates 0.🤖 Generated with Claude Code
https://claude.ai/code/session_0155SkTGdbwnSnR6tWBqJvUM