New issue
Advanced search Search tips

Issue 784293 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Dec 4
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Flaky DCHECK in SiteProcessCountTracker::~SiteProcessCountTracker

Project Member Reported by pastarmovj@chromium.org, Nov 13 2017

Issue description

When ForceEphemeralProfiles policy is set Chrome DCHECKs sometimes on start while deleting stale profiles with the following stack trace:

Seems to be a race between deleting the profile and initializing it. I could not reproduce this reliably and it doesn't sound too dangerous but I thought I will file it for inspection at least. 

@clamy: Assigning to you since you are author of the code that contains the DCHECK.

[59576:16224:1113/084643.718:FATAL:render_process_host_impl.cc(783)] Check failed: map_.empty(). 
Backtrace:
	base::debug::StackTrace::StackTrace [0x0000000000971CD8+104] (C:\src\chromium\src\base\debug\stack_trace_win.cc:286)
	base::debug::StackTrace::StackTrace [0x000000000097092F+31] (C:\src\chromium\src\base\debug\stack_trace.cc:199)
	logging::LogMessage::~LogMessage [0x00000000009E7873+131] (C:\src\chromium\src\base\logging.cc:581)
	content::`anonymous namespace'::SiteProcessCountTracker::~SiteProcessCountTracker [0x000000001778F689+217] (C:\src\chromium\src\content\browser\renderer_host\render_process_host_impl.cc:783)
	content::`anonymous namespace'::SiteProcessCountTracker::~SiteProcessCountTracker [0x000000001778EDAC+44] (C:\src\chromium\src\content\browser\renderer_host\render_process_host_impl.cc:783)
	std::default_delete<base::SupportsUserData::Data>::operator() [0x0000000000B82D3F+63] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\memory:1999)
	std::unique_ptr<base::SupportsUserData::Data,std::default_delete<base::SupportsUserData::Data> >::~unique_ptr [0x0000000000B8285B+75] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\memory:2204)
	std::pair<const void *const,std::unique_ptr<base::SupportsUserData::Data,std::default_delete<base::SupportsUserData::Data> > >::~pair [0x0000000000B84737+23] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\utility:92)
	std::_Default_allocator_traits<std::allocator<std::_Tree_node<std::pair<const void *const,std::unique_ptr<base::SupportsUserData::Data,std::default_delete<base::SupportsUserData::Data> > >,void *> > >::destroy<std::pair<const void *const,std::unique_ptr<b [0x0000000000B84688+24] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\xmemory0:863)
	std::_Tree<std::_Tmap_traits<const void *,std::unique_ptr<base::SupportsUserData::Data,std::default_delete<base::SupportsUserData::Data> >,std::less<const void *>,std::allocator<std::pair<const void *const,std::unique_ptr<base::SupportsUserData::Data,std: [0x0000000000B8446F+143] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\xtree:1997)
	std::_Tree<std::_Tmap_traits<const void *,std::unique_ptr<base::SupportsUserData::Data,std::default_delete<base::SupportsUserData::Data> >,std::less<const void *>,std::allocator<std::pair<const void *const,std::unique_ptr<base::SupportsUserData::Data,std: [0x0000000000B84432+82] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\xtree:1995)
	std::_Tree<std::_Tmap_traits<const void *,std::unique_ptr<base::SupportsUserData::Data,std::default_delete<base::SupportsUserData::Data> >,std::less<const void *>,std::allocator<std::pair<const void *const,std::unique_ptr<base::SupportsUserData::Data,std: [0x0000000000B83403+51] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\xtree:1392)
	std::_Tree<std::_Tmap_traits<const void *,std::unique_ptr<base::SupportsUserData::Data,std::default_delete<base::SupportsUserData::Data> >,std::less<const void *>,std::allocator<std::pair<const void *const,std::unique_ptr<base::SupportsUserData::Data,std: [0x0000000000B83015+261] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\xtree:1367)
	std::_Tree<std::_Tmap_traits<const void *,std::unique_ptr<base::SupportsUserData::Data,std::default_delete<base::SupportsUserData::Data> >,std::less<const void *>,std::allocator<std::pair<const void *const,std::unique_ptr<base::SupportsUserData::Data,std: [0x0000000000B82E51+145] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\xtree:2154)
	std::_Tree<std::_Tmap_traits<const void *,std::unique_ptr<base::SupportsUserData::Data,std::default_delete<base::SupportsUserData::Data> >,std::less<const void *>,std::allocator<std::pair<const void *const,std::unique_ptr<base::SupportsUserData::Data,std: [0x0000000000B82D98+24] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\xtree:975)
	std::map<const void *,std::unique_ptr<base::SupportsUserData::Data,std::default_delete<base::SupportsUserData::Data> >,std::less<const void *>,std::allocator<std::pair<const void *const,std::unique_ptr<base::SupportsUserData::Data,std::default_delete<base [0x0000000000B82BD3+19] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\map:72)
	base::SupportsUserData::~SupportsUserData [0x0000000000B89DA0+272] (C:\src\chromium\src\base\supports_user_data.cc:49)
	content::BrowserContext::~BrowserContext [0x000000001668EA9B+507] (C:\src\chromium\src\content\browser\browser_context.cc:568)
	Profile::~Profile [0x000000000D693E0A+138] (C:\src\chromium\src\chrome\browser\profiles\profile.cc:83)
	ProfileImpl::~ProfileImpl [0x000000000D87F303+723] (C:\src\chromium\src\chrome\browser\profiles\profile_impl.cc:762)
	ProfileImpl::~ProfileImpl [0x000000000D87970C+44] (C:\src\chromium\src\chrome\browser\profiles\profile_impl.cc:720)
	ProfileDestroyer::DestroyProfileWhenAppropriate [0x000000000D7E0E37+1271] (C:\src\chromium\src\chrome\browser\profiles\profile_destroyer.cc:66)
	ProfileManager::ProfileInfo::~ProfileInfo [0x000000000D687F50+32] (C:\src\chromium\src\chrome\browser\profiles\profile_manager.cc:1664)
	std::default_delete<ProfileManager::ProfileInfo>::operator() [0x000000000D687F0C+44] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\memory:1999)
	std::unique_ptr<ProfileManager::ProfileInfo,std::default_delete<ProfileManager::ProfileInfo> >::~unique_ptr [0x000000000D67AEEB+75] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\memory:2204)
	std::pair<const base::FilePath,std::unique_ptr<ProfileManager::ProfileInfo,std::default_delete<ProfileManager::ProfileInfo> > >::~pair [0x000000000D6806D2+34] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\utility:92)
	std::_Default_allocator_traits<std::allocator<std::_Tree_node<std::pair<const base::FilePath,std::unique_ptr<ProfileManager::ProfileInfo,std::default_delete<ProfileManager::ProfileInfo> > >,void *> > >::destroy<std::pair<const base::FilePath,std::unique_p [0x000000000D680618+24] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\xmemory0:863)
	std::_Tree<std::_Tmap_traits<base::FilePath,std::unique_ptr<ProfileManager::ProfileInfo,std::default_delete<ProfileManager::ProfileInfo> >,std::less<base::FilePath>,std::allocator<std::pair<const base::FilePath,std::unique_ptr<ProfileManager::ProfileInfo, [0x000000000D6803FF+143] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\xtree:1997)
	std::_Tree<std::_Tmap_traits<base::FilePath,std::unique_ptr<ProfileManager::ProfileInfo,std::default_delete<ProfileManager::ProfileInfo> >,std::less<base::FilePath>,std::allocator<std::pair<const base::FilePath,std::unique_ptr<ProfileManager::ProfileInfo, [0x000000000D67F393+51] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\xtree:1392)
	std::_Tree<std::_Tmap_traits<base::FilePath,std::unique_ptr<ProfileManager::ProfileInfo,std::default_delete<ProfileManager::ProfileInfo> >,std::less<base::FilePath>,std::allocator<std::pair<const base::FilePath,std::unique_ptr<ProfileManager::ProfileInfo, [0x000000000D67F1A5+261] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\xtree:1367)
	std::_Tree<std::_Tmap_traits<base::FilePath,std::unique_ptr<ProfileManager::ProfileInfo,std::default_delete<ProfileManager::ProfileInfo> >,std::less<base::FilePath>,std::allocator<std::pair<const base::FilePath,std::unique_ptr<ProfileManager::ProfileInfo, [0x000000000D67EFE1+145] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\xtree:2154)
	std::_Tree<std::_Tmap_traits<base::FilePath,std::unique_ptr<ProfileManager::ProfileInfo,std::default_delete<ProfileManager::ProfileInfo> >,std::less<base::FilePath>,std::allocator<std::pair<const base::FilePath,std::unique_ptr<ProfileManager::ProfileInfo, [0x000000000D67EF28+24] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\xtree:975)
	std::map<base::FilePath,std::unique_ptr<ProfileManager::ProfileInfo,std::default_delete<ProfileManager::ProfileInfo> >,std::less<base::FilePath>,std::allocator<std::pair<const base::FilePath,std::unique_ptr<ProfileManager::ProfileInfo,std::default_delete< [0x000000000D66B4F3+19] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\map:72)
	ProfileManager::~ProfileManager [0x000000000D693A7B+315] (C:\src\chromium\src\chrome\browser\profiles\profile_manager.cc:385)
	ProfileManager::~ProfileManager [0x000000000D67C65C+44] (C:\src\chromium\src\chrome\browser\profiles\profile_manager.cc:383)
	std::default_delete<ProfileManager>::operator() [0x000000000A2B5530+64] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\memory:1999)
	std::unique_ptr<ProfileManager,std::default_delete<ProfileManager> >::reset [0x000000000A2A4E34+100] (c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\include\memory:2239)
	BrowserProcessImpl::StartTearDown [0x000000000A2A4463+1139] (C:\src\chromium\src\chrome\browser\browser_process_impl.cc:337)
	ChromeBrowserMainParts::PostMainMessageLoopRun [0x000000000A1E0D83+771] (C:\src\chromium\src\chrome\browser\chrome_browser_main.cc:1961)
	content::BrowserMainLoop::ShutdownThreadsAndCleanUp [0x00000000166AE064+884] (C:\src\chromium\src\content\browser\browser_main_loop.cc:1245)
	content::BrowserMainRunnerImpl::Shutdown [0x00000000166C944C+1516] (C:\src\chromium\src\content\browser\browser_main_runner.cc:202)
	content::BrowserMain [0x00000000166A1CD7+295] (C:\src\chromium\src\content\browser\browser_main.cc:50)
	content::RunNamedProcessTypeMain [0x0000000019B44CCC+220] (C:\src\chromium\src\content\app\content_main_runner.cc:427)
	content::ContentMainRunnerImpl::Run [0x0000000019B45C4A+650] (C:\src\chromium\src\content\app\content_main_runner.cc:705)
	content::ContentServiceManagerMainDelegate::RunEmbedderProcess [0x0000000019B40D7A+42] (C:\src\chromium\src\content\app\content_service_manager_main_delegate.cc:51)
	service_manager::Main [0x000000002D6385BD+1341] (C:\src\chromium\src\services\service_manager\embedder\main.cc:456)
	content::ContentMain [0x0000000019B44B32+82] (C:\src\chromium\src\content\app\content_main.cc:19)
	ChromeMain [0x000000000777ED13+419] (C:\src\chromium\src\chrome\app\chrome_main.cc:125)
	MainDllLoader::Launch [0x0000000140031024+1124] (C:\src\chromium\src\chrome\app\main_dll_loader_win.cc:199)
	wWinMain [0x0000000140023DF9+1193] (C:\src\chromium\src\chrome\app\chrome_exe_main_win.cc:230)
	invoke_main [0x00000001402D83BD+45] (f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:123)
	__scrt_common_main_seh [0x00000001402D8277+295] (f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283)
	__scrt_common_main [0x00000001402D813E+14] (f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:326)
	wWinMainCRTStartup [0x00000001402D8449+9] (f:\dd\vctools\crt\vcstartup\src\startup\exe_wwinmain.cpp:17)
	BaseThreadInitThunk [0x00007FFB49498364+20]
	RtlUserThreadStart [0x00007FFB49B57091+33]


 

Comment 1 by grt@chromium.org, Nov 24 2017

Components: Blink>ServiceWorker UI>Browser>Navigation
Labels: -Pri-3 Pri-1
Status: Assigned (was: Untriaged)
This is causing a high flake rate in browser_tests, leading to slower build cycles and occasional redness. Please either fix this as soon as possible or assign it to someone who can. Thank you.

(See https://chromium-swarm.appspot.com/task?id=3a060f1bcffe1010&refresh=10&show_raw=1 for one example from Win7 Tests (dbg)(1))
I'm having a similar problem with some Chrome OS browser_tests, while debugging  issue 789324 .

If I build debug, target_os=chromeos and hack around an IO thread crash with https://chromium-review.googlesource.com/#/c/chromium/src/+/797473 I can repro the DCHECK on the browser thread during shutdown:

out/Debug/browser_tests --gtest_filter="DefaultProfileExtensionBrowserTest.NoExtensionHosts" --single_process --mash

(--mash runs the Chrome OS system UI out of process, see go/mustash)

Could this be related to a piece of webui outliving a profile (like the chromeos signin profile)? Any other ideas? My  issue 789324  is proving difficult to figure out.

Labels: OS-Chrome
Stack I'm seeing (looks very similar to above, just might be more readable)

[155055:155055:1130/084657.962116:FATAL:render_process_host_impl.cc(784)] Check failed: map_.empty(). 
#0 0x7fbd89eef5dd base::debug::StackTrace::StackTrace()
#1 0x7fbd89eedb5c base::debug::StackTrace::StackTrace()
#2 0x7fbd89f7291d logging::LogMessage::~LogMessage()
#3 0x7fbd824e6099 content::(anonymous namespace)::SiteProcessCountTracker::~SiteProcessCountTracker()
#4 0x7fbd824e60f9 content::(anonymous namespace)::SiteProcessCountTracker::~SiteProcessCountTracker()
#5 0x7fbd89f9d464 base::internal::PassedWrapper<>::~PassedWrapper()
#6 0x7fbd8a0a2805 std::__1::__tree<>::destroy()
#7 0x7fbd8a0a277e std::__1::__tree<>::destroy()
#8 0x7fbd8a0a2798 std::__1::__tree<>::destroy()
#9 0x7fbd8a0a277e std::__1::__tree<>::destroy()
#10 0x7fbd8a0a2727 std::__1::__tree<>::~__tree()
#11 0x7fbd8a0a26c5 std::__1::map<>::~map()
#12 0x7fbd8a0a2548 base::SupportsUserData::~SupportsUserData()
#13 0x7fbd81a3fc54 content::BrowserContext::~BrowserContext()
#14 0x0000059b7413 Profile::~Profile()
#15 0x0000059ac1a3 OffTheRecordProfileImpl::~OffTheRecordProfileImpl()
#16 0x0000059ac1f9 OffTheRecordProfileImpl::~OffTheRecordProfileImpl()
#17 0x0000059ddfa2 ProfileImpl::DestroyOffTheRecordProfile()
#18 0x000005ffb8a4 ProfileDestroyer::DestroyOffTheRecordProfileNow()
#19 0x0000059dcaa5 ProfileImpl::~ProfileImpl()
#20 0x0000059dd619 ProfileImpl::~ProfileImpl()
#21 0x000005ffb070 ProfileDestroyer::DestroyProfileWhenAppropriate()
#22 0x000005a3642e ProfileManager::ProfileInfo::~ProfileInfo()
#23 0x000005a3a584 std::__1::pair<>::~pair()
#24 0x000005a3a7d5 std::__1::__tree<>::destroy()
#25 0x000005a3a6f7 std::__1::__tree<>::~__tree()
#26 0x000005a39f95 std::__1::map<>::~map()
#27 0x000005a24bc2 ProfileManager::~ProfileManager()
#28 0x000005a24d29 ProfileManager::~ProfileManager()
#29 0x000005ec7e87 BrowserProcessImpl::StartTearDown()
#30 0x000005645951 ChromeBrowserMainParts::PostMainMessageLoopRun()
#31 0x000002b14a8a chromeos::ChromeBrowserMainPartsChromeos::PostMainMessageLoopRun()
#32 0x7fbd81a53a7d content::BrowserMainLoop::ShutdownThreadsAndCleanUp()
#33 0x7fbd81a5f932 content::BrowserMainRunnerImpl::Shutdown()
#34 0x7fbd81a46e97 content::BrowserMain()
#35 0x7fbd838d083d content::RunNamedProcessTypeMain()
#36 0x7fbd838d32e2 content::ContentMainRunnerImpl::Run()
#37 0x7fbd838c9a5d content::ContentServiceManagerMainDelegate::RunEmbedderProcess()
#38 0x7fbd7d335924 service_manager::Main()
#39 0x7fbd838cf76b content::ContentMain()
#40 0x0000066c84da content::BrowserTestBase::SetUp()
#41 0x000005559fea InProcessBrowserTest::SetUp()
#42 0x000001d14254 ExtensionBrowserTest::SetUp()
#43 0x00000089cc6e _ZN7testing8internal12InvokeHelperIRKNSt3__16vectorIPN12user_manager4UserENS2_9allocatorIS6_EEEENS2_5tupleIJEEEE12InvokeMethodIN8chromeos15MockUserManagerEMSH_KFSB_vEEESB_PT_T0_RKSD_
#44 0x000003479d12 testing::internal::HandleExceptionsInMethodIfSupported<>()
#45 0x0000034649f4 testing::Test::Run()

Does anyone observe this DCHECK still failing?
Status: Archived (was: Assigned)
Archiving due to no activity. Please reopen if you see this happening on bots or have a local repro.

Sign in to add a comment