NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.77k stars 1.52k forks source link

Download buffer issue when building an SD image from a flake using github actions #11504

Open SpidFightFR opened 1 month ago

SpidFightFR commented 1 month ago

Describe the bug

Currently i'm trying to automatically build sd images of a nixos install for star64 , when i make a github action to compile the image, i end up having the following error:

warning: download buffer is full; consider increasing the 'download-buffer-size' setting

Right in the middle of building. I searched in the man page, on the internet... Nothing related to nix and download buffer size.

The error seem to come from nix so i come here a bit lost ngl...

Steps To Reproduce

  1. using github actions
  2. nix build .#sd-image-cross
  3. It ends up crashing
  4. See error

Expected behavior

It should make a full system image as a .img file that can be written to an sd card.

Additional context

The error i encounter here is when using act that allows to emulate the same env as github acitons. Here is my current action file

Priorities

Add :+1: to issues you find important.

edolstra commented 1 month ago

It's a warning, not an error. You can safely ignore it, or set download-buffer-size to a higher value than the default (64 MiB) if it annoys you.

cole-h commented 1 month ago

@SpidFightFR

It might be useful to qualify what "It ends up crashing" actually means, since that seems like the real issue, and the warning about "download buffer is full" is just a red herring.

SpidFightFR commented 1 month ago

@SpidFightFR

It might be useful to qualify what "It ends up crashing" actually means, since that seems like the real issue, and the warning about "download buffer is full" is just a red herring.

Hey, to be honest i don't know what's happening.

I tried to run nix build with -vvvvvv, the logs end with:

building of '/nix/store/2vivxdlhnd01700p3vrv05kkd6i8h44l-bash-riscv64-unknown-linux-gnu-5.2p32.drv^out' from .drv file: goal destroyed
lock released on '/nix/store/mpw2vsdhhm96a6g106gy732b4an4z0w1-stdenv-linux.lock'
building of '/nix/store/rf4q3gq52pcvx4m487m54clwfdrlxk1l-stdenv-linux.drv^out' from .drv file: goal destroyed
error: home directory '/homeless-shelter' exists; please remove it to assure purity of builds without sandboxing

I don't encounter this error on a native nixos install (outside of act), it just stops building out of nowhere. I wished i could tell you more, i just don't have any answers.

573 commented 2 weeks ago

I encounter a similar issue when building https://github.com/573/ipc2023/tree/f95f027eb10933e839f67db18e4e835677ee2073 on aarch64-linux. download buffer full occurs and then following this sequence of log entries:

download thread waiting for 100 ms curl: Recv failure: Software caused connection abort curl: OpenSSL SSL_read: Software caused connection abort, errno 103 curl: Failed receiving HTTP2 data: 56(Failure when receiving data from the peer) curl: Connection #1 to host codeload.github.com left intact finished download of 'https://github.com/typst/packages/archive/0bf668dc16b396c8fe811ef7de63b46fea7d62a0.tar.gz'; curl status = 56, HTTP status = 200, body = 353435648 bytes, duration = 167.28 s download thread waiting for 10000 ms ...

then the build breaks complains some files in the download are missing:

error: cannot read file 'packages-0bf668dc16b396c8fe811ef7de63b46fea7d62a0/packages/preview/ttt-exam/0.1.0/template/logo.jpg' from tarball download thread shutting down