New issue
Advanced search Search tips

Issue 635734 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Profile error dialog might block shutdown, leading to SIGABRT from session_manager

Project Member Reported by derat@chromium.org, Aug 9 2016

Issue description

(From the first crash report in issue 634386.)

Product name: Chrome_ChromeOS
52.0.2743.116
Magic Signature: base::WaitableEvent::TimedWait
http://crash/2aac8efe00000000

Me: "It looks like a Chrome process exited, but the process group was still there 3 seconds later so it got aborted."

Antoine: "It looks like it's showing a message dialog during session restore - and maybe that is preventing shutdown? Interestingly, it shows 3 threads processing crashes from children (so that's consistent with the session manager killing children)."

Thread 0 CRASHED [SIGABRT @ 0x000003e8000002c4 ] MAGIC SIGNATURE THREAD
0x00007fac70cc3c93	(libc-2.19.so + 0x000f9c93 )	__epoll_wait_nocancel
0x00007fac73243823	(chrome -epoll.c:198 )	epoll_dispatch
0x00007fac732431a0	(chrome -event.c:512 )	event_base_loop
0x00007fac7321ec88	(chrome -message_pump_libevent.cc:254 )	base::MessagePumpLibevent::Run
0x00007fac73adc4a7	(chrome -run_loop.cc:35 )	base::RunLoop::Run
0x00007fac759f50d6	(chrome -simple_message_box_views.cc:115 )	ShowMessageBoxImpl
0x00007fac759f51b1	(chrome -simple_message_box_views.cc:243 )	chrome::ShowWarningMessageBox
0x00007fac759800b4	(chrome -profile_error_dialog.cc:30 )	ShowProfileErrorDialog
0x00007fac73872e01	(chrome -bind_internal.h:186 )	base::internal::Invoker<base::IndexSequence<0ul, 1ul>, base::internal::BindState<base::internal::RunnableAdapter<void (DownloadShelf::*)(int)>, void(DownloadShelf*, int), base::WeakPtr<DownloadShelf>, unsigned int>, base::internal::InvokeHelper<true, void, base::internal::RunnableAdapter<void (DownloadShelf::*)(int)> >, void()>::Run
0x00007fac73237d28	(chrome -callback.h:397 )	base::debug::TaskAnnotator::RunTask
0x00007fac732264b2	(chrome -message_loop.cc:478 )	base::MessageLoop::DoWork
0x00007fac7321eb72	(chrome -message_pump_libevent.cc:217 )	base::MessagePumpLibevent::Run
0x00007fac73adc4a7	(chrome -run_loop.cc:35 )	base::RunLoop::Run
0x00007fac739394d4	(chrome -session_restore.cc:139 )	SessionRestore::RestoreSession
0x00007fac75a62d12	(chrome -startup_browser_creator_impl.cc:626 )	StartupBrowserCreatorImpl::ProcessStartupURLs
0x00007fac75a6307c	(chrome -startup_browser_creator_impl.cc:521 )	StartupBrowserCreatorImpl::ProcessLaunchURLs
0x00007fac75a633bf	(chrome -startup_browser_creator_impl.cc:352 )	StartupBrowserCreatorImpl::Launch
0x00007fac75a5f4b8	(chrome -startup_browser_creator.cc:376 )	StartupBrowserCreator::LaunchBrowser
0x00007fac766b8027	(chrome -user_session_manager.cc:1705 )	chromeos::UserSessionManager::DoBrowserLaunchInternal
0x00007fac766b2cba	(chrome -bind_internal.h:186 )	base::internal::Invoker<base::IndexSequence<0ul, 1ul, 2ul, 3ul>, base::internal::BindState<base::internal::RunnableAdapter<void (chromeos::UserSessionManager::*)(Profile*, chromeos::LoginDisplayHost*, bool)>, void(chromeos::UserSessionManager*, Profile*, chromeos::LoginDisplayHost*, bool), base::WeakPtr<chromeos::UserSessionManager>, Profile*&, chromeos::LoginDisplayHost*&, bool>, base::internal::InvokeHelper<true, void, base::internal::RunnableAdapter<void (chromeos::UserSessionManager::*)(Profile*, chromeos::LoginDisplayHost*, bool)> >, void()>::Run
0x00007fac76659f01	(chrome -callback.h:397 )	FinishSwitchLanguage
0x00007fac76659e2d	(chrome -bind_internal.h:159 )	base::internal::Invoker<base::IndexSequence<0ul>, base::internal::BindState<base::internal::RunnableAdapter<void (*)(std::unique_ptr<chromeos::(anonymous namespace)::SwitchLanguageData, std::default_delete<chromeos::(anonymous namespace)::SwitchLanguageData> >)>, void(std::unique_ptr<chromeos::(anonymous namespace)::SwitchLanguageData, std::default_delete<chromeos::(anonymous namespace)::SwitchLanguageData> >), base::internal::PassedWrapper<std::unique_ptr<chromeos::(anonymous namespace)::SwitchLanguageData, std::default_delete<chromeos::(anonymous namespace)::SwitchLanguageData> > > >, base::internal::InvokeHelper<false, void, base::internal::RunnableAdapter<void (*)(std::unique_ptr<chromeos::(anonymous namespace)::SwitchLanguageData, std::default_delete<chromeos::(anonymous namespace)::SwitchLanguageData> >)> >, void()>::Run
0x00007fac73aeea1b	(chrome -callback.h:397 )	PostTaskAndReplyRelay::RunReplyAndSelfDestruct
0x00007fac73237d28	(chrome -callback.h:397 )	base::debug::TaskAnnotator::RunTask
0x00007fac732264b2	(chrome -message_loop.cc:478 )	base::MessageLoop::DoWork
0x00007fac7321eb72	(chrome -message_pump_libevent.cc:217 )	base::MessagePumpLibevent::Run
0x00007fac73adc4a7	(chrome -run_loop.cc:35 )	base::RunLoop::Run
0x00007fac7706ab84	(chrome -chrome_browser_main.cc:1906 )	ChromeBrowserMainParts::MainMessageLoopRun
0x00007fac75eab73a	(chrome -browser_main_loop.cc:972 )	content::BrowserMainLoop::RunMainMessageLoopParts
0x00007fac75ce7ae4	(chrome -browser_main_runner.cc:154 )	content::BrowserMainRunnerImpl::Run
0x00007fac75ce79c2	(chrome -browser_main.cc:46 )	content::BrowserMain
0x00007fac73a8ac00	(chrome -content_main_runner.cc:787 )	content::ContentMainRunnerImpl::Run
0x00007fac73a896da	(chrome -content_main.cc:20 )	content::ContentMain
0x00007fac7371759e	(chrome -chrome_main.cc:84 )	ChromeMain
0x00007fac70be9fb5	(libc-2.19.so -libc-start.c:292 )	__libc_start_main
0x00007fac737173eb	(chrome + 0x011553eb )	_start
 
Cc: afakhry@chromium.org est...@chromium.org
Owner: afakhry@chromium.org
Status: Assigned (was: Available)
derat, there's a crash that I found when there is a corruption in the WebData Database, which I'm trying to fix in this [WIP] CL https://codereview.chromium.org/2225333003.

The profile error message box runs as a nested run loop, and while it's running, other callbacks to WebDatabaseService::OnDatabaseLoadDone() [1] (posted from WebDatabaseService::BackendDelegate::DBLoaded() [2]) are run. Those other callbacks will run the same error callbacks but they won't run the message box [3]. They will clear the |error_callbacks_| vector so that when the user exits the message box and returns here [4], the temp iterator to |error_callbacks_| is no longer valid, and it crashes.

[1]: https://cs.chromium.org/chromium/src/components/webdata/common/web_database_service.cc?q=WebDatabaseService::OnDatabaseLoadDone&sq=package:chromium&l=135&dr=CSs

[2]: https://cs.chromium.org/chromium/src/components/webdata/common/web_database_service.cc?dr=CSs&q=DBLoaded&sq=package:chromium&l=33

[3]: https://cs.chromium.org/chromium/src/chrome/browser/ui/profile_error_dialog.cc?dr=CSs&q=ShowProfileErrorDialog&sq=package:chromium&l=40

