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: use curl with blocking resolver #41619
Conversation
This reverts commit 5574df3. Instead we will use curl 7.60 with c-ares resolver.
Defaults to true since curl 7.60.
Success on x86_64-linux (full log) Attempted: curl, nix Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: curl, nix Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: curl, nix Partial log (click to expand)
|
LGTM, and I agree we should leave curl using default resolver (threaded) for most users. I haven't played with Nix when using blocking resolver-- does Nix work well with it, esp. since we use a single thread to drive downloads it'd be good to check things don't end up excessively serial or something. FWIW 7.59 had threaded resolver enabled by default as well (we used it), so I'm not sure if anyone's tried the blocking resolver? Looks like threaded was enabled by default ~7.55 bouncing through commit history. (Thanks for putting together these fixes, we certainly need to do something about this) |
Then curl/curl#2636 (comment) is not sufficient to explain our case, and I am not sure that this is not a curl bug after all. |
FWIW here's a branch that patches Nix to reduce sleep time when items are queued to the recommended duration: https://github.com/dtzWill/nixpkgs/tree/fix/nix-curl-760 (which fixes the badness I was experiencing re:7.60 vs 7.59) I'll make a PR on the nix repo to discuss the change/idea. |
Any updates on this pull request, please? |
Thank you for your contributions.
|
This is no longer relevant since 51ac3db. |
Motivation for this change
This is an alternative to #41452. Apparently curl threaded resolver enabled in 7.60 imposes additional restrictions on usage of its API that are not present with its blocking or asynchronous resolvers.
c-ares
based asynchronous resolver does not support nsswitch plugins. This change makes Nix continue using curl with blocking resolver.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)Tested that
nix-channel --update
does not wait for 10 seconds for DNS resolution.