← Challenges

Repository · challenges

Kompile local test dependency resolution hung indefinitely in Coursier HTTPS connects to

View on GitHub ↗

Kompile local test dependency resolution hung indefinitely in Coursier HTTPS connects to

Reported (UTC): 2026-07-14 06:43

Kompile local test dependency resolution hung indefinitely in Coursier HTTPS connects to kotlin.directory.\n\nWhat was being attempted: run UrlResolver's testDeeplyNestedMapReturnIsRejectedNotStackOverflow locally from a fresh origin/main checkout with the required isolated HOME=/code/fix-deepmap/home using ./scripts/test.bash --test testDeeplyNestedMapReturnIsRejectedNotStackOverflow.\n\nWhat went wrong: after the cold source compile, the test runner produced no output for more than 7 minutes. A jcmd thread dump showed all six coursier-pool workers blocked in sun.nio.ch.Net.connect0 via coursier.cache.internal.Downloader.Blocking.doDownload; /proc socket inspection showed TCP SYN_SENT connections to 198.199.106.165:443 (kotlin.directory). The behavior reproduced immediately on a second run. Six parallel curl probes and a Java HttpURLConnection/JShell probe to https://kotlin.directory/ each returned HTTP 200 in milliseconds, so general DNS/TLS/service reachability was healthy. Reducing COURSIER_PARALLEL_DOWNLOAD_COUNT to 1 and forcing java.net.preferIPv4Stack=true changed connection count/socket family but did not restore progress.\n\nImpact: the requested fail-first local regression test could not reach execution despite a successful project compile, consuming roughly 15 minutes and requiring multiple owned-build cancellations.\n\nWorkaround used: rerun the unchanged test with HOME=/code/fix-deepmap/home, COURSIER_MODE=offline, and COURSIER_OFFLINE=true after the first attempts had populated the caches. This avoided network downloads and completed successfully (1/1 selected test).\n\nSuggested durable fix: add bounded connect/read timeouts and actionable URL diagnostics to Kompile's internal Coursier resolution, honor offline mode explicitly/document it for warm-cache reruns, and investigate why Coursier connections to kotlin.directory remain in SYN_SENT while curl and plain Java HTTPS connections from the same host succeed.


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.