New issue
Advanced search Search tips

Issue 729476 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Extension Hosts don't block window closure (or browser shutdown)

Project Member Reported by tapted@chromium.org, Jun 5 2017

Issue description

This is maybe a good thing, but it seems to break assumptions made elsewhere.

Closing a window with an extension host seems to trigger checks such as 

[25482:775:0605/153431.881122:FATAL:begin_frame_source.cc(345)] Check failed: (last_begin_frame_args_.source_id != last_args.source_id) || (last_begin_frame_args_.sequence_number > last_args.sequence_number). current {"created_from":"CreateBeginFrameArgs@../../cc/scheduler/begin_frame_source.cc:180","deadline_us":451432675789.0,"frame_time_us":451432675304.0,"interval_us":16666.0,"on_critical_path":true,"sequence_number":11,"source_id":6,"subtype":"NORMAL","type":"BeginFrameArgs"}, last {"created_from":"CreateBeginFrameArgs@../../cc/scheduler/begin_frame_source.cc:180","deadline_us":451432675789.0,"frame_time_us":451432659123.0,"interval_us":16666.0,"on_critical_path":true,"sequence_number":12,"source_id":6,"subtype":"MISSED","type":"BeginFrameArgs"}
0   libbase.dylib                       0x00000001292ea6ae base::debug::StackTrace::StackTrace(unsigned long) + 174
1   libbase.dylib                       0x00000001292ea74d base::debug::StackTrace::StackTrace(unsigned long) + 29
2   libbase.dylib                       0x00000001292e89cc base::debug::StackTrace::StackTrace() + 28
3   libbase.dylib                       0x00000001293888bf logging::LogMessage::~LogMessage() + 479
4   libbase.dylib                       0x0000000129386235 logging::LogMessage::~LogMessage() + 21
5   libcc.dylib                         0x000000012d98a33e cc::ExternalBeginFrameSource::GetMissedBeginFrameArgs(cc::BeginFrameObserver*) + 1342
6   libcc.dylib                         0x000000012d988d72 cc::ExternalBeginFrameSource::AddObserver(cc::BeginFrameObserver*) + 5474
7   libcc.dylib                         0x000000012d99f178 cc::Scheduler::SetupNextBeginFrameIfNeeded() + 152
8   libcc.dylib                         0x000000012d99ce0e cc::Scheduler::ProcessScheduledActions() + 1614
9   libcc.dylib                         0x000000012d9a34b1 cc::Scheduler::SetDeferCommits(bool) + 337
10  libcc.dylib                         0x000000012dbfd3a3 cc::SingleThreadProxy::SetDeferCommits(bool) + 1011
11  libcc.dylib                         0x000000012daabfa2 cc::LayerTreeHost::UpdateDeferCommitsInternal() + 162
12  libcc.dylib                         0x000000012dab1083 cc::LayerTreeHost::SetDeferCommits(bool) + 83
13  libcompositor.dylib                 0x000000013cac3f46 ui::Compositor::RemoveCompositorLock(ui::CompositorLock*) + 150
14  libcompositor.dylib                 0x000000013cad45d5 ui::CompositorLock::~CompositorLock() + 85
15  libcompositor.dylib                 0x000000013cad4745 ui::CompositorLock::~CompositorLock() + 21
16  libcontent.dylib                    0x0000000131dfa064 content::RecyclableCompositorMac::~RecyclableCompositorMac() + 324
17  libcontent.dylib                    0x0000000131dfa3b5 content::RecyclableCompositorMac::~RecyclableCompositorMac() + 21
18  libcontent.dylib                    0x0000000131dfa3d9 content::RecyclableCompositorMac::~RecyclableCompositorMac() + 25
19  libcontent.dylib                    0x0000000131e002ad std::__1::__deque_base<std::__1::unique_ptr<content::RecyclableCompositorMac, std::__1::default_delete<content::RecyclableCompositorMac> >, std::__1::allocator<std::__1::unique_ptr<content::RecyclableCompositorMac, std::__1::default_delete<content::RecyclableCompositorMac> > > >::clear() + 525
20  libcontent.dylib                    0x0000000131dfc7cc content::BrowserCompositorMac::~BrowserCompositorMac() + 924
21  libcontent.dylib                    0x0000000131dfdc85 content::BrowserCompositorMac::~BrowserCompositorMac() + 21
22  libcontent.dylib                    0x0000000131dfdca9 content::BrowserCompositorMac::~BrowserCompositorMac() + 25
23  libcontent.dylib                    0x000000013174ba21 content::RenderWidgetHostViewMac::Destroy() + 577
24  libcontent.dylib                    0x000000013174b7cf content::RenderWidgetHostViewMac::RenderProcessGone(base::TerminationStatus, int) + 31
25  libcontent.dylib                    0x000000013170a6ff content::RenderWidgetHostImpl::RendererExited(base::TerminationStatus, int) + 303
26  libcontent.dylib                    0x00000001316e16bf content::RenderViewHostImpl::RenderProcessExited(content::RenderProcessHost*, base::TerminationStatus, int) + 95
27  libcontent.dylib                    0x00000001316748aa content::RenderProcessHostImpl::ProcessDied(bool, content::RenderProcessHost::RendererClosedDetails*) + 1578
28  libcontent.dylib                    0x0000000131674241 content::RenderProcessHostImpl::FastShutdownIfPossible() + 337
29  interactive_ui_tests                0x0000000110aa955d browser_shutdown::OnShutdownStarting(browser_shutdown::ShutdownType) + 461
30  interactive_ui_tests                0x0000000116497e6c Browser::OnWindowClosing() + 124


