-
-
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
ca-derivations: warning: output out of input /nix/store/xyz.drv missing, aborting the resolving #6700
Comments
I see (roughly) the same thing with nix 2.9.1. error: derivation '/nix/store/h3m67kyhkwbdg795nj5ra5j2pqdy5k4a-libpng-1.2.59.drv' doesn't have expected output 'dev' (derivation-goal.cc/resolvedFinished,realisation) Redoing the build typically fixes it. I made a script to just keep retrying until status code == 0 😜 |
I would have expected that post 2.7 would have been more robust wrt this kind of breakages (because of #6221), but apparently it's not :/ Unfortunately I can't really reproduce, but I think both issues might be different since the first one appears at the beginning of the build and the second one at the end.
|
Yeah there errors I'm seeing are a bit different, not sure if they're the same underlying problem. It may be hard to reproduce without building a lot of things in parallel across different builders... I don't know if that's what triggers it but that's always where I've seen it. I could try doing a full build locally and without parallelism and see if it comes up but it will take long time. I already have a framework for retrying on certain kinds of crashes, may be able to plug that new error in. But sounds like I should try upgrading to 2.8 also? That may take a while but we should do it eventually anyway. The upgrade to 2.4 took about a year but hopefully things are better now.
Oh interesting, I didn't know it existed. When run on a drv it does seem to give the outPath, which is exactly what I was looking for! So I guess this is the new |
BTW, I can now pretty easily reproduce this. Even after implementing a retry, it'll fail so much that on every single build it exceeds the 3 try maximum every time. Each time it makes a bit of progress, but somehow I stumbled across something that causes the error very frequently. Is there anything I can do to gather more data? This is still on nix 2.4 BTW. An alternate path would be to work on upgrading to 2.10 just to eliminate old version as a possibility. Just to be clear, this is the problem with |
I can also confirm this behaviour on 2.10.3; let me know if there is any debugging that would be helpful |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/tweag-nix-dev-update-40/23480/1 |
check the store for input before failing (hopefully fix #6700)
Wow, this is good news. Unfortunately my old code to use ca-derivations has surely gotten quite obsolete, so it'll take some time to bring it back to test this. I'll put it on the queue though! |
Describe the bug
When enabling
ca-derivations
, if I build a bunch of drvs that use it or are downstream from one that does, I frequently get a crash like:This seems to preceded by this in the nix-daemon journal:
From the source it looks like
tryResolve
warns about the failure, but it's actually an error not a warning, because next thing an assert trips over it.However, it is incorrect about the drv failing, because it is in fact either generated. I can no longer check that non-invasively due to ca-derivations breaking drv->out and (apparently?) not expose its internal lookup mechanism, but
nix-store -r
instantly gives me the output so it must have worked. So if I just continually retry the build until the error stops happening, then it is able to get all the way through.Steps To Reproduce
I only started getting this when I started doing remote builds, so it's probably related to either that or a certain amount of parallelism.
nix-env --version
output2.4.1. I'm not sure if newer versions have fixed this, but I couldn't find any references in closed issues. I'll try updating to 2.8, but it's tricky due to nix's lack of cross version support and tendency to introduce new bugs.
The text was updated successfully, but these errors were encountered: