de58cd6e80d3ab2ae6ec9e0a5a12c8e0b003f308
There's a race condition where awaitData could early-return for data coming from a 404 response or similar and thus not rethrow the exception that is forthcoming, and a related race during transfer setup (which could retry a transfer *twice* per retry round). This would then cause substitution failures like below since the exception isn't caught in HttpBinaryCacheStore::getFile as intended, but instead by an exception handler downstream of `drain()` which would error out the entire operation. Symptom: » nix-build ./docs-service.nix -o "docs-service-result" error: unable to download 'https://cache.nixos.org/7mr3fy8w66gi5inmf0jkkkl90lxy4jyg.narinfo': HTTP e rror 404 () response body: This is kind of a hack in how it is implemented: it assumes that you can't intentionally be receiving a large unsuccessful response since in such a case, `awaitData` will wait for finish() to be called to throw an exception and will never escape until the download finishes, while continuing to buffer the entire response into memory, which could be bad if an error response had a large payload. That said, nobody is sending Lix 1GiB of 404, so meh I guess, and this is how it is seemingly intended to work. That was a design flaw of the thing before any of the Lix team got our paws on it. I tested this by adding _exit(0) inside the expected exception catch and then running the offending command repeatedly to see if the symptom ever appeared again, and it did not. Needs cherry-pick to 2.92 and a 2.92.1 release once reviewed. Fixes: https://git.lix.systems/lix-project/lix/issues/635 Co-Authored-By: lix@jade.fyi Change-Id: If54f6eeaad60b5ca9d5b77d4d9232da1d295e7d1
Lix
Lix is an implementation of Nix, a powerful package management system for Linux and other Unix systems that makes package management reliable and reproducible.
Read more about us at https://lix.systems.
Installation
On Linux and macOS the easiest way to install Lix is to run the following shell command (as a user other than root):
$ curl -sSf -L https://install.lix.systems/lix | sh -s -- install
For systems that already have a Nix implementation installed, such as NixOS systems, read our install page
Building And Developing
See our Hacking guide in our manual for instruction on how to to set up a development environment and build Lix from source.
Additional Resources
License
Lix is released under LGPL-2.1-or-later.
Description
Working fork of Lix - carries the adaptive load-aware build-remote patch. Upstream: gerrit.lix.systems
92 MiB
Languages
C++
74.9%
Python
11.7%
Nix
6.1%
Shell
3.6%
Meson
2%
Other
1.6%