Skip to content

Fix concurrent downloads of the Apalache distribution - #2026

Merged
bugarela merged 1 commit into
mainfrom
claude/funny-gates-hlc7d0
Sep 28, 2026
Merged

bugarela merged 1 commit into
mainfrom
claude/funny-gates-hlc7d0

Conversation

@bugarela

@bugarela bugarela commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

The Examples Dashboard is failing on main since #2025, on language-features/weakFairness.qnt (verify). The logging added in #2025 shows why:

>>> quint verify --max-steps=3 --backend tlc --temporal notDoneLeadsToDone language-features/weakFairness.qnt failed:
Error: Could not find or load main class tlc2.TLC
Caused by: java.lang.ClassNotFoundException: tlc2.TLC

Seems like this is only happening after that PR because I added way more TLC tests, so the chances of this race condition have increased.

This PR unpacks the distribution into a temporary directory and moves it into place once complete. If another process moved its own copy first, that one is used. The temporary directory is always removed. This also applies to users running several quint verify commands in parallel on a fresh machine.

  • I have read and I understand the Note on AI-assisted contributions
  • Changes manually tested locally and confirmed to work as described: with a fresh QUINT_HOME and 8 concurrent TLC runs (3 rounds), 9 of 24 runs failed with ClassNotFoundException: tlc2.TLC before this change, and none after, with no temporary directories left behind
  • Tests added for any new code (the download needs network access, so it's covered by this PR's CI dashboard run rather than a unit test)
  • Documentation added for any new functionality (N/A)
  • Entries added to the respective CHANGELOG.md for any new functionality

The Apalache distribution was unpacked directly into
~/.quint/apalache-dist-<version>, and a download is considered done as
soon as `bin/apalache-mc` exists. So a quint process started while
another one was still unpacking would use a partial distribution, and
TLC would fail with "Could not find or load main class tlc2.TLC". This
made the examples dashboard fail on main, where the TLC examples
weakFairness and strongFairness run in parallel and download Apalache.

Unpack into a temporary directory and move the distribution into place
once complete. If another process moved its own copy first, use it.

With a fresh QUINT_HOME and 8 concurrent TLC runs (3 rounds), 9 of 24
runs failed with the error above before this change, and none after.
@bugarela
bugarela merged commit 19e2b17 into main Sep 28, 2026
41 checks passed
@bugarela
bugarela deleted the claude/funny-gates-hlc7d0 branch September 28, 2026 02:10
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