Repository navigation
fix(fs): move a staged owner-only directory without a placeholder - #111
Merged
Merged
Conversation
A staged CreationAccess::OwnerOnly directory (macOS, FreeBSD) reached its final name by renameat over an empty placeholder made under that name. A concurrent opener of the name could hold the placeholder, which the rename then unlinked, so nothing could be created in what it opened (NoEntry). Isoline's racing key and cache creators hit it on macOS. The directory now moves with a rename that refuses an existing target (renameNoReplace: renameatx_np(RENAME_EXCL) on Apple, renameat2's RENAME_NOREPLACE on Linux, where the staged tests run), so the name names nothing until it names the finished directory. Where the system or file system has none (FreeBSD), the placeholder remains, documented. The rename is injected into OwnerOnlyCreator so the fallback stays tested. Signed-off-by: Christian Parpart <christian@parpart.family>
christianparpart
force-pushed
the
fix/owner-only-directory-no-placeholder
branch
from
November 30, 2026 10:58
a01cb1e to
f5955e3
Compare
christianparpart
added a commit
to contour-terminal/isoline
that referenced
this pull request
Nov 30, 2026
core::fs moves a staged owner-only directory to its final name with a rename that refuses an existing target (contour-terminal/core-cpp#111), so a racing creator never opens a placeholder the rename then unlinks. That is what failed Key.racingCreatorsAgree and DirectoryStorage.concurrentWritersAgree on macOS. Signed-off-by: Christian Parpart <christian@parpart.family>
christianparpart
added a commit
to contour-terminal/isoline
that referenced
this pull request
Nov 30, 2026
core::fs moves a staged owner-only directory to its final name with a rename that refuses an existing target (contour-terminal/core-cpp#111), so a racing creator never opens a placeholder the rename then unlinks. That is what failed Key.racingCreatorsAgree and DirectoryStorage.concurrentWritersAgree on macOS. Signed-off-by: Christian Parpart <christian@parpart.family>
christianparpart
added a commit
to contour-terminal/isoline
that referenced
this pull request
Dec 2, 2026
core::fs's openHostFile (contour-terminal/core-cpp#109), which the tool's input reads need: a user-named path opened as the host resolves it, links followed, and decided on its handle. v0.25.1 also moves a staged owner-only directory to its final name with a rename that refuses an existing target (contour-terminal/core-cpp#111). Signed-off-by: Christian Parpart <christian@parpart.family>
christianparpart
added a commit
to contour-terminal/isoline
that referenced
this pull request
Dec 2, 2026
core::fs's openHostFile (contour-terminal/core-cpp#109), which the tool's input reads need: a user-named path opened as the host resolves it, links followed, and decided on its handle. v0.25.1 also moves a staged owner-only directory to its final name with a rename that refuses an existing target (contour-terminal/core-cpp#111). Signed-off-by: Christian Parpart <christian@parpart.family>
christianparpart
added a commit
to contour-terminal/isoline
that referenced
this pull request
Dec 2, 2026
core::fs's openHostFile (contour-terminal/core-cpp#109), which the tool's input reads need: a user-named path opened as the host resolves it, links followed, and decided on its handle. v0.25.1 also moves a staged owner-only directory to its final name with a rename that refuses an existing target (contour-terminal/core-cpp#111). Signed-off-by: Christian Parpart <christian@parpart.family>
christianparpart
added a commit
to contour-terminal/isoline
that referenced
this pull request
Dec 2, 2026
core::fs's openHostFile (contour-terminal/core-cpp#109), which the tool's input reads need: a user-named path opened as the host resolves it, links followed, and decided on its handle. v0.25.1 also moves a staged owner-only directory to its final name with a rename that refuses an existing target (contour-terminal/core-cpp#111). Signed-off-by: Christian Parpart <christian@parpart.family>
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.
A staged
CreationAccess::OwnerOnlydirectory (macOS, FreeBSD) reached its final name byrenameatover an empty placeholder made under that name. A concurrent opener of the name could hold the placeholder, which the rename then unlinked; nothing could be created in what it opened (NoEntry). Isoline's racing key/cache creators hit this on macOS CI.renameNoReplace(private,posix/PosixSystem.hpp):renameatx_np(RENAME_EXCL)on Apple,renameat2(RENAME_NOREPLACE)on Linux,ENOTSUPelsewhere.createDirectoryStagedmoves with it; only where the system or file system lacks one (FreeBSD) does it fall back to the placeholder, with the window documented.OwnerOnlyCreator(besideStatHandle), so the fallback and a failing move stay tested on Linux.[threading]case: an opener racing a staged creation must hold the directory left under the name. Before the fix it failed 176 of 256 rounds on Linux (staged); now it passes.Consumer impact: none in the API (private header only). Behaviour: on macOS, concurrent creators of one owner-only directory now all see the final directory. Isoline re-vendors for it.