sapling/eden/fs/fuse
Wez Furlong 309fc66a2c eden: add timeout to FuseChannel requests
Summary:
The macOS FUSE implementation has the concept of a daemon timeout,
which is used to set an upper bound on the length of time that the kernel will
wait for a request to be satisfied.  If a request takes too long, the kernel
will shutdown the fuse device and the user is left with a relatively broken
experience in their repo until they restart the eden server.  Critically, when
it is left in the broken state it is hard for the user to realize that they
need to restart the server because the kernel will still respond with EIO to
file accesses within the mount; even though it has been stopped, it isn't
fully unmounted until the fuse process stops.

This diff introduces a self imposed timeout in the fuse processing flow
and emits an ETIMEDOUT error when it is reached.

The intent is that we'll configure this timeout to be smaller than the
macOS daemon_timeout (which will be adjusted in a separate diff) so
that we don't trigger the problematic behavior when the kernel decides
that we've timedout.

This change is made for all fuse implementations, not just macOS, for
the sake of consistency: there's value to doing this on Linux as well,
to avoid some deadlock like scenarios: this should put an upper bound
on blocking in certain situations.

I've made the timeout default to 60 seconds, but haven't added any
configuration code for this yet; will do that in a follow on diff.

Reviewed By: chadaustin

Differential Revision: D16917954

fbshipit-source-id: 675539c43cf7f0009fd65d138081b9126464b7e0
2019-08-28 09:41:54 -07:00
..
fuse_tester build fuse_tester with open source gflags 2019-08-21 17:22:46 -07:00
privhelper eden: add thrift calls for adding/removing bind mounts 2019-06-25 18:42:37 -07:00
test update license headers in C++ files 2019-06-19 17:02:45 -07:00
BufVec.cpp update license headers in C++ files 2019-06-19 17:02:45 -07:00
BufVec.h update license headers in C++ files 2019-06-19 17:02:45 -07:00
CMakeLists.txt use fb303 repo in open source build 2019-07-24 21:07:04 -07:00
DirList.cpp update license headers in C++ files 2019-06-19 17:02:45 -07:00
DirList.h update license headers in C++ files 2019-06-19 17:02:45 -07:00
Dispatcher.cpp update license headers in C++ files 2019-06-19 17:02:45 -07:00
Dispatcher.h update license headers in C++ files 2019-06-19 17:02:45 -07:00
FileHandle.h update license headers in C++ files 2019-06-19 17:02:45 -07:00
FileHandleBase.cpp update license headers in C++ files 2019-06-19 17:02:45 -07:00
FileHandleBase.h update license headers in C++ files 2019-06-19 17:02:45 -07:00
FuseChannel.cpp eden: add timeout to FuseChannel requests 2019-08-28 09:41:54 -07:00
FuseChannel.h eden: add timeout to FuseChannel requests 2019-08-28 09:41:54 -07:00
FuseTypes.h don't implicitly include the repo root in the include path 2019-07-24 17:44:33 -07:00
InodeNumber.cpp update license headers in C++ files 2019-06-19 17:02:45 -07:00
InodeNumber.h update license headers in C++ files 2019-06-19 17:02:45 -07:00
PollHandle.cpp update license headers in C++ files 2019-06-19 17:02:45 -07:00
PollHandle.h update license headers in C++ files 2019-06-19 17:02:45 -07:00
RequestData.cpp eden: add timeout to FuseChannel requests 2019-08-28 09:41:54 -07:00
RequestData.h eden: add timeout to FuseChannel requests 2019-08-28 09:41:54 -07:00