vamos: give each instance its own temp volume dir - #3
Merged
Conversation
Temp volumes used the configured path directly and removed it recursively on exit, so concurrent vamos instances raced on the shared ~/.vamos/volumes/ram: one instance's teardown deleted the volume under the others, and startups failed with 'error creating temp dir'. Mount a mkdtemp dir below the configured path instead, and remove the base only when empty. Also fixes dead code in _create_temp: an early return hid the not-a-directory check.
codewiz
force-pushed
the
temp-volume-mkdtemp
branch
from
August 21, 2026 18:16
9da7404 to
cca7023
Compare
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.
Temp volumes used the configured path directly and removed it recursively on exit, so concurrent vamos instances raced on the shared ~/.vamos/volumes/ram: one instance's teardown deleted the volume under the others, and startups died with 'error creating temp dir ... path setup failed!'.
This showed up while running the m68k-amigaos gcc testsuite with -j24 and vamos as the DejaGnu simulator: ~90 of 24k tests failed spuriously, differing from run to run. With this fix (mount a mkdtemp dir below the configured path; remove the base only when its last user exits) 20 parallel instances on the default config produce zero errors, and the tally became reproducible.
Also fixes dead code in _create_temp: an early return hid the not-a-directory check.
Files inside the volume are per-instance now, which is the right semantic for a scratch volume - nothing shared is lost. The unit tests (including path_volume_temp_test's 'gone after shutdown' expectation) pass unchanged.