Skip to content
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

preloadNSS / dns timeout #5384

Merged
merged 5 commits into from
Nov 25, 2021
Merged

preloadNSS / dns timeout #5384

merged 5 commits into from
Nov 25, 2021

Conversation

baloo
Copy link
Member

@baloo baloo commented Oct 14, 2021

@tomberek was reporting dns timeout when running commands like nix --version.

Reading glibc again, I stumbled upon __nss_configure_lookup which is actually exactly what we're trying to achieve.

I think this simplifies the workaround a lot as it does not rely on a side-effect anymore, and is pretty straight-forward to understand.

src/libmain/shared.cc Outdated Show resolved Hide resolved
We can actually just load nss ourselves and call in nss to configure it
and we don't need to run a dummy query entirely to have nss load nss_dns
as a side-effect.

Signed-off-by: Arthur Gautier <[email protected]>
Signed-off-by: Arthur Gautier <[email protected]>
src/libmain/shared.cc Outdated Show resolved Hide resolved
Signed-off-by: Arthur Gautier <[email protected]>
@tomberek
Copy link
Contributor

Builds on x86_64-linux. Limited testing of both nix and nix-static. While the method utilized is simpler and more appropriate, it does have the GNU-specific requirement. Would be good to explain/document the various nix/nix-static/darwin/etc implications and test them.

@baloo
Copy link
Member Author

baloo commented Oct 16, 2021

@tomberek I pushed a comment, let me know what you think or if there is anything missing.

src/libmain/shared.cc Outdated Show resolved Hide resolved
src/libmain/shared.cc Outdated Show resolved Hide resolved
@baloo
Copy link
Member Author

baloo commented Oct 26, 2021

@edolstra any chance to get a merge on this one?

@edolstra edolstra merged commit 5fcf7f0 into NixOS:master Nov 25, 2021
baloo added a commit to baloo/nix-1 that referenced this pull request Nov 25, 2021
baloo added a commit to baloo/nix-1 that referenced this pull request Nov 25, 2021
baloo added a commit to baloo/nix-1 that referenced this pull request Nov 25, 2021
@baloo baloo deleted the baloo/dns-timeout branch November 25, 2021 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants