aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJade Lovelace <lix@jade.fyi>2024-08-07 02:00:50 -0700
committerJade Lovelace <lix@jade.fyi>2024-08-07 02:52:00 -0700
commit1437d3df15c1efae3164ae45c3285bd9959def5f (patch)
treee2eac9bba68e1976d4ce747102a3ee4664a93ce6 /doc
parent529eed74c477eee8567f28379210cd47f0b4e18f (diff)
darwin: workaround PROC_PIDLISTFDS on processes with no fds
This has been causing various seemingly spurious CI failures as well as some failures on people running tests on beta builds. lix> ++(nix-collect-garbage-dry-run.sh:20) nix-store --gc --print-dead lix> ++(nix-collect-garbage-dry-run.sh:20) wc -l lix> finding garbage collector roots... lix> error: Listing pid 87261 file descriptors: Undefined error: 0 There is no real way to write a proper test for this, other than to start a process like the following: int main(void) { for (int i = 0; i < 1000; ++i) { close(i); } sleep(10000); } and then let Lix's gc look at it. I have a relatively high confidence this *will* fix the problem since I have manually confirmed the behaviour of the libproc call is as-unexpected, and it would perfectly explain the observed symptom. Fixes: https://git.lix.systems/lix-project/lix/issues/446 Change-Id: I67669b98377af17895644b3bafdf42fc33abd076
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/rl-next/haunted-gc-macos.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/manual/rl-next/haunted-gc-macos.md b/doc/manual/rl-next/haunted-gc-macos.md
new file mode 100644
index 000000000..3ce912b2d
--- /dev/null
+++ b/doc/manual/rl-next/haunted-gc-macos.md
@@ -0,0 +1,15 @@
+---
+synopsis: "Fix unexpectedly-successful GC failures on macOS"
+cls: 1723
+issues: fj#446
+credits: jade
+category: Fixes
+---
+
+Has the following happened to you on macOS? This failure has been successfully eliminated, thanks to our successful deployment of advanced successful-failure detection technology (it's just `if (failed && errno == 0)`. Patent pending<sup>not really</sup>):
+
+```
+$ nix-store --gc --print-dead
+finding garbage collector roots...
+error: Listing pid 87261 file descriptors: Undefined error: 0
+```