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

Firefox takes 30+ seconds to start if networking.hostName is not in DNS resolution #45671

Closed
redfish64 opened this issue Aug 27, 2018 · 4 comments
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

Comments

@redfish64
Copy link
Contributor

Issue description

I believe this started happening with Firefox 60.0+. If networking.hostName in configuration.nix is set to a nonexistent name, firefox seems to try and resolve the hostname for 30 seconds before starting up. I have no addons or plugins installed.

I found a workaround, where if I add the following to configuration.nix (replacing "yellowhat" with whatever networking.hostName has been set to), will fix the problem:

networking.extraHosts = ''
127.0.0.1 yellowhat
'';

Not sure what the fix should be. Maybe the networking.hostName should be automatically added to /etc/hosts?

Steps to reproduce

Set networking.hostName in configuration.nix to a unresolveable hostname.
Start firefox

Technical details

I figured this out by running strace against firefox and getting:

connect(7, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.42.129")}, 16) = 0
poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
sendto(7, "\232m\1\0\0\1\0\0\0\0\0\1\tyellowhat\0\0\1\0\1\0\0)\4\260"..., 38, MSG_NOSIGNAL, NULL, 0) = 38
poll([{fd=7, events=POLLIN}], 1, 5000) = 0 (Timeout)
socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 8
connect(8, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.0.1")}, 16) = 0
poll([{fd=8, events=POLLOUT}], 1, 0) = 1 ([{fd=8, revents=POLLOUT}])
sendto(8, "\232m\1\0\0\1\0\0\0\0\0\1\tyellowhat\0\0\1\0\1\0\0)\4\260"..., 38, MSG_NOSIGNAL, NULL, 0) = 38
poll([{fd=8, events=POLLIN}], 1, 5000) = 0 (Timeout)
poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
sendto(7, "\232m\1\0\0\1\0\0\0\0\0\1\tyellowhat\0\0\1\0\1\0\0)\4\260"..., 38, MSG_NOSIGNAL, NULL, 0) = 38
poll([{fd=7, events=POLLIN}], 1, 5000) = 0 (Timeout)
poll([{fd=8, events=POLLOUT}], 1, 0) = 1 ([{fd=8, revents=POLLOUT}])
sendto(8, "\232m\1\0\0\1\0\0\0\0\0\1\tyellowhat\0\0\1\0\1\0\0)\4\260"..., 38, MSG_NOSIGNAL, NULL, 0) = 38

192.168.42.129 is my dns entry in /etc/resolv.conf and "yellowhat" is my chosen hostname

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

[tim@yellowhat:~]$ nix-shell -p nix-info --run "nix-info -m"

  • system: "x86_64-linux"
  • host os: Linux 4.14.63, NixOS, 18.09pre149415.8395f9aa85e (Jellyfish)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.0.4
  • channels(tim): "nixpkgs-18.09pre149415.8395f9aa85e"
  • channels(root): "nixos-18.09pre149415.8395f9aa85e"
  • nixpkgs: /home/tim/.nix-defexpr/channels/nixpkgs
@xaverdh
Copy link
Contributor

xaverdh commented Oct 12, 2018

I have the same issue with mutt.

@oxij
Copy link
Member

oxij commented Oct 12, 2018 via email

@oxij
Copy link
Member

oxij commented Feb 18, 2019 via email

@stale
Copy link

stale bot commented Jun 3, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2020
@mweinelt mweinelt closed this as completed Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

No branches or pull requests

4 participants