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

Issue metadata

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

Sign in to add a comment

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

Reported by, May 9 2013 Project Member

Issue description

It looks like the problem starts in 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.

[31900:31920:0509/] Failed to connect socket: -10
[31900:31920:0509/] No DNS sockets available in pool 0!
[31900:31920:0509/] Failed to connect socket: -10
[31900:31920:0509/] No DNS sockets available in pool 1!
[31900:31920:0509/] 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()

Comment 1 by, May 9 2013

--disable-async-dns gets around this

Comment 2 by, May 10 2013


Comment 3 by, May 10 2013

Status: Started
Thanks for catching and diagnosing this bug.

Comment 4 by, May 10 2013

Project Member
r199402 | | 2013-05-10T06:15:51.708117Z

Changed paths:

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

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

Review URL:

Comment 5 by, May 10 2013

Status: Fixed

Sign in to add a comment