-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Nix 2.21.x -> 2.22.x download buffer is full
on CentOS 7
#10630
Comments
@MatthewCroughan have you found a workaround? |
@bodokaiser Other than using a Nix release prior to this, no. I wanted to perform a time consuming |
@MatthewCroughan How did you perform the downgrade? Did you uninstall nix and just installed an older nix, or could you use Did you disable SELinux? Are you using the multi-user install? Is there a proxy in your network? (I also have multiple problems including the cache's SSL due to a proxy - trying to disentangle them) |
I am having similar issues but on a different setup. I am running docker on a fedora host. Everything is fine on the host but in the docker container (devpod) nix builds are really slow. They dont fail, just take really long. The logs (-vvvvv) show hundreds of lines like this:
I have not verified that downgrading makes things better but right now I am on 2.23. I am really not sure but maybe the issue is related: #11249 |
Have you checked if you have enough space for your cache dir? This was the limitation for me in the endOn 7. Aug 2024, at 15:26, Lentilus ***@***.***> wrote:
I am having similar issues but on a different setup. I am running docker on a fedora host. Everything is fine on the host but in the docker container (devpod) nix builds are really slow. They dont fail, just take really long. The logs (-vvvvv) show hundreds of lines like this:
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download buffer is full; going to sleep
download buffer is full; going to sleep
download thread waiting for 100 ms
download buffer is full; going to sleep
I have not verified that downgrading makes things better but right now I am on 2.23. I am really not sure but maybe the issue is related: #11249
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Can you elaborate on that? Do you mean the store directory or is there an additional cache that I don't know about? On my host I have about 100GiB of free disk.
I think this means that the container should have access to the full 100GiB, because there is no flag that suggests otherwise... |
Yes, sure. In addition to /store, nix uses $USER/.cache.In our case, the user directories were on a network drive which limits the total size of a user directory to 10 GB. As you said that you are using nix inside a Docker container, it could very well be that you have some space restrictions.Maybe you can mount $user/.cache to the host systemFor us, we changed the env variable XDG_CACHE_HOME (double check if this is the correct name, I am not at home right now to check the correct name), to something pointing on the local hard drive instead of the users home drive being a network share.On 7. Aug 2024, at 20:26, Lentilus ***@***.***> wrote:
Can you elaborate on that? Do you mean the store directory or is there an additional cache that I don't know about? On my host I have about 100GiB of free disk.
The logs from devpod tell me that the container is started using the following command
19:49:05 debug Running docker command: docker run --sig-proxy=false --mount type=bind,src=/home/lentilus/git/2ndpod,dst=/workspaces/2ndpod -u root -e DEVPOD=true -e REMOTE_CONTAINERS=true -l dev.containers.id=2ndpod-def-e4a1c -l devcontainer.metadata=[{"id":"ghcr.io/devcontainers/features/common-utils:2"},{"id":"ghcr.io/devcontainers/features/git:1"},{"remoteUser":"vscode"},{"entrypoint":"/usr/local/share/nix-entrypoint.sh"},{"onCreateCommand":{"":["sudo chsh -s /usr/bin/zsh $USER"]}}] -l devpod.user=root -d --entrypoint /bin/sh vsc-2ndpod-1e65f:devpod-1a149c9eba5e1e523404f67734dea86e -c echo Container started
trap "exit 0" 15
/usr/local/share/nix-entrypoint.sh
exec "$@"
while sleep 1 & wait $!; do :; done -
I think this means that the container should have access to the full 100GiB, because there is no flag that suggests otherwise...
And nixpkgs#hello should not be all that big after all.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@lentilus This sounds like it could be solved by #11171 ie
Nixpkgs itself is pretty big though, and it's written to a cache that's implemented by means of a git repo in |
Thanks @bodokaiser for the details! Unfortunately the size of the cache dir did not seem to be the issue. This may be a stupid question, but is there any way around building nix from source to check if #11171 fixes it? The commit is quite recent and not present in any of the releases, right? |
It's in Nix 2.24, available as |
#11171 fixed it. Thank you so much @bodokaiser and @roberth ! |
@MatthewCroughan could you also give it a try? |
@roberth Although downloading seems to be solved, and the log line "download buffer is full" is no longer spammed, another issue has occured. Nix claims the download is finished, and then begins extracting the tarball, but this process hangs indefinitely and does not respond to
|
@MatthewCroughan Maybe extraction was just very very slow - could you try #11330? It speeds up extraction significantly on hosts with limited I/O operations per second. If that doesn't solve the problem, I think we'll need a stack trace from the running process using |
@roberth Sadly it doesn't seem to, it would be nice to reproduce this in a VM test or something. The issue is the same as before, unpacking hangs indefinitely and doesn't respond to ^C. I'll ping you about the stack trace. |
@roberth I'm now experiencing this same behavior on my personal NixOS machine(s) after updating to 2.25.x, where a |
I had |
Describe the bug
When using CentOS 7, I ran into an issue with nix versions 2.21.x through to 2.22.x, where builtin fetchers such as those
triggered when running
nix build nixpkgs#hello
fill up a buffer and fail to fetch.Downgrading to Nix 2.18.1 or 2.18.2 makes this issue stop.
When running
nix build nixpkgs#hello
, nix will fail to download the GitHub tarball. Running with-vvv
shows the followingEventually, the download fails and the following error is emitted
Steps To Reproduce
nix build nixpkgs#hello
Expected behavior
For Nix to successfully download and unpack the tarball.
nix-env --version
outputAdditional context
I'm sorry I can't provide more helpful steps to reproduce the bug, though I'm happy to help if anyone can instruct me on what to run.
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: