Skip to content

Fix Antares append and unmount FUSE races - #8

Merged
genedna merged 2 commits into
masterfrom
codex/fix-antares-fuse-races
Jun 16, 2026
Merged

Fix Antares append and unmount FUSE races#8
genedna merged 2 commits into
masterfrom
codex/fix-antares-fuse-races

Conversation

@Ivanbeethoven

Copy link
Copy Markdown
Collaborator

Summary

  • disable Antares writeback cache to avoid EBADF when appending to existing files
  • add a FUSE regression test covering reopen-in-append mode on an existing file
  • add a configurable unmount grace period before Antares tears down active mounts

Verification

  • cargo test --test antares_test test_fuse_append_existing_file -- --exact --ignored --nocapture --test-threads=1
  • cargo test unmount_grace_duration
  • manual Antares mount regression for append and unmount-drain behavior

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 900309f0ab

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/antares/mod.rs
Comment on lines +329 to +330
// Look up config first so we can quiesce without holding the state lock.
let config = match self.instances.lock().await.get(job_id) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reserve the job id before quiescing unmounts

When an unmount is sleeping here, the instances lock has already been dropped, so a concurrent mount_job_at for the same job_id can finish mounting a different custom mountpoint and overwrite both maps before this method reaches fuse_handles.remove(job_id). In that race this unmount removes and tears down the newly inserted AntaresFuse while the original FUSE session can be left orphaned and untracked; the old implementation held the state lock across the unmount and prevented that interleaving. Please reserve/remove or mark the job as unmounting before awaiting the grace period.

Useful? React with 👍 / 👎.

@genedna
genedna merged commit 230f62a into master Jun 16, 2026
7 of 9 checks passed
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.

2 participants