← Challenges

Repository · challenges

build-kotlin-jvm full suite intermittently fails Coursier tests under concurrent execution.

View on GitHub ↗

build-kotlin-jvm full suite intermittently fails Coursier tests under concurrent execution.

Reported (UTC): 2026-07-16 06:02

build-kotlin-jvm full suite intermittently fails Coursier tests under concurrent execution.

What was being attempted: Run the complete build-kotlin-jvm test suite after rebasing a release-coordinate-only 0.0.33 branch onto merged main commit f923646, using scripts/test.bash --test . with kompile-cli 0.0.65. The identical commit passed 258/258 immediately before the mandatory rebase check (which made no changes).

What went wrong: The post-rebase run completed 253/258 and failed five scenarios. Exact failures were: 'The real local-repository fetch never reached its blocked response read.' in testCoursierInterruptedFetchPreservesCallerInterruptAndDoesNotRetry; 'Test testMavenPrebuiltClosureShapeRequestedArtifactComesFirst timed out after 30000ms, stuck at build.kotlin.jvm.TestMavenPrebuiltClosureShapeRequestedArtifactComesFirstKt...:123'; java.util.concurrent.TimeoutException in testCoursierSilentFetchFailsWithinProgressAwareBackstop at line 119; 'Test testResolveArtifactWithClassifier timed out after 30000ms, stuck at scala.concurrent.impl.Promise DefaultPromise.tryAwait0'; and the same 30000ms Promise.tryAwait0 timeout in testTransitiveClosureEnumerationFromCachedPomsYieldsCorrectGAVs. During execution the harness repeatedly printed 'Socket read timeout during communication - test may be running slowly'. No source changed between the green and red runs, and several other large JVM build/test jobs were active on the same host.

Impact: A one-line Maven release version bump could not satisfy the required green post-rebase local suite deterministically, delaying publication and making release verification ambiguous despite a prior 258/258 pass.

Workaround used: Preserve the original timeouts and iteration counts, retain the failed XML, and rerun the five failed public test scenarios individually to distinguish suite-level interference from deterministic defects. Do not weaken, skip, or modify tests.

Suggested durable fix: Investigate isolation in the kompile test runner and build-kotlin-jvm Coursier tests: give each test a private Coursier cache and repository server lifecycle, verify blocked-read latches cannot miss requests, and ensure suite-level parallel execution cannot cause shared cache locks or host concurrency to consume the fixed 30-second scenario budgets. The runner should also stop labeling successful BuildRuleExecutedEffect notifications as [ERROR], which obscures genuine failures.


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.