and

[23892:775:0605/150428.081175:FATAL:profile_destroyer.cc(56)] Check failed: hosts.empty() || profile->IsOffTheRecord() || content::RenderProcessHost::run_renderer_in_process(). Profile still has 1 hosts
0   libbase.dylib                       0x0000000123d216ae base::debug::StackTrace::StackTrace(unsigned long) + 174
1   libbase.dylib                       0x0000000123d2174d base::debug::StackTrace::StackTrace(unsigned long) + 29
2   libbase.dylib                       0x0000000123d1f9cc base::debug::StackTrace::StackTrace() + 28
3   libbase.dylib                       0x0000000123dbf8bf logging::LogMessage::~LogMessage() + 479
4   libbase.dylib                       0x0000000123dbd235 logging::LogMessage::~LogMessage() + 21
5   interactive_ui_tests                0x000000010c93cc11 ProfileDestroyer::DestroyProfileWhenAppropriate(Profile*) + 1025
6   interactive_ui_tests                0x000000010c9d9774 ProfileManager::ProfileInfo::~ProfileInfo() + 100
7   interactive_ui_tests                0x000000010c9d9865 ProfileManager::ProfileInfo::~ProfileInfo() + 21
8   interactive_ui_tests                0x000000010c9e53de linked_ptr<ProfileManager::ProfileInfo>::depart() + 78
9   interactive_ui_tests                0x000000010c9e5385 linked_ptr<ProfileManager::ProfileInfo>::~linked_ptr() + 21
10  interactive_ui_tests                0x000000010c9d94b5 linked_ptr<ProfileManager::ProfileInfo>::~linked_ptr() + 21
11  interactive_ui_tests                0x000000010c9db453 std::__1::pair<base::FilePath const, linked_ptr<ProfileManager::ProfileInfo> >::~pair() + 35
12  interactive_ui_tests                0x000000010c9db425 std::__1::pair<base::FilePath const, linked_ptr<ProfileManager::ProfileInfo> >::~pair() + 21
13  interactive_ui_tests                0x000000010c9db395 std::__1::__tree<std::__1::__value_type<base::FilePath, linked_ptr<ProfileManager::ProfileInfo> >, std::__1::__map_value_compare<base::FilePath, std::__1::__value_type<base::FilePath, linked_ptr<ProfileManager::ProfileInfo> >, std::__1::less<base::FilePath>, true>, std::__1::allocator<std::__1::__value_type<base::FilePath, linked_ptr<ProfileManager::ProfileInfo> > > >::destroy(std::__1::__tree_node<std::__1::__value_type<base::FilePath, linked_ptr<ProfileManager::ProfileInfo> >, void*>*) + 213
14  interactive_ui_tests                0x000000010c9db2b7 std::__1::__tree<std::__1::__value_type<base::FilePath, linked_ptr<ProfileManager::ProfileInfo> >, std::__1::__map_value_compare<base::FilePath, std::__1::__value_type<base::FilePath, linked_ptr<ProfileManager::ProfileInfo> >, std::__1::less<base::FilePath>, true>, std::__1::allocator<std::__1::__value_type<base::FilePath, linked_ptr<ProfileManager::ProfileInfo> > > >::~__tree() + 87
15  interactive_ui_tests                0x000000010c9db255 std::__1::__tree<std::__1::__value_type<base::FilePath, linked_ptr<ProfileManager::ProfileInfo> >, std::__1::__map_value_compare<base::FilePath, std::__1::__value_type<base::FilePath, linked_ptr<ProfileManager::ProfileInfo> >, std::__1::less<base::FilePath>, true>, std::__1::allocator<std::__1::__value_type<base::FilePath, linked_ptr<ProfileManager::ProfileInfo> > > >::~__tree() + 21
16  interactive_ui_tests                0x000000010c9db235 std::__1::map<base::FilePath, linked_ptr<ProfileManager::ProfileInfo>, std::__1::less<base::FilePath>, std::__1::allocator<std::__1::pair<base::FilePath const, linked_ptr<ProfileManager::ProfileInfo> > > >::~map() + 21
17  interactive_ui_tests                0x000000010c9c5b55 std::__1::map<base::FilePath, linked_ptr<ProfileManager::ProfileInfo>, std::__1::less<base::FilePath>, std::__1::allocator<std::__1::pair<base::FilePath const, linked_ptr<ProfileManager::ProfileInfo> > > >::~map() + 21
18  interactive_ui_tests                0x000000010c9c59cb ProfileManager::~ProfileManager() + 347
19  interactive_ui_tests                0x000000010c9c5b95 ProfileManager::~ProfileManager() + 21
20  interactive_ui_tests                0x000000010c9c5bd9 ProfileManager::~ProfileManager() + 25
21  interactive_ui_tests                0x000000010c17e2e0 BrowserProcessImpl::StartTearDown() + 2896
22  interactive_ui_tests                0x000000010c29f0c4 ChromeBrowserMainParts::PostMainMessageLoopRun() + 1060
23  libcontent.dylib                    0x0000000128151830 content::BrowserMainLoop::ShutdownThreadsAndCleanUp() + 896
24  libcontent.dylib                    0x000000012815d3b5 content::BrowserMainRunnerImpl::Shutdown() + 2389
25  libcontent.dylib                    0x0000000128144ef6 content::BrowserMain(content::MainFunctionParams const&) + 454
26  libcontent.dylib                    0x000000012a57c185 content::RunNamedProcessTypeMain(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, content::MainFunctionParams const&, content::ContentMainDelegate*) + 581
27  libcontent.dylib                    0x000000012a57dc52 content::ContentMainRunnerImpl::Run() + 1938
28  libcontent.dylib                    0x000000012a57a80d content::ContentServiceManagerMainDelegate::RunEmbedderProcess() + 61
29  libembedder.dylib                   0x000000014adf9964 service_manager::Main(service_manager::MainParams const&) + 1892
30  libcontent.dylib                    0x000000012a57bef9 content::ContentMain(content::ContentMainParams const&) + 89
31  interactive_ui_tests                0x000000010df61423 content::BrowserTestBase::SetUp() + 3939
 
