sapling/eden/fs/inodes
Xavier Deguillard e3c3133fd3 inodes: rename future notification should be run non-inline
Summary:
Futures are by default run inline, meaning that when the previous future is
completed, the future will run in the same context as the previous one. In the
case where the previous one is completed by another thread setting up its
promise, the future will be completed in the context of that other thread.

In most cases, this is OK, in others, this can cause a deadlock. And this is
exactly what we're seeing here. When a file is renamed concurrently to an `hg
update`, the inode the rename operates on might not be loaded, and thus both
update and the rename callback will race to load that inode. When update wins
that race, the rename callback will wait on a promise that update will then
set. When that happens, the rest of the rename callback will be run in the
update context, but that will in turn cause update to try to re-acquire the
rename lock that it already holds...

To fix this, we need to make sure that the rename callback doesn't run inline.

Reviewed By: chadaustin

Differential Revision: D24657422

fbshipit-source-id: 23b08765afae7bda4a628f0c23675bff9f486b6b
2020-11-02 21:03:58 -08:00
..
overlay thriftfmt 2020-11-02 13:52:37 -08:00
sqliteoverlay Remove dead includes in eden 2020-10-09 15:25:47 -07:00
test Allow specifying commits to match against and prefetch in globFiles 2020-10-29 13:34:06 -07:00
CacheHint.h Tidy up license headers 2019-10-11 05:28:23 -07:00
CheckoutAction.cpp add an ObjectFetchContext interface 2020-02-05 13:15:01 -08:00
CheckoutAction.h make unlink and rmdir explicit about kernel cache invalidation 2020-07-28 14:47:40 -07:00
CheckoutContext.cpp prjfs: remove FsChannel.h 2020-09-28 18:14:30 -07:00
CheckoutContext.h logging for thrift object fetch: checkout 2020-07-26 23:09:40 -07:00
CMakeLists.txt move strace logging into FuseChannel 2020-10-20 09:34:03 -07:00
DeferredDiffEntry.cpp Remove dead includes in eden 2020-10-09 15:25:47 -07:00
DeferredDiffEntry.h add an ObjectFetchContext interface 2020-02-05 13:15:01 -08:00
DirEntry.cpp Add mode_t size in DirEntry 2020-03-10 12:27:50 -07:00
DirEntry.h edenfs: change PathMap CaseSensitivity to runtime option 2020-09-18 08:43:14 -07:00
EdenDispatcher.cpp inodes: rename future notification should be run non-inline 2020-11-02 21:03:58 -08:00
EdenDispatcher.h inodes: add missing override 2020-11-02 12:26:56 -08:00
EdenMount.cpp move strace logging into FuseChannel 2020-10-20 09:34:03 -07:00
EdenMount.h prjfs: add partial support for debug processfetch on Windows 2020-10-05 15:46:02 -07:00
EdenMountError.h Tidy up license headers 2019-10-11 05:28:23 -07:00
FileInode.cpp inodes: do not ignore errors when computing sha1 2020-10-15 23:57:11 -07:00
FileInode.h fuse: move BufVec.h to utils/ 2020-09-02 12:15:48 -07:00
GlobNode.cpp Allow specifying commits to match against and prefetch in globFiles 2020-10-29 13:34:06 -07:00
GlobNode.h Allow specifying commits to match against and prefetch in globFiles 2020-10-29 13:34:06 -07:00
InodeBase.cpp inodes: fix signed comparison warning 2020-09-23 12:20:42 -07:00
InodeBase.h allow querying Overlay file size outside of FileInode 2020-10-23 11:16:10 -07:00
InodeError.cpp allow querying Overlay file size outside of FileInode 2020-10-23 11:16:10 -07:00
InodeError.h Tidy up license headers 2019-10-11 05:28:23 -07:00
InodeLoader.h edenfs: change PathMap CaseSensitivity to runtime option 2020-09-18 08:43:14 -07:00
InodeMap.cpp inodes: fix signed comparison warning 2020-09-23 12:20:42 -07:00
InodeMap.h utils: move win/utils/Stub.h to utils/NotImplemented.h 2020-09-16 12:31:46 -07:00
InodeMetadata.cpp fs: ifdef linux/macos only files 2020-09-23 12:20:41 -07:00
InodeMetadata.h Tidy up license headers 2019-10-11 05:28:23 -07:00
InodeNumber.cpp inodes: move fuse/InodeNumber.{cpp,h} into inodes/ 2020-09-02 12:15:48 -07:00
InodeNumber.h inodes: fix signed comparison warning 2020-09-23 12:20:42 -07:00
InodePtr-defs.h Tidy up license headers 2019-10-11 05:28:23 -07:00
InodePtr.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
InodePtr.h Tidy up license headers 2019-10-11 05:28:23 -07:00
InodePtrFwd.h Tidy up license headers 2019-10-11 05:28:23 -07:00
InodeTable.h skip InodeTable entries with zero InodeNumbers 2020-11-02 14:57:13 -08:00
InodeTimestamps.cpp Inode support on Windows 2020-04-01 14:53:30 -07:00
InodeTimestamps.h Inode support on Windows 2020-04-01 14:53:30 -07:00
Overlay.cpp inodes: fix signed comparison warning 2020-09-23 12:20:42 -07:00
Overlay.h inodes: always include SqliteOverlay.h 2020-09-23 09:43:35 -07:00
OverlayFile.cpp fs: ifdef linux/macos only files 2020-09-23 12:20:41 -07:00
OverlayFile.h fix flakiness in RawOverlayTest.closed_overlay_stress_test 2020-01-27 18:17:01 -08:00
OverlayFileAccess.cpp allow querying Overlay file size outside of FileInode 2020-10-23 11:16:10 -07:00
OverlayFileAccess.h allow querying Overlay file size outside of FileInode 2020-10-23 11:16:10 -07:00
ParentInodeInfo.h Tidy up license headers 2019-10-11 05:28:23 -07:00
RequestContext.cpp Remove dead includes in eden 2020-10-09 15:25:47 -07:00
RequestContext.h fuse: move and rename RequestData 2020-09-04 16:14:24 -07:00
ServerState.cpp eden: fix Windows build 2020-05-04 11:53:33 -07:00
ServerState.h eden: fix Windows build 2020-05-04 11:53:33 -07:00
Traverse.cpp add observed inode traversal functions 2020-10-23 11:16:10 -07:00
Traverse.h add observed inode traversal functions 2020-10-23 11:16:10 -07:00
TreeInode.cpp remove dead getDebugStatus 2020-11-02 13:52:38 -08:00
TreeInode.h remove dead getDebugStatus 2020-11-02 13:52:38 -08:00
TreePrefetchLease.cpp limit the number of tree prefetch operations that can run in parallel 2019-12-20 16:14:19 -08:00
TreePrefetchLease.h fix one case of logging of null ClientPid 2020-08-31 10:05:02 -07:00