New issue
Advanced search Search tips

Issue 779589 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , Chrome , Mac
Pri: 1
Type: Bug



Sign in to add a comment

Properly handle two DnsAttempts for the same transaction running at once

Project Member Reported by mge...@chromium.org, Oct 30 2017

Issue description

A lot of DnsTransaction code doesn't handle this case very well. It can be caused by either a timeout or an ERR_DNS_MALFORMED_RESPONSE. See  issue 768150  and  issue 774846  for examples. Both are fixable by adding more null checks but I have a feeling there are more bugs here.
 
Labels: -Pri-3 Pri-1
Owner: mge...@chromium.org
Status: Assigned (was: Available)
More cases:  issue 788131  and  issue 793099 .

I started thinking about possible fixes.

One source of problems is that the tracking for which attempts are using which entry on the search list isn't great. This could be fixed by pulling the search list up a layer into the DnsTask, which I think is the right place for it anyway.

The weird ERR_DNS_MALFORMED_RESPONSE behavior might be okay to delete, which would be way easier than fixing it. But I'll need to add some UMA to be sure.
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 14 2017

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

commit 79ec59bbc72be8f29b5ebe4895e3f6adbd6b6f75
Author: Miriam Gershenson <mgersh@chromium.org>
Date: Thu Dec 14 21:36:43 2017

Add histogram to track DNS outcomes after malformed responses

The special error handling for this case is strange and I want to delete
it. This histogram will track how often it's useful so we can decide
whether it's okay to delete.

Bug: 779589
Change-Id: Ieadcb1214486bd468e5e9c18d2f06915b6ee1fff
Reviewed-on: https://chromium-review.googlesource.com/822832
Reviewed-by: Julia Tuttle <juliatuttle@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Commit-Queue: Miriam Gershenson <mgersh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524188}
[modify] https://crrev.com/79ec59bbc72be8f29b5ebe4895e3f6adbd6b6f75/net/dns/dns_transaction.cc
[modify] https://crrev.com/79ec59bbc72be8f29b5ebe4895e3f6adbd6b6f75/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/79ec59bbc72be8f29b5ebe4895e3f6adbd6b6f75/tools/metrics/histograms/histograms.xml

Comment 4 by mge...@chromium.org, Mar 23 2018

Owner: ----
Status: Available (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, Jul 25

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

commit a640f0f14c77cb5b4cff7bd7565df35a71972e0f
Author: Bence Béky <bnc@chromium.org>
Date: Wed Jul 25 01:13:01 2018

Fail UDP DNS query upon malformed response.

Instead of continuing to wait for UDP data, fail the DNS query in
DnsUDPAttempt.  The motivation is to call the callback at most once, to
conform to //net convention.  See
https://docs.google.com/document/d/1CNq4plxEbprzXwkeIrEtwM4b-Na2ZOqw8UHPRK3t-1w
for analysis of data (restricted view).

Net.DNS.ResultAfterMalformedResponse histogram is removed in
follow-up CL https://crrev.com/c/1149112.

Bug: 779589
Change-Id: I0ef3c460e40cefe8160334cad17f9ef9abec3b39
Reviewed-on: https://chromium-review.googlesource.com/1146878
Commit-Queue: Bence Béky <bnc@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577761}
[modify] https://crrev.com/a640f0f14c77cb5b4cff7bd7565df35a71972e0f/net/dns/dns_transaction.cc
[modify] https://crrev.com/a640f0f14c77cb5b4cff7bd7565df35a71972e0f/net/dns/dns_transaction_unittest.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 30

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

commit 3267ea77ce1e470f86c4dc1547e5c9c0d2f46110
Author: Bence Béky <bnc@chromium.org>
Date: Mon Jul 30 12:37:29 2018

Deprecate Net.DNS.ResultAfterMalformedResponse histogram.

This is a follow-up to https://crrev.com/c/1146878.

Bug: 779589
Change-Id: I44a2ba9106d247843e846815f410719a1a59a1c7
Reviewed-on: https://chromium-review.googlesource.com/1149112
Reviewed-by: Steven Holte <holte@chromium.org>
Commit-Queue: Bence Béky <bnc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579021}
[modify] https://crrev.com/3267ea77ce1e470f86c4dc1547e5c9c0d2f46110/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/3267ea77ce1e470f86c4dc1547e5c9c0d2f46110/tools/metrics/histograms/histograms.xml

Cc: ericorth@chromium.org
Planning in the next quarter or so to look into rewriting and cleaning up a lot of the relevant scheduling logic in DnsTransaction, so I'll see if there's anything else to improve here then.
Labels: Enterprise-Triaged

Sign in to add a comment