Cc: rdevlin....@chromium.org
Components: Platform>Extensions
Labels: OS-Chrome OS-Linux OS-Windows
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 5 2017

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

commit 910f537829fe4483c965d4c16dcfd54e549cffbc
Author: tapted <tapted@chromium.org>
Date: Mon Jun 05 21:06:53 2017

Ensure all BrowserAction ExtensionHosts are destroyed in BrowserActionInteractiveTest

Currently they seem to get destroyed by luck. Chrome does a lot of work
in TearDown, and InProcessBrowserTests spins run loops enough times,
that the ExtensionHosts are destroyed before the Profile is. For some
tests, the extension host tear down only starts when the parent browser
window is closed. But, for extension popups, there's no explicit wait.

This means that Extension Popup tests can flakily trigger DCHECKs in
ProfileDestroyer::DestroyProfileWhenAppropriate(..). But, for official
releases, DestroyProfileWhenAppropriate has a codepath to clean up.

Add a class to the test harness that ensures
NOTIFICATION_EXTENSION_HOST_CREATED/DESTOYED are balanced before
continuing to browser window shutdown. This makes the failures assured
rather than flaky. Then add explicit calls to close the popup to the
tests that are missing it.

BUG=729476

Review-Url: https://codereview.chromium.org/2918293002
Cr-Commit-Position: refs/heads/master@{#477083}

[modify] https://crrev.com/910f537829fe4483c965d4c16dcfd54e549cffbc/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc

Project Member

Comment 3 by sheriffbot@chromium.org, Jun 6 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment