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

[Backport 2.19-maintenance] Fix crash when NAR is missing from binary cache #9810

Merged
merged 3 commits into from
Jan 19, 2024

Conversation

github-actions[bot]
Copy link

Automatic backport to 2.19-maintenance, triggered by a label in #9804.

In the "discard" case (i.e. when the store path already exists
locally), when we call parseDump() from a Finally and it throws an
exception (e.g. if the download of the NAR fails), Nix crashes:

   terminate called after throwing an instance of 'nix::SubstituteGone'
     what():  error: file 'nar/06br3254rx4gz4cvjzxlv028jrx80zg5i4jr62vjmn416dqihgr7.nar.xz' does not exist in binary cache 'http://localhost'
   Aborted (core dumped)

(cherry picked from commit a18d8d6)
In rare cases (e.g. when using allowSubstitutes = false), it's
possible that we simultaneously have a DerivationGoal *and* a
SubstitutionGoal building the same path. So if a DerivationGoal
already built the path while the SubstitutionGoal was waiting for a
download slot, it saves us a superfluous download to exit early.

(cherry picked from commit dca0a80)
@github-actions github-actions bot requested a review from thufschmitt as a code owner January 19, 2024 08:39
@edolstra edolstra merged commit f1788c4 into 2.19-maintenance Jan 19, 2024
1 check passed
@edolstra edolstra deleted the backport-9804-to-2.19-maintenance branch March 29, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant