xai-org/grok-build · error

mount table inconclusive for {}; refusing remove

Error message

mount table inconclusive for {}; refusing remove

What it means

try_nfs_remove only removes a worktree if it can prove the destination is currently a mountpoint or is a known previously-unmounted grove dest. If neither check succeeds, the mount table state is ambiguous, and it refuses to remove rather than risk deleting a normal directory or a victim backing directory.

Source

Thrown at crates/codegen/xai-fast-worktree/src/nfs/remove.rs:17

//! NFS worktree removal: daemon-first, verified-unmount, then confined backing delete.
//!
//! Never `umount -f`. Unverifiable unmount retains backing + pin.
use super::NfsWorktreeOpts;
use super::client::NfsWorktreeClient;
use super::confined::is_safe_worktree_id;
use super::liveness::{BACKING_MARKER_FILE, BackingMarker};
use super::mount_table::{dest_is_mountpoint, dest_is_projected_mount};
use crate::RemoveReport;
use anyhow::Context;
use anyhow::{Result, bail};
use std::io::Read;
use std::path::{Path, PathBuf};
use std::process::Stdio;
pub fn try_nfs_remove(worktree_path: &Path) -> Result<Option<RemoveReport>> {
    if !dest_is_mountpoint(worktree_path) && !super::dest_is_known_unmounted(worktree_path) {
        bail!(
            "mount table inconclusive for {}; refusing remove",
            worktree_path.display()
        );
    }
    let is_projected = dest_is_projected_mount(worktree_path);
    if is_projected {
        if lookup_from_markers(worktree_path).is_none() {
            bail!(
                "{} is a live grove mount without a backing marker; refusing rm -rf",
                worktree_path.display()
            );
        }
    } else if dest_is_mountpoint(worktree_path) || lookup_nfs_meta(worktree_path).is_none() {
        return Ok(None);
    }
    remove_nfs_worktree(worktree_path)
}
fn remove_nfs_worktree(worktree_path: &Path) -> Result<Option<RemoveReport>> {

View on GitHub (pinned to bc7f02eddd)

Solutions

  1. Verify the path is the grove dest mountpoint (mount | grep <path>) before calling try_nfs_remove
  2. Ensure the path was created by the grove NFS flow; use the regular rm/remove path for non-NFS worktrees
  3. If it was already unmounted by the daemon, just remove the backing directory manually instead
  4. Check that the process can read the mount table (permissions/namespace) so dest_is_known_unmounted works

Example fix

// before
std::fs::remove_dir_all(&path).ok();
// after
match try_nfs_remove(&path) {
    Ok(Some(report)) => println!("removed nfs worktree: {:?}", report),
    Ok(None) => std::fs::remove_dir_all(&path)?,
    Err(e) => eprintln!("refused: {e}"),
}
Defensive patterns

Strategy: try-catch

Validate before calling

fn removable(path: &Path) -> bool {
    dest_is_mountpoint(path) || super::dest_is_known_unmounted(path)
}
if !removable(&path) { eprintln!("{} is not a grove dest; use plain rm", path.display()); }

Try / catch

match try_nfs_remove(&path) {
    Ok(Some(report)) => { /* nfs removal done */ }
    Ok(None) => { /* plain directory: rm -rf */ }
    Err(e) if e.to_string().starts_with("mount table inconclusive") => {
        eprintln!("verify the path is a grove dest before removing");
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Calling try_nfs_remove on a path that is not a mountpoint and has no record in the known-unmounted table (e.g. already fully removed, never an NFS worktree, or /proc/mounts / dest_is_mountpoint lookup transiently failed).

Common situations: Removing a worktree twice (second call sees nothing mounted); path passed is the backing source dir instead of the dest mountpoint; sandboxed environments where the mount table is unreadable/incomplete (no private mount namespace).

Related errors


AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31). Data as JSON: /api/errors/2bf1404a71449059. Report an issue: GitHub.