[4]: https://cs.chromium.org/chromium/src/components/webdata/common/web_database_service.cc?dr=CSs&q=WebDatabaseService::OnDatabaseLoadDone&sq=package:chromium&l=150

Can that be the same issue?

Comment 3 by derat@chromium.org, Aug 9 2016

Thanks! Seems possible that it's the same thing. It's certainly not good to iterate over a vector that's being modified, so I'm supportive of your change to fix that. :-)
Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 22 2016

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

commit a592d29c2a4667b4ec95bd091e860bd01662908e
Author: afakhry <afakhry@chromium.org>
Date: Mon Aug 22 19:06:57 2016

Recreate the WebData database on a catastrophic SQL error

Currently, if the WebData database gets corrupted, it will remain like so
and users will keep getting the profile error dialog every time they
sign in. The only way for the user to fix this is to recreate the profile
or delete the corrupt file.
This CL does for the WebData DB as is done for the History DB; when a catastrophic
error is seen, the DB is razed.

Example feedback report filed with this CL applied: https://docs.google.com/a/google.com/document/d/1qt-AwWVHZTtcJoFPNq2_yI-Tl2pIiOwEQCaIf23iL4g/edit?usp=sharing

BUG= 455749 ,  635734 

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

[modify] https://crrev.com/a592d29c2a4667b4ec95bd091e860bd01662908e/chrome/app/generated_resources.grd
[modify] https://crrev.com/a592d29c2a4667b4ec95bd091e860bd01662908e/chrome/browser/history/chrome_history_client.cc
[add] https://crrev.com/a592d29c2a4667b4ec95bd091e860bd01662908e/chrome/browser/profiles/sql_init_error_message_ids.cc
[add] https://crrev.com/a592d29c2a4667b4ec95bd091e860bd01662908e/chrome/browser/profiles/sql_init_error_message_ids.h
[modify] https://crrev.com/a592d29c2a4667b4ec95bd091e860bd01662908e/chrome/browser/web_data_service_factory.cc
[modify] https://crrev.com/a592d29c2a4667b4ec95bd091e860bd01662908e/chrome/chrome_browser.gypi
[modify] https://crrev.com/a592d29c2a4667b4ec95bd091e860bd01662908e/components/webdata/common/web_database_backend.cc
[modify] https://crrev.com/a592d29c2a4667b4ec95bd091e860bd01662908e/components/webdata/common/web_database_backend.h
[modify] https://crrev.com/a592d29c2a4667b4ec95bd091e860bd01662908e/components/webdata/common/web_database_service.cc
[modify] https://crrev.com/a592d29c2a4667b4ec95bd091e860bd01662908e/components/webdata/common/web_database_service.h
[modify] https://crrev.com/a592d29c2a4667b4ec95bd091e860bd01662908e/sql/init_status.h

Status: Fixed (was: Started)

Comment 7 by dchan@chromium.org, Oct 7 2016

Labels: VerifyIn-55
Crashes on chrome 54.0.2840.51/CrOS 8743.59.0 - monroe 

crash ID : 2800cd8b00000000

Comment 9 by derat@chromium.org, Oct 8 2016

8: I don't think there's anything in that crash's stack trace to indicate that it was caused by a profile error dialog. It's just a SIGABRT while waiting in epoll.
The crash in #8 doesn't seem to be related to this issue at all.
Status: Verified (was: Fixed)

Sign in to add a comment