Closed roberth closed 4 years ago
This can be reproduced with Nix only, so it's probably a bug in Nix's goal state machine in build.cc
, triggered by an incomplete output.
So we have a derivation with two outputs, out
and doc
, where out
will reference doc
.
They have been built, but doc
has been removed from the cache or was never necessary to be uploaded (for example the cache is only used for binaries)
out
to be validout
narinfo is fetched. out
depends on doc
doc
narinfo is fetched; is missingdoc
needs to be built. Build the drv
drv
may be substitutable, let's fetch out
. go to 2.Did you report it in nix? We saw this behavior in our CI as well on agent version 0.7.3.
Also, how do we work around it?
Here's the Nix issue https://github.com/NixOS/nix/issues/3964. So far I've assumed it was a one-off, but that doesn't seem to be the case.
To work around the issue, you could build it manually without the "broken" cache.
nix-store -r --option substituters https://cache.nixos.org /nix/store/....drv
If you have a single agent per architecture, you could run it there and have the agent pick up the output when you click Rebuild.
Alternatively, you could upload the outputs to the cache with cachix push
(nix-copy-closure
for those who don't use Cachix)
@jappeace Could you provide the derivation path? You can send it to support@hercules-ci.com if you prefer.
I send an email :ok_hand:
Update: Domen has improved Cachix to better avoid this bug.
I'm closing this in favor of https://github.com/NixOS/nix/issues/3964 but feel free to comment or contact support if this recurs.
Description
Log shows the same two dependencies being fetched over and over. Specifically, the subtree of a dependent of the missing path.
P -> A -> B
x -> y
: x needs yP
: what the agent is trying to buildA
: a path that is in a binary cacheB
: a path that is not in any binary cacheIt will keep trying to fetch
A
andB
.~I'm investigating whether this could be related to broken C++ exception handling https://gitlab.haskell.org/ghc/ghc/-/issues/11829~
~Agent 0.6 may be unaffected but other fixes have not been backported there and it does not have live logs.~
To Reproduce
Expected behavior
Exception is caught, dependency derivation is built as fallback.
Logs
Only
fv3...
exists, in the private cache.Platform / Version
darwin, 0.7.4