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

Issue 876176 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 29
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug

Blocking:
issue 864904



Sign in to add a comment

desktop-pwas: DCHECK is hit when closing chrome during an installation from PendingAppManager

Project Member Reported by ortuno@chromium.org, Aug 21

Issue description

[40609:40609:0821/132910.760121:FATAL:profile_destroyer.cc(90)] Check failed: profile_hosts_count == 0u (1 vs. 0)
#0 0x7f25f8eb574c base::debug::StackTrace::StackTrace()
#1 0x7f25f8de97db logging::LogMessage::~LogMessage()
#2 0x56502c8759b4 ProfileDestroyer::DestroyProfileWhenAppropriate()
#3 0x56502c6cabca std::__1::__tree<>::destroy()
#4 0x56502c6cab19 ProfileManager::~ProfileManager()
#5 0x56502c6c27ae ProfileManager::~ProfileManager()
#6 0x56502c7dd97d BrowserProcessImpl::StartTearDown()
#7 0x56502c5ec772 ChromeBrowserMainParts::PostMainMessageLoopRun()
#8 0x56502c1984f6 chromeos::ChromeBrowserMainPartsChromeos::PostMainMessageLoopRun()
#9 0x7f25f5ebd376 content::BrowserMainLoop::ShutdownThreadsAndCleanUp()
#10 0x7f25f5ebfec4 content::BrowserMainRunnerImpl::Shutdown()
#11 0x7f25f5eb90e5 content::BrowserMain()
#12 0x7f25f69363dd content::ContentMainRunnerImpl::Run()
#13 0x7f25f9171f85 service_manager::Main()
#14 0x7f25f6934884 content::ContentMain()
#15 0x56502ba160e3 ChromeMain
#16 0x7f25ea5642b1 __libc_start_main
#17 0x56502ba15f5a _start


 
Summary: desktop-pwas: DCHECK is hit when closing chrome during an installation from PendingAppManager (was: desktop-pwas: DCHECK is hit when closing chrome during an installation)
Labels: M-70
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 22

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

commit 2fb415b036f0e183d7eb1f818a2fee223c2b6e3a
Author: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Date: Wed Aug 22 07:18:51 2018

desktop-pwas: Add shutdown phase to WebAppProvider

When WebAppProvider destroys PendingAppManager during shutdown,
PendingAppManager try to destroy its WebContents if there is a pending
installation. This causes us to hit a DCHECK when the WebContents gets
destroyed during Profile's destructor.

To solve this, we add a Shutdown() phase to WebAppProvider and destroy
PendingAppManager there. This ensures that by the time the Profile gets
destroyed the WebContents is already destroyed.

Bug:  876176 
Change-Id: I787a15ac7e1335a056cdad3824a3be8312393c5e
Reviewed-on: https://chromium-review.googlesource.com/1184563
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584972}
[modify] https://crrev.com/2fb415b036f0e183d7eb1f818a2fee223c2b6e3a/chrome/browser/web_applications/web_app_provider.cc
[modify] https://crrev.com/2fb415b036f0e183d7eb1f818a2fee223c2b6e3a/chrome/browser/web_applications/web_app_provider.h

Labels: -Pri-1 Pri-2
We still hit the DCHECK but we no longer crash when DCHEKS are off. We aren't actually leaking anything as the DCHECK suggests, it's just that the DCHECK gets called before we get a chance to clean up.

For this reason, lowering the priority to P2. But should still be addressed soon.
Status: Started (was: Assigned)
Project Member

Comment 7 by bugdroid1@chromium.org, Aug 29

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

commit fd7ed286f620ab884105c5d6b94ce013edcdf43a
Author: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Date: Wed Aug 29 13:26:49 2018

desktop-pwas: Listen for the "profile destroyed" notification

Neither Shutdown() gets called on the WebAppProvider nor has the
WebAppProvider been destroyed by the time we DCHECK for leaked hosts. So
the WebAppProvider never has a chance to clean up before we check that
all hosts are gone.

To get around this, we clean up when the "NOTIFICATION_PROFILE_DESTROYED"
notification is sent, which happens right before the DCHECK.

Bug:  876176 ,  878586 
Change-Id: I6262ddcf8ca9594bfc333feb9c3cf4ccdc7f8b5e
Reviewed-on: https://chromium-review.googlesource.com/1195243
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587091}
[modify] https://crrev.com/fd7ed286f620ab884105c5d6b94ce013edcdf43a/chrome/browser/web_applications/extensions/pending_bookmark_app_manager_browsertest.cc
[modify] https://crrev.com/fd7ed286f620ab884105c5d6b94ce013edcdf43a/chrome/browser/web_applications/web_app_provider.cc
[modify] https://crrev.com/fd7ed286f620ab884105c5d6b94ce013edcdf43a/chrome/browser/web_applications/web_app_provider.h

Status: Fixed (was: Started)

Sign in to add a comment