tailscale/tailscale · error

too many retries trying to rename %q to %q

Error message

too many retries trying to rename %q to %q

What it means

Rename tried repeatedly to move the partial file to a unique final name, but every candidate name already existed with different contents, and the retry cap was hit. It means the Taildrop directory holds many files with the same base name.

Source

Thrown at feature/taildrop/fileops_fs.go:151

				return "", err
			}
			sumD, err := sha256File(dst)
			if err != nil {
				return "", err
			}
			if bytes.Equal(sumP[:], sumD[:]) {
				if err := os.Remove(oldPath); err != nil {
					return "", err
				}
				return dst, nil
			}
		}

		// Choose a new destination filename and try again.
		dst = filepath.Join(filepath.Dir(dst), nextFilename(filepath.Base(dst)))
	}

	return "", fmt.Errorf("too many retries trying to rename %q to %q", oldPath, newName)
}

// sha256File computes the SHA‑256 of a file.
func sha256File(path string) (sum [sha256.Size]byte, _ error) {
	f, err := os.Open(path)
	if err != nil {
		return sum, err
	}
	defer f.Close()
	h := sha256.New()
	if _, err := io.Copy(h, f); err != nil {
		return sum, err
	}
	copy(sum[:], h.Sum(nil))
	return sum, nil
}

func (f fsFileOps) ListFiles() ([]string, error) {

View on GitHub (pinned to 6e0912f979)

Solutions

  1. Clear old copies of the file from the Taildrop directory.
  2. Send the file with a different name.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at feature/taildrop/fileops_fs.go:151 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tailscale/tailscale@6e0912f979 (2026-08-18). Data as JSON: /api/errors/6a846ffc3196ee64. Report an issue: GitHub.