You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
…acefully
Original-Author: picnoir <[email protected]>
Inspired from
NixOS/nix@ced8d31
and adapted for Lix needs.
TL;DR: The topological sort should ensure that it is possible to delete
the path iterated upon. Nonetheless, in some cases,
`invalidatePathChecked` can still throw `PathInUse`, the exception
bubbles up and cancel the garbage collection procedure, leaving the rest
of the paths untouched. This change ensure that the error is logged for
further investigation but doesn't prevent the GC to continue when it
can.
After code review, we decided to make it a `printInfo` to inform the
user about sudden "in use" dependencies during garbage collection and
let them re-run garbage collection if they care about this.
References: NixOS/nix#11923
References: https://git.lix.systems/lix-project/lix/issues/621
Change-Id: I5606c9afd16b5faa747b713fde2dc24016990ba3
Signed-off-by: Raito Bezarius <[email protected]>
lf-
pushed a commit
to lix-project/lix
that referenced
this issue
Jan 23, 2025
…acefully
Original-Author: picnoir <[email protected]>
Inspired from
NixOS/nix@ced8d31
and adapted for Lix needs.
TL;DR: The topological sort should ensure that it is possible to delete
the path iterated upon. Nonetheless, in some cases,
`invalidatePathChecked` can still throw `PathInUse`, the exception
bubbles up and cancel the garbage collection procedure, leaving the rest
of the paths untouched. This change ensure that the error is logged for
further investigation but doesn't prevent the GC to continue when it
can.
After code review, we decided to make it a `printInfo` to inform the
user about sudden "in use" dependencies during garbage collection and
let them re-run garbage collection if they care about this.
References: NixOS/nix#11923
References: https://git.lix.systems/lix-project/lix/issues/621
Change-Id: I5606c9afd16b5faa747b713fde2dc24016990ba3
Signed-off-by: Raito Bezarius <[email protected]>
(cherry picked from commit 6a41dae)
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: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
outputAdditional context
Add any other context about the problem here.
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: