vercel/turborepo · error · std::io::Error

socket path has no parent: {sock_path}

Error message

socket path has no parent: {sock_path}

What it means

Before serving its socket, the Windows daemon hardens the socket's parent directory (and its grandparent) via secure_socket_dir -> socket_dir (endpoint.rs:185). socket_dir calls sock_path.parent() and this InvalidInput error means the configured socket path is a filesystem root like `C:\`, which has no parent. Real daemon socket paths always sit under the user's temp/profile tree, so this is an internal invariant guard for a malformed override.

Source

Thrown at crates/turborepo-daemon/src/endpoint.rs:185

        });

        Ok((lock, stream))
    }
}

#[cfg(windows)]
fn secure_socket_dir(sock_path: &AbsoluteSystemPath) -> Result<(), std::io::Error> {
    let socket_dir = socket_dir(sock_path)?;
    if let Some(daemon_dir) = socket_dir.parent() {
        secure_windows_dir(daemon_dir)?;
    }
    secure_windows_dir(socket_dir)
}

#[cfg(windows)]
fn socket_dir(sock_path: &AbsoluteSystemPath) -> Result<&AbsoluteSystemPath, std::io::Error> {
    sock_path.parent().ok_or_else(|| {
        std::io::Error::new(
            std::io::ErrorKind::InvalidInput,
            format!("socket path has no parent: {sock_path}"),
        )
    })
}

#[cfg(windows)]
fn secure_windows_dir(path: &AbsoluteSystemPath) -> Result<(), std::io::Error> {
    path.create_dir_all()?;
    windows_security::ensure_current_user_owns_path(path)?;
    windows_security::set_owner_only_dacl(path, true)
}

#[cfg(windows)]
fn secure_socket_file(sock_path: &AbsoluteSystemPath) -> Result<(), std::io::Error> {
    windows_security::ensure_current_user_owns_path(sock_path)?;
    windows_security::set_owner_only_dacl(sock_path, false)
}

View on GitHub (pinned to f9245100cf)

Solutions

  1. Unset or fix any custom socket/daemon path override so the default per-user path is used
  2. Verify the path printed in the message is what you intended; it must have at least one non-root component
  3. If you changed nothing and still hit it, report a bug with the exact path
Defensive patterns

Strategy: validation

Validate before calling

// before constructing/overriding a daemon socket path
let parent = sock_path.parent()
    .filter(|p| !p.as_std_path().as_os_str().is_empty());
assert!(parent.is_some(), "socket path must not be a filesystem root");

Prevention

When it happens

Trigger: Starting the daemon (turbo daemon or first backgrounded run) with a custom socket path that resolves to a drive root — e.g. an env override or test fixture passing `C:\` / a root VERBATIM path.

Common situations: Custom TURBO socket-path environment/testing overrides pointing at a root A path-composition bug upstream truncating the path to its root

Related errors


AI-assisted analysis of vercel/turborepo@f9245100cf (2026-08-17). Data as JSON: /api/errors/64a3b8e14c15d421. Report an issue: GitHub.