New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 117655 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Respect nsswitch.conf when using HOSTS file with --enable-async-dns

Project Member Reported by szym@chromium.org, Mar 10 2012

Issue description

The common /etc/nsswitch.conf includes:
  hosts: files dns
meaning that the HOSTS file is checked before a DNS request is made.

However, if it says something else, we need to either abandon using HostResolverImpl::DnsTask or implement the proper logic. For instance:
  hosts: dns files
instructs to only use HOSTS if a DNS transaction fails.

The first step would be to determine how often users have a non-standard nsswitch.conf

 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 10 2013

Labels: -Area-Internals -Internals-Network-DNS Cr-Internals Cr-Internals-Network-DNS
Cc: k...@kandrsoft.com
Owner: ttuttle@chromium.org
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 9 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5f379e0e00068336aec9b4b78a49826b424152da

commit 5f379e0e00068336aec9b4b78a49826b424152da
Author: ttuttle <ttuttle@chromium.org>
Date: Mon Mar 09 20:45:23 2015

Revert "Async DNS: Remove toggle from about:flags"

This reverts commit eabf1f5baba38d46921acd6edda594f942f7d6a1.

Removing the toggle in about:flags breaks a workaround for users who
have nonstandard nsswitch configurations for hosts.

Revert the removal until we properly check nsswitch.conf before
assuming a standard configuration.

BUG=117655

Review URL: https://codereview.chromium.org/987133003

Cr-Commit-Position: refs/heads/master@{#319725}

[modify] http://crrev.com/5f379e0e00068336aec9b4b78a49826b424152da/build/ios/grit_whitelist.txt
[modify] http://crrev.com/5f379e0e00068336aec9b4b78a49826b424152da/chrome/app/generated_resources.grd
[modify] http://crrev.com/5f379e0e00068336aec9b4b78a49826b424152da/chrome/browser/about_flags.cc

Labels: M-41 M-42 Merge-Requested
This is a simple revert of an earlier change that broke non-default DNS configs for some Linux users. I'd like to merge it to stable, beta, and dev.

Comment 5 by amin...@google.com, Mar 9 2015

Labels: -Merge-Requested Merge-Review Hotlist-Merge-Review
[Automated comment] Reverts referenced in bugdroid comments, needs manual review.
Labels: -Merge-Review Merge-Rejected
Strings are frozen and this CL adds two new ones which do not appear to be translated in tc/ - as such, merge is rejected.  If we can merge a subset of this patch without the strings feel free to update the bug and re-request a merge.
Note: I don't think the fix we want here is to bring back about:flags. I think the fix we want is to disable async DNS on Linux until we have an nsswitch.conf workaround.

Comment 8 by szym@chromium.org, Mar 10 2015

I would suggest a fix similar to what is done on Mac: If there's such a custom (but very rare) configuration, then set DnsConfig.unhandled_options = true

See:
https://code.google.com/p/chromium/codesearch#chromium/src/net/dns/dns_config_watcher_mac.cc&sq=package:chromium&type=cs&l=101  (domain-specific resolvers on Mac)
or
https://code.google.com/p/chromium/codesearch#chromium/src/net/dns/dns_config_service_posix.cc&l=481 (TCP-only, etc.)


Okay, this is gonna be a bit messy; many distros insert mdns_minimal (for Avahi) between files and dns, so even if we just checked for a prefix of "dns files", we'd end up unconfigured on a lot of systems.

I'm checking if we have multicast DNS built in yet. If we do, we *might* be able to deal with those cases.

Comment 10 by szym@chromium.org, Mar 10 2015

The common default which we handle is "files dns" (that is the default on debian/ubuntu too). But yes, avahi inserts mdns_minimal after files.

There IS a multicast querier in net/dns. However, mdns4_minimal means "use mDNS if .local only", which is the same thing DnsClient does. So we handle that and [NOTFOUND=return] too.
Here's my /etc/nsswitch.conf:

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat

hosts:          files mdns4_minimal [NOTFOUND=return] prax dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

What I am seeing is that Chrome is bypassing the local DNS resolution stack (nsswitch.conf) and doing direct resolution against 8.8.8.8. This results in all of my .dev domains resolving as 127.0.53.53 from Google's DNS ...which is itself another issue with Google's DNS resolution.

Also, FWIW, without a network connection (unchecking "Enable Networking" in the networking applet, shutting down all interfaces via ifconfig, etc.) Google Chrome will actually resolve the .dev domain names correctly. This is not a very workable workaround though.
Project Member

Comment 13 by bugdroid1@chromium.org, Mar 11 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1a2a2738522cb00347f277e8e7d725a4e46ed053

commit 1a2a2738522cb00347f277e8e7d725a4e46ed053
Author: ttuttle <ttuttle@chromium.org>
Date: Wed Mar 11 22:06:13 2015

Async DNS: Disable on Linux until we parse nsswitch.conf

Right now, we don't examine nsswitch.conf, but we assume it has a
standard (hosts: files dns) configuration for hostname resolution.

We should check that that's true before activating the internal
resolver, and fall back to the OS resolver if it's not.

In the meantime, however, just disable Async DNS on Linux so it doesn't
break for users with nonstandard configurations.

BUG=117655

Review URL: https://codereview.chromium.org/990063004

Cr-Commit-Position: refs/heads/master@{#320160}

[modify] http://crrev.com/1a2a2738522cb00347f277e8e7d725a4e46ed053/chrome/browser/net/async_dns_field_trial.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Mar 12 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9687e96365b450552b101213185f32fd382d05f0

commit 9687e96365b450552b101213185f32fd382d05f0
Author: ttuttle <ttuttle@chromium.org>
Date: Thu Mar 12 17:33:17 2015

Revert "Revert "Async DNS: Remove toggle from about:flags""

I'm going to disable it on Linux entirely instead of restoring the flag.

I'll merge that disable to dev/beta/stable, then write a change that
actually examines nsswitch.conf to see if the hosts config is standard.

BUG=117655

Review URL: https://codereview.chromium.org/995833003

Cr-Commit-Position: refs/heads/master@{#320310}

[modify] http://crrev.com/9687e96365b450552b101213185f32fd382d05f0/build/ios/grit_whitelist.txt
[modify] http://crrev.com/9687e96365b450552b101213185f32fd382d05f0/chrome/app/generated_resources.grd
[modify] http://crrev.com/9687e96365b450552b101213185f32fd382d05f0/chrome/browser/about_flags.cc

Labels: Hotlist-Recharge
This issue likely requires triage.  The current issue owner may be inactive (i.e. hasn't fixed an issue in the last 30 days or commented in this particular issue in the last 90 days).  Thanks for helping out!

-Anthony
Owner: juliatut...@chromium.org
Owner: ----
Status: Available (was: Assigned)
Owner: mge...@chromium.org
Owner: gavinp@chromium.org
Status: Assigned (was: Available)
claiming this for now
Owner: mge...@chromium.org
Owner: ----
Status: Available (was: Assigned)
Components: -Internals

Sign in to add a comment