DNS resolution issues with curl 8.20 and systemd-resolved #1234
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
awaiting
author
awaiting
contributors
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
diagnostics
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
Importance
High
Importance
Low
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
Release Blocking
Non-urgent
Release Blocking
Urgent
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
Urgency
High
Urgency
Low
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#1234
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
Using Lix from nixpkgs after curl was upgraded from 8.19 to 8.20 while having some DNS settings with systemd-resolved with DNSOverTLS enabled, Lix usually hangs or times out during DNS resolution.
Steps To Reproduce
rm -rf ~/.cache/nix; nix flake show github:NixOS/nixpkgs -vvvvvExpected behavior
It should work as before, just like when disabling systemd-resolved or using curl 8.19. The download progress should be counting up in the first second and there should be no errors.
nix --versionoutputAdditional context
Curl 8.20 has this change that sounds related:
I can reproduce the issues when Lix is using curl 8.20.0, 8.21.0-rc3, but not with 8.19.0. I can reproduce this with Lix 2.94 and 2.95, but not with upstream Nix, nor nslookup or using the curl CLI, maybe I haven't tried hard enough with the latter.
I've tried to keep this issue narrow, but with this curl and DNS setup I've also had other problems:
nix flake update --commit-lock-file(but works after the 2/5 retry) with a cold cache:Here's a good log without DNS and using the default 8.20.0 curl: update-no-dns. I made some modifications to the logs for easier diffing between the logs (changing the exact >5000ms timing, changing the randomly generated paths and commits hashes, changing remaining rate limits...). I also used a different DNS resolver in the logs, not 1.1.1.1.
Thank you for the detailed logs!
We have a workaround in main (
cl/5705,071b810f95), and Nixpkgs also has a workaround (https://github.com/NixOS/nixpkgs/pull/534757), but it has not hit master or unstable yet.Short-term, you can use HEAD Lix, or revert to older Lix until Nixpkgs' PR hits. Long-term, we are working on tracking down this bug to hopefully report it clearly upstream, and hopefully reduce our dependence on Curl in general