go-fuse icon indicating copy to clipboard operation
go-fuse copied to clipboard

Timeout handling inconsistent between Linux and macOS

Open EdSchouten opened this issue 4 years ago • 3 comments

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?

EdSchouten avatar Nov 08 '19 11:11 EdSchouten

yes, seems reasonable.

hanwen avatar Nov 08 '19 13:11 hanwen

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

Jille avatar May 14 '22 17:05 Jille

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

SnoozeThis avatar May 14 '22 17:05 SnoozeThis

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

SnoozeThis avatar Nov 15 '22 21:11 SnoozeThis

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

hanwen avatar Apr 09 '23 17:04 hanwen