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

Issue 239657 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2013
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Crash with async DNS when nameserver rotation enabled and socket pools are exhausted

Reported by kkania@chromium.org, May 9 2013

Issue description

It looks like the problem starts in dns_transaction.cc where the server_index is computed by adding first_server_index_ + (attempt# % server count). first_server_index_ itself is rotated however via calls to DnsSession::NextFirstServerIndex though, leading to the crash where server_index > pool size.

LOG:
[31900:31920:0509/151033:WARNING:dns_socket_pool.cc(85)] Failed to connect socket: -10
[31900:31920:0509/151033:WARNING:dns_socket_pool.cc(189)] No DNS sockets available in pool 0!
[31900:31920:0509/151033:WARNING:dns_socket_pool.cc(85)] Failed to connect socket: -10
[31900:31920:0509/151033:WARNING:dns_socket_pool.cc(189)] No DNS sockets available in pool 1!
[31900:31920:0509/151033:FATAL:dns_socket_pool.cc(184)] Check failed: server_index < pools_.size() (2 vs. 2)
[0x7f94e0ee0f04] base::debug::StackTrace::StackTrace()
[0x7f94e0f0ba79] logging::LogMessage::~LogMessage()
[0x7f94e108d521] net::DefaultDnsSocketPool::AllocateSocket()
[0x7f94e108b77f] net::DnsSession::AllocateSocket()
[0x7f94e1094740] net::(anonymous namespace)::DnsTransactionImpl::MakeAttempt()
[0x7f94e109571a] net::(anonymous namespace)::DnsTransactionImpl::ProcessAttemptResult()
[0x7f94e1093989] net::(anonymous namespace)::DnsTransactionImpl::Start()
[0x7f94e0ff281e] net::HostResolverImpl::DnsTask::Start()
 
--disable-async-dns gets around this
Cc: szym@chromium.org

Comment 3 by szym@chromium.org, May 10 2013

Cc: -szym@chromium.org
Owner: szym@chromium.org
Status: Started
Thanks for catching and diagnosing this bug.
Project Member

Comment 4 by bugdroid1@chromium.org, May 10 2013

------------------------------------------------------------------------
r199402 | szym@chromium.org | 2013-05-10T06:15:51.708117Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/net/dns/dns_transaction_unittest.cc?r1=199402&r2=199401&pathrev=199402
   M http://src.chromium.org/viewvc/chrome/trunk/src/net/dns/dns_transaction.cc?r1=199402&r2=199401&pathrev=199402

[net/dns] Fix how DnsTransaction computes next server index after fallback.

BUG= 239657 
TEST=net_unittests --gtest_filter=DnsTransactionTest.ServerFallbackAndRotate

Review URL: https://chromiumcodereview.appspot.com/14676012
------------------------------------------------------------------------

Comment 5 by szym@chromium.org, May 10 2013

Status: Fixed

Sign in to add a comment