New issue
Advanced search Search tips

Issue 647389 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 659191



Sign in to add a comment

DnsConfigService Runs In Parallel To PreCreateThreads, Posting Work Before Browser Task Scheduler Redirection

Project Member Reported by robliao@chromium.org, Sep 15 2016

Issue description

0:000> ~
.  0  Id: 3928.5bd4 Suspend: 1 Teb: 002b3000 Unfrozen "CrBrowserMain"
#  3  Id: 3928.749c Suspend: 1 Teb: 002bc000 Unfrozen "DnsConfigService"

0:000> ~0kn20
 # ChildEBP RetAddr  
chrome_5c40000!ChromeBrowserMainParts::SetupMetricsAndFieldTrials+0x51a
0c 0019f358 0769ecb2 chrome_5c40000!ChromeBrowserMainParts::PreCreateThreadsImpl+0xfde
0d 0019f514 0739560b chrome_5c40000!ChromeBrowserMainParts::PreCreateThreads+0xb2

0:000> ~3kn20
 # ChildEBP RetAddr  
00 3603f0f8 037c73b4 base!base::WorkerPool::PostTask
01 3603f394 037c6f68 net!net::SerialWorker::WorkNow+0x134
02 3603f514 037c67d8 net!net::SerialWorker::OnWorkJobFinished+0x108
03 3603f520 037c6818 net!base::internal::FunctorTraits<void (__thiscall net::SerialWorker::*)(void),void>::Invoke<scoped_refptr<net::SerialWorker> const &>+0x18
04 3603f534 037c6864 net!base::internal::InvokeHelper<0,void>::MakeItSo<void (__thiscall net::SerialWorker::*const &)(void),scoped_refptr<net::SerialWorker> const &>+0x28
05 3603f544 037c7264 net!base::internal::Invoker<base::internal::BindState<void (__thiscall net::SerialWorker::*)(void),scoped_refptr<net::SerialWorker> >,void __cdecl(void)>::RunImpl<void (__thiscall net::SerialWorker::*const &)(void),std::tuple<scoped_refptr<net::SerialWorker> > const &,0>+0x34
06 3603f560 1003ee40 net!base::internal::Invoker<base::internal::BindState<void (__thiscall net::SerialWorker::*)(void),scoped_refptr<net::SerialWorker> >,void __cdecl(void)>::Run+0x24
07 3603f574 1007f8d0 base!base::Callback<void __cdecl(void),1>::Run+0x20
08 3603f5f8 100ec430 base!base::debug::TaskAnnotator::RunTask+0x150
09 3603f7e0 100ea0ec base!base::MessageLoop::RunTask+0x280
0a 3603f7f4 100ea772 base!base::MessageLoop::DeferOrRunPendingTask+0x2c
0b 3603f874 100f41a1 base!base::MessageLoop::DoWork+0xf2
0c 3603f888 100f5e8b base!base::MessagePumpForIO::DoRunLoop+0x21
0d 3603f8bc 100ec171 base!base::MessagePumpWin::Run+0x7b
0e 3603f994 1018f324 base!base::MessageLoop::RunHandler+0xc1

 
The thread object is constructed and run during PostMainMessageLoopStart, which is before PreCreateThreads.

Construction
0:000> kn20
 # ChildEBP RetAddr  
00 0019f33c 0357c392 net!net::NetworkChangeNotifierWin::DnsConfigServiceThread::DnsConfigServiceThread
01 0019f374 03559ef1 net!net::NetworkChangeNotifierWin::NetworkChangeNotifierWin+0x92
02 0019f388 115b9ac7 net!net::NetworkChangeNotifier::Create+0x41
03 0019f71c 115c06f0 content!content::BrowserMainLoop::PostMainMessageLoopStart+0x427
04 0019f818 115aed4f content!content::BrowserMainRunnerImpl::Initialize+0x2d0

Thread Start Request
0:000> kn20
 # ChildEBP RetAddr  
00 0019f33c 0357c392 net!net::NetworkChangeNotifierWin::DnsConfigServiceThread::DnsConfigServiceThread
01 0019f374 03559ef1 net!net::NetworkChangeNotifierWin::NetworkChangeNotifierWin+0x92
02 0019f388 115b9ac7 net!net::NetworkChangeNotifier::Create+0x41
03 0019f71c 115c06f0 content!content::BrowserMainLoop::PostMainMessageLoopStart+0x427
04 0019f818 115aed4f content!content::BrowserMainRunnerImpl::Initialize+0x2d0

Thread Start Request (For Real)
0:000> kn20
 # ChildEBP RetAddr  
00 0019f0b0 0357e1a1 base!base::Thread::StartWithOptions
01 0019f1a4 0357dd82 net!net::NetworkChangeNotifierWin::WatchForAddressChangeInternal+0xf1
02 0019f374 03559f0b net!net::NetworkChangeNotifierWin::WatchForAddressChange+0x152
03 0019f388 115b9ac7 net!net::NetworkChangeNotifier::Create+0x5b
04 0019f71c 115c06f0 content!content::BrowserMainLoop::PostMainMessageLoopStart+0x427

Comment 3 by gab@chromium.org, Oct 18 2016

Is this fixed? (i.e. since SWP redirection works and it was marked as blocking it?)
Blocking: -622400
Yeah, this isn't really blocking. Marking it as such.

Comment 5 by gab@chromium.org, Oct 25 2016

I don't understand, if it's still an issue why isn't it blocking and if it works without this fix, why do we care? Where does it post to? I'd like all the bugs to create to be blocking another one (at least our meta bug), so that we keep a tree of our work rooted at our meta bug for posterity.

Comment 6 by fdoray@chromium.org, Oct 25 2016

Blocking: 659191
From the callstack, it seems that this blocks migrating WorkerPool to TaskScheduler. Nothing is broken for now because we didn't start this migration.
Yup, I can confirm this is a WorkerPool issue.

Comment 8 by gab@chromium.org, Nov 7 2016

Components: Internals>TaskScheduler

Comment 9 by gab@chromium.org, Sep 26 2017

Status: Fixed (was: Available)
Calling this one fixed as we now support this paradigm (posting before starting threads).

Comment 10 by gab@chromium.org, Sep 26 2017

Cc: -fdoray@chromium.org
Owner: fdoray@chromium.org

Sign in to add a comment