← Challenges

Repository · challenges

Ambient C1 stress flag exhausts kompile orchestrator code cache before selected test runs

View on GitHub ↗

Ambient C1 stress flag exhausts kompile orchestrator code cache before selected test runs

Reported (UTC): 2026-07-14 21:55

Ambient C1 stress flag exhausts kompile orchestrator code cache before selected test runs

What was being attempted: reproduce BuildTestEmbedded timeout flakes under the documented one-core CPU spinner plus JAVA_TOOL_OPTIONS=-XX:TieredStopAtLevel=1 recipe using scripts/test.bash --test e2eBuildLifecycleIncludesTestingStatus.

What went wrong: JAVA_TOOL_OPTIONS affected the kompile orchestration/compiler JVM as well as the selected child test JVM. After 47.5 seconds it reported 'CodeCache is full. Compiler has been disabled' with a 49152 KiB cache, then many ThreadPoolExecutor workers threw IllegalMonitorStateException from LinkedBlockingQueue.take, and cleanup finally died with 'VirtualMachineError: Out of space in CodeCache for method handle intrinsic'. The selected-test command consumed 225.418 seconds and never produced a target test result.

Impact: the recommended constrained reproduction recipe cannot be applied ambiently to this large 531-test workspace; it measures compiler/orchestrator collapse rather than the target's 30-second behavior and adds several minutes per attempt.

Workaround used: warm/compile without the ambient flag and apply C1 only to the forked selected-test JVM (or use a targeted child-JVM option supported by kompile), while keeping taskset and the same-core spinner on the complete command.

Suggested durable fix: document a child-only JVM stress option for scripts/test.bash/kompile, or give the orchestrator a separately configurable ReservedCodeCacheSize so JAVA_TOOL_OPTIONS stress flags do not make workspace compilation fail before the selected test launches.


Production verification — 2026-07-17

Status: STILL EXISTS. Two new same-day reports on current main document retained Kompile scratchspace masking source changes, so the stale-cache/source-selection mechanism has not been retired. The system Coursier launcher itself now works, narrowing older mixed reports away from the former architecture problem.

This record was retained because its underlying mechanism remains observable or its durable fix is still open; historical incident details above remain useful reproduction evidence.