sapling/eden/cli
Adam Simpkins 385eed0b4e do not treat zombie processes as exited in edenfsctl restart
Summary:
Update `edenfsctl restart` so that it does not treat zombie processes as
stopped.  This effectively reverts the changes added in D9980225.

This behavior was causing `edenfsctl restart` to spuriously fail, as it would
try to start the new EdenFS process too early, before the kernel had fully
cleaned up the old EdenFS process and released all of its locks.  In
particular, the new process would often fail to acquire the RocksDB lock.
Older versions of EdenFS did not always explicitly release this lock during
shutdown, and so it would end up being cleaned up by the kernel after the
process had exited.

I wrote a simple test program to verify this behavior, where one process
would acquire a file lock with an `F_SETLK` `fcntl()` call, and then exit
without releasing it.  Another process that polled for this process to enter
zombie state and then try to acquire the lock.  It would very reliably receive
`EAGAIN` failures if it attempted to acquire the lock immediately after it saw
the first process enter a zombie state.

In practice we shouldn't normally run into issues with EdenFS being stuck in a
zombie state.  The situation described in D9980225 sounds like a corner case
encountered during development while running EdenFS under sudo.

Reviewed By: chadaustin

Differential Revision: D20210708

fbshipit-source-id: cd62b47405d7f3e53bd4a1fb4ff2964596ca3536
2020-03-04 10:29:53 -08:00
..
doctor update process_finder to also find the Eden dir through the lock file 2020-03-03 11:53:50 -08:00
test do not treat zombie processes as exited in edenfsctl restart 2020-03-04 10:29:53 -08:00
__init__.py eden: add a script to build the eden client executable for oss builds 2019-01-15 14:14:32 -08:00
buck.py Tidy up license headers 2019-10-11 05:28:23 -07:00
CMakeLists.txt install the edenfsctl program during the CMake build 2019-12-03 21:42:28 -08:00
cmd_util.py Tidy up license headers 2019-10-11 05:28:23 -07:00
config.py use a NullTelemetryLogger during integration tests 2020-03-03 14:56:49 -08:00
configinterpolator.py Tidy up license headers 2019-10-11 05:28:23 -07:00
configutil.py Tidy up license headers 2019-10-11 05:28:23 -07:00
daemon.py do not treat zombie processes as exited in edenfsctl restart 2020-03-04 10:29:53 -08:00
debug_posix.py Update pyre version for eden 2019-10-16 16:56:29 -07:00
debug.py have eden debug log show the end of the log file by default 2020-01-24 13:22:18 -08:00
filesystem.py fix doctor tests when host has low disk space 2019-12-20 16:14:23 -08:00
fsck.py Update pyre version for eden 2019-10-31 15:31:07 -07:00
hg_util.py Tidy up license headers 2019-10-11 05:28:23 -07:00
logfile.py update license headers in .py files 2019-06-19 17:02:46 -07:00
main.py --clean option for eden du 2020-03-03 14:07:53 -08:00
mtab.py eden: remove legacy bind mount code 2019-09-30 18:57:14 -07:00
overlay.py Tidy up license headers 2019-10-11 05:28:23 -07:00
process_finder.py update process_finder to also be able to report EdenFS build info 2020-03-03 13:48:55 -08:00
rage.py eden: rage: fix ps usage on macOS 2020-01-31 10:13:45 -08:00
redirect.py move code to get the running EdenFS version to EdenInstance 2020-02-25 19:01:09 -08:00
stats_print.py Tidy up license headers 2019-10-11 05:28:23 -07:00
stats.py fix O(num_inodes) behavior of getStatInfo() 2019-11-06 11:31:43 -08:00
subcmd.py Update pyre version for eden 2019-12-20 16:14:21 -08:00
systemd.py Revert D20090620: Type hints 2020-03-03 12:34:59 -08:00
tabulate.py Tidy up license headers 2019-10-11 05:28:23 -07:00
telemetry.py allow tag support in cli scuba logging 2020-03-03 08:04:29 -08:00
top.py properly escape command line arguments in eden top 2020-01-31 10:07:49 -08:00
trace_cmd.py update license headers in .py files 2019-06-19 17:02:46 -07:00
trace.py Update pyre version for eden 2019-10-16 16:56:29 -07:00
ui.py Update pyre version for eden 2019-10-31 15:31:07 -07:00
util.py update the CLI to handle old EdenFS instances without getDaemonInfo() 2020-03-03 12:15:26 -08:00
version.py update the telemetry wrapper to log the current code version 2020-02-25 19:01:10 -08:00
win_ui.py Tidy up license headers 2019-10-11 05:28:23 -07:00
winproc.py Tidy up license headers 2019-10-11 05:28:23 -07:00