Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nix GC cannot delete a path because it is in use #11923

Open
picnoir opened this issue Nov 20, 2024 · 0 comments
Open

Nix GC cannot delete a path because it is in use #11923

picnoir opened this issue Nov 20, 2024 · 0 comments
Labels

Comments

@picnoir
Copy link
Member

picnoir commented Nov 20, 2024

Describe the bug

I recently faced a bug that I assume is coming from the topoSortPaths function where the GC was trying to delete a path having some alive referrers. The GC run service was constantly failing with the error message:

error: cannot delete path '/nix/store/r1lp9kxlrc6h7vrba90gm6i94s31xvvx-gnugrep-3.11' because it is in use by '/nix/store/911x30h15lbfg5fkkabzjhars2svbnaa-stdenv-linux'

I resolved this by manually deleting the faulty path referrers using nix-store --query --referrers and nix store delete. I sadly can't reproduce this bug. It seems to happen extremely infrequently.

Steps To Reproduce

I can't reproduce the issue

Expected behavior

The GC garbage collects all the referrers before GC-ing a path.

nix-env --version output

Additional context

Add any other context about the problem here.

Priorities

Add 👍 to issues you find important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant