sapling/eden/fs
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
..
benchharness add 4k random writes benchmark 2020-07-14 16:13:37 -07:00
benchmarks Remove dead includes in eden 2020-10-09 15:25:47 -07:00
cli add eden debug modified command 2020-11-02 13:52:38 -08:00
config path: verify that composed paths are comprised of valid PathComponent 2020-10-22 16:24:17 -07:00
docs Some minor modifications to verbiage in documentation 2020-07-06 22:20:17 -07:00
fuse name some threads 2020-11-02 15:22:53 -08:00
inodes inodes: rename future notification should be run non-inline 2020-11-02 21:03:58 -08:00
journal avoid redundant change notifications when prior notifications have not been observed 2020-10-20 18:25:43 -07:00
model PathFuncs: allow paths on Windows to be '\' separated 2020-10-22 16:24:17 -07:00
monitor Remove dead includes in eden 2020-10-09 15:25:47 -07:00
notifications notifications: compile on Windows 2020-09-09 09:33:35 -07:00
prjfs inodes: move path into the Dispatcher callbacks 2020-11-02 12:26:56 -08:00
py give new thrift client access to streaming APIs 2020-10-07 23:36:40 -07:00
rocksdb Remove dead includes in eden 2019-10-11 16:45:01 -07:00
service remove dead getDebugStatus 2020-11-02 13:52:38 -08:00
sqlite sqlite: allow to create in-memory sqlite database for testing 2020-10-05 15:51:18 -07:00
store always immediately fetch HgProxyHash in HgQueuedBackingStore 2020-11-02 20:18:26 -08:00
takeover thriftfmt 2020-11-02 13:52:37 -08:00
telemetry fix compilation warnings 2020-10-26 13:43:48 -07:00
testharness utils: compile the tests with @mode/win 2020-10-22 12:52:13 -07:00
third-party eden: support NO_OPEN support on macOS 2020-07-27 17:53:03 -07:00
utils utils: fix SpawnedProcess.pipe test on @mode/win 2020-10-26 20:56:17 -07:00
CMakeLists.txt prjfs: move win/mount into prjfs 2020-09-22 09:09:56 -07:00