hanwen / go-fuse

FUSE bindings for Go
Other
2.04k stars 328 forks source link

Timeout handling inconsistent between Linux and macOS #331

Closed EdSchouten closed 1 year ago

EdSchouten commented 5 years ago

The Linux kernel doesn't seem to apply any I/O timeouts on FUSE operations. For FUSE daemons written in Go, this is generally speaking a pretty decent policy. Timeouts can in most cases be added by making proper use of package "context". This not only ensures that processes get unstuck, it also causes resources to be cleaned up on the daemon's side.

OSXFUSE, however, offers an additional mount option called "daemon_timeout". By default it is set to 60 seconds. When I/Os take longer than 60 seconds, OSXFUSE effectively kills the entire mount (read: not just the single I/O). No special signal and/or message is sent to the FUSE daemon when this happens, nor is any functionality offered to recover the mount. All I/Os on the mount will return ENXIO from that moment on.

This feature is pretty annoying when the FUSE file system is backed by remote resources that may sometimes take a longer time to load (e.g., large files that cannot be loaded in chunks).

Would it make sense for go-fuse to simply pass in "daemon_timeout=0" (infinite timeout) on those systems?

hanwen commented 5 years ago

yes, seems reasonable.

Jille commented 2 years ago

@SnoozeThis https://github.com/hanwen/go-fuse/pull/425

SnoozeThis commented 2 years ago

(https://snoozeth.is/H35GPeoc0VE) I will wait until https://github.com/hanwen/go-fuse/pull/425 is merged and then add a comment.

SnoozeThis commented 2 years ago

An error occurred while snoozing: Pull request was closed without being merged

hanwen commented 1 year ago

fixed in https://github.com/hanwen/go-fuse/commit/d01fda7edf17995ff56e9b7d8c3f8114e4ae37ce