-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Race condition during GC #6757
Comments
Duplicate of #6572? |
Might not be a duplicate if the GC hypothesis is true, there was no GC during my reproducer of #6572. |
In another case, a client wins:
The GC does not recover from the exception. |
I can confirm this behaviour. I configured garbage collection to run automatically, and since then, I have started encountering missing output errors like this:
While the derivation specifies this output, it is unavailable in the store. My only explanation is that it got garbage collected. Rerunning the same build always results in the same error. I managed to fix it every time by running the build on the derivation file that is missing its output and then on the derivation that requires it. The next full build passes. |
@Cynerd these symptoms match with #6572, which was caused by a build dependency handling issue rather than a GC race. The problem has existed since Nix 2.8 and it requires either a garbage collection or a prior substitution of a single output before needing another from the same derivation. It has been solved for the upcoming 2.12 release and backports are in progress. |
@roberth It seems that you are right. I missed that issue. I am using Nix 2.11 at the moment, so yes it seems to match my issue. |
I wonder if the default |
Possibly resolved by Closing this until reconfirmed with a Nix version that incorporates that fix, such as >= 2.12.0, or a backport |
Describe the bug
I've encountered a
requires non-existing output
error when building during garbage collection.Steps To Reproduce
deleting '<store path>'
cd nixpkgs; nix-build -A nixosTests.nixops-unstable
error: derivation '/nix/store/8kwb4yi090vka3af8fi491l33y28lmlz-runtime-deps.drv' requires non-existent output 'bin' from input derivation '/nix/store/mh4dcqrvliqzn022ga737m25zn1l80yp-libidn2-2.3.2.drv'
The
.drv
was (still or again) present. It specifies abin
output, but the output was collected.Expected behavior
A concurrent build can succeed.
Any new paths that become referenced during the GC process are retained. Path creation+retention and deletion on the local and daemon stores are atomic procedures.
nix-env --version
outputnix-env (Nix) 2.8.1
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: