ipfs/kubo · error
unmount %s failed after 10 seconds of trying
Error message
unmount %s failed after 10 seconds of trying
What it means
ForceUnmountManyTimes retries the platform unmount command every 500ms for 10 attempts (~10s total); if the mount still exists it returns 'unmount <path> failed after 10 seconds of trying'. The mountpoint is stuck, typically from processes blocked on a dead FUSE connection.
Source
Thrown at fuse/mount/mount.go:91
default:
return nil, fmt.Errorf("unmount: unimplemented")
}
}
// ForceUnmountManyTimes attempts to forcibly unmount a given mount,
// many times. It does so by calling diskutil or fusermount directly.
// Attempts a given number of times.
func ForceUnmountManyTimes(m Mount, attempts int) error {
var err error
for range attempts {
err = ForceUnmount(m)
if err == nil {
return err
}
<-time.After(time.Millisecond * 500)
}
return fmt.Errorf("unmount %s failed after 10 seconds of trying", m.MountPoint())
}
type closer struct {
M Mount
}
func (c *closer) Close() error {
log.Warn(" (c *closer) Close(),", c.M.MountPoint())
return c.M.Unmount()
}
func Closer(m Mount) io.Closer {
return &closer{m}
}
View on GitHub (pinned to 329838acdf)
Solutions
- Abort the FUSE connection (echo 1 > /sys/fs/fuse/connections/<id>/abort) then fusermount3 -u -z <path>
- Identify blockers with fuser -vm <path> or lsof and kill them, then retry
- Remove leftover mountpoints under /tmp after cleaning to avoid tmpwatch/fuser hangs
- If on an unsupported GOOS, note ForceUnmount cannot succeed; use the go-fuse server Unmount instead
Example fix
// manual recovery
connId=$(awk '$0 ~ /\/tmp\/TestMount/ {split($3,a,":"); print a[3]}' /proc/self/mountinfo)
echo 1 > /sys/fs/fuse/connections/$connId/abort
fusermount3 -u -z /tmp/TestMount123/001 Defensive patterns
Strategy: retry
Validate before calling
if _, err := os.Stat(m.MountPoint()); err != nil {
// mountpoint already gone; skip forced unmount
} Try / catch
err := mount.ForceUnmountManyTimes(m, 10)
if err != nil {
abortFuseConnection(m.MountPoint()) // echo 1 > /sys/fs/fuse/connections/<id>/abort
time.Sleep(time.Second)
err = mount.ForceUnmountManyTimes(m, 10)
} Prevention
- Ensure the FUSE server is alive before forcing unmounts
- Clean up stale /tmp mounts after crashed runs
- Kill processes blocked in D state on the mount first
When it happens
Trigger: All 10 ForceUnmount attempts fail while processes hold the mount busy or the FUSE connection is dead (server killed, D-state processes); also triggered when the unmount command itself errors every time (e.g. unimplemented on this GOOS).
Common situations: After a crashed or SIGKILLed test/daemon leaving a stale FUSE mount under /tmp; hung readers blocking unmount; repeated `ipfs mount` test reruns.
Related errors
- umount timeout
- not mounted
- unmount: unimplemented
- mountFuse: GetConfig() failed: %s
- mountFuse: ConstructNode() failed: %s
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/1999d47947066497.
Report an issue: GitHub.