Skip to content

nixos(locate): prune the generated fleet tree from updatedb (#10589) - #10606

Merged
dezren39 merged 2 commits into
mainfrom
sweep/10589-locate-prune
Nov 16, 2026
Merged

dezren39 merged 2 commits into
mainfrom
sweep/10589-locate-prune

Conversation

@dezren39

@dezren39 dezren39 commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Problem

update-locatedb.service fails on amd scanning the generated fleet tree:

updatedb[...]: /home/user/git/fleet/watcher-bench-195/fixtures/manydirs/d130875: Too many open files
Hint: Try `ulimit -n 262144 or similar (current limit is 131072).

The unit's LimitNOFILE is already 524288 on amd, and it still fails — the manydirs fixture tree is deep and wide enough that plocate reports the 131072 limit and exits 1. On 2026-11-15 that failure landed mid-nixos-rebuild switch, so switch-to-configuration counted the unit and exited status 4 even though the generation activated correctly.

Solution

services.locate.prunePaths = [ "/home/user/git/fleet" ].

~/git/fleet is generated worktrees plus watcher-bench corpora — no locate value — so pruning is the right fix rather than another fd-ceiling bump. Paths that do not exist on other hosts are harmless in PRUNEPATHS.

Verification

  • nix-instantiate --parse nixos/services/default.nix — OK
  • nixfmt --check nixos/services/default.nix — OK
  • Unit state on amd before the change: failed (Result: exit-code), journal names watcher-bench-195/fixtures/manydirs/d130875: Too many open files; /etc/updatedb.conf/ExecStart currently carry only the stock /tmp /var/tmp … /nix/store prune list.

Final acceptance (the unit completes on amd and a switch no longer risks a false failure) is verified after this config is deployed to amd; this PR supplies the prune entry.

Fixes #10589


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

updatedb walked ~/git/fleet/watcher-bench-195/fixtures/manydirs, exhausted
its fd limit, exited 1, and the failed unit made a healthy
nixos-rebuild switch report status 4. The fleet tree is generated
worktrees and bench corpora with no locate value, so add it to
services.locate.prunePaths instead of indexing it. LimitNOFILE is
already 524288 on amd; pruning removes the scanner's blowup rather
than raising the ceiling again.

Validated: nix-instantiate --parse and nixfmt --check on the module.
@dezren39
dezren39 requested a review from a team as a code owner November 16, 2026 04:37
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T04:37:59.566793Z
We couldn’t complete this review. Comment @codex review to try again.
ac81e07 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6ef9fb88-7ed2-4e68-bc83-267f702341bc
Commits

Reviewing files that changed from the base of the PR and between b84c351 and 2323c36.

Files selected for processing: 1

  • nixos/services/default.nix
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

Setting services.locate.prunePaths replaces the option default rather
than appending to it, so the first cut dropped /tmp, /var/cache,
/nix/store and the other stock prunes. Restate the default list with the
fleet tree appended, verified by evaluating
config.environment.etc."updatedb.conf".text.
@dezren39
dezren39 merged commit fb6d016 into main Nov 16, 2026
1 check passed
@dezren39
dezren39 deleted the sweep/10589-locate-prune branch November 16, 2026 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update-locatedb fails on watcher-bench manydirs fixture (too many open files) and trips switch failure reporting

1 participant