New issue
Advanced search Search tips

Issue 875845 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 22
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Feature



Sign in to add a comment

Allow stale DNS usage under ERR_NAME_NOT_RESOLVED

Project Member Reported by pauljensen@chromium.org, Aug 20

Issue description

Stale DNS and the "async DNS" resolver have had success at improving the reliability and latency of DNS in many circumstances.  However significant instances of ERR_NAME_NOT_RESOLVED are still not ameliorated by these two optimizations.  See internal bug b/29525886#comment134.  I think ERR_NAME_NOT_RESOLVED can come from a few different things:

1. The host isn't resolvable.  So a DNS server would return NXDOMAIN.  This is known to not be the case in the instances we've been monitoring however.
2. A device-local problem, such as lack of an Internet connection.  Generally these errors should be translated to ERR_INTERNET_DISCONNECTED, but the transition to ERR_INTERNET_DISCONNECTED is one tuned for few false positives, so in turn a connection that isn't fully completed or in the process of disconnecting could imaginably fall into this category.
3. The ISP's DNS server is misconfigured or broken.

In cases #2 and #3, if stale DNS results are available, using them is preferable to simply failing with ERR_NAME_NOT_RESOLVED.  At the very least experimenting with use of stale results in these cases should shed more light on the problem by giving more informative error codes (ERR_INTERNET_DISCONNECTED if device is later determined to actually be offline during TCP connect, ERR_TIMED_OUT if the Internet connection is broken, etc).
 
I prototyped a solution for this:
https://chromium-review.googlesource.com/c/chromium/src/+/1179998

I worried that the network error might overwrite the cached stale result, but I think r698664 should avoid the overwrite.  I could imagine an overwrite being possible if a very broken DNS server returned NXDOMAIN with a non-zero TTL, but hopefully that isn't common.
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 21

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

commit eb15d67821e37d0b4212f2671263937aa316aaaa
Author: Paul Jensen <pauljensen@chromium.org>
Date: Tue Aug 21 16:24:29 2018

[Cronet] Add option to use stale DNS when network resolver returns ERR_NAME_NOT_RESOLVED

Sometimes resolving a host name will result in ERR_NAME_NOT_RESOLVED even
though the host still should resolve.  This change adds an option to use
stale DNS results in these cases.

Bug:  875845 

Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I02b7a122bb9236f9ff47c73af8e4803315dcd382
Reviewed-on: https://chromium-review.googlesource.com/1179998
Commit-Queue: Paul Jensen <pauljensen@chromium.org>
Reviewed-by: Misha Efimov <mef@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584772}
[modify] https://crrev.com/eb15d67821e37d0b4212f2671263937aa316aaaa/components/cronet/stale_host_resolver.cc
[modify] https://crrev.com/eb15d67821e37d0b4212f2671263937aa316aaaa/components/cronet/stale_host_resolver.h
[modify] https://crrev.com/eb15d67821e37d0b4212f2671263937aa316aaaa/components/cronet/stale_host_resolver_unittest.cc
[modify] https://crrev.com/eb15d67821e37d0b4212f2671263937aa316aaaa/components/cronet/url_request_context_config.cc
[modify] https://crrev.com/eb15d67821e37d0b4212f2671263937aa316aaaa/tools/metrics/histograms/enums.xml

Status: Fixed (was: Started)

Sign in to add a comment