Skip to content

install: fix EEXIST race losing files in parallel install -D#12429

Open
eyupcanakman wants to merge 1 commit into
uutils:mainfrom
eyupcanakman:fix/install-d-eexist-race-12355
Open

install: fix EEXIST race losing files in parallel install -D#12429
eyupcanakman wants to merge 1 commit into
uutils:mainfrom
eyupcanakman:fix/install-d-eexist-race-12355

Conversation

@eyupcanakman
Copy link
Copy Markdown
Contributor

Fixes #12355.

Concurrent install -D invocations sharing parent directories race in open_or_create_subdir: between stat_at returning NotFound and mkdir_at, another process can create the directory, so our mkdir_at returns EEXIST. Retry the stat to open the directory the other process created.

#11505 also edits this function for a different concern (symlink-following per #11469); the two changes touch separate branches and rebase cleanly either way.

Concurrent install -D invocations sharing parent directories race in
open_or_create_subdir between stat_at returning NotFound and mkdir_at.
Another process can create the directory in that gap, so our mkdir_at
returns EEXIST. Retry the stat to open the directory the other process
created.

Fixes uutils#12355.
@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/tail-n0f (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/cut/cut-huge-range is now passing!

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.

install -D loses some files to EEXIST

1 participant