New issue
Advanced search Search tips

Issue 834298 link

Starred by 5 users

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

[Crash] MaybeShowInvalidUserDataDirWarningDialog() invoked before ChromeLayoutProvider::CreateLayoutProvider()

Reported by maximo.m...@gmail.com, Apr 18 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Steps to reproduce the problem:
1. Run Chromium
2. 
3. 

What is the expected behavior?
Chromium should open.

What went wrong?
The new version crashes with a segmentation fault. I roled back to the last version (chromium-65.0.3325.181-7
) and it works fine. 

Crashed report ID: No

How much crashed? Whole browser

Is it a problem with a plugin? No 

Did this work before? N/A 

Chrome version: 66.0.3359.117   Channel: stable
OS Version: 4.15.15-1-ARCH 
Flash Version:
 
Cc: jmukthavaram@chromium.org
Labels: Needs-Feedback Needs-Triage-M66
Thanks for filing the issue.
Could you please provide us the crash report id from chrome://crashes to proceed further.

I am not able to see the crash report since it won't load at all. When I downgrade and go to chrome://crashes I get "Crash reporting is not available in Chromium.".

I am attaching the stack trace, maybe it'll help. Let me know what else I can do. 

Best regards,
chromium-strace.txt
11.1 KB View Download
Project Member

Comment 3 by sheriffbot@chromium.org, Apr 19 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Based on our downstream report in Arch [1], this issue appears to occur on Antergos (a derivative of Arch Linux). It happens because Antergos' installer configures Chromium to start with an invalid user data directory (--user-data-dir set to a subdirectory of /home/antergos). [2]

You should be able to reproduce the issue with Chrome 66 by passing --user-data-dir=/test to it (I used /test here as an example; needs to be a directory we don't have write access to.)

It consistently crashes in views::MessageBoxView::InitParams::InitParams(); I have attached the full backtrace from Chrome 66.

Chrome 65, instead of crashing, would print an error:

  [ERROR:simple_message_box_views.cc(122)] Unable to show a dialog outside the UI thread message
  loop: Failed To Create Data Directory - Chromium cannot read and write to its data directory:

Bisecting points to the following range, and I'm guessing the middle CL is the one that caused the above change in behavior:

  https://chromium.googlesource.com/chromium/src/+log/382f6d5b5c..9a421fa170

[1] https://bugs.archlinux.org/task/58269
[2] https://forum.antergos.com/topic/9677/chromium-is-broken/20
chrome-66-invalid-user-data-dir-backtrace.txt
1.8 KB View Download

Comment 6 by cdluc...@gmail.com, Apr 19 2018

I ran a full system update from Konsole just a few minutes ago.  I now have the same issue with Chromium not starting and producing the segmentation fault warning. OS is latest update of Antergos from their stable stream. No issues before the update. 

I read the thread, and I apologize if I may be overlooking it, but is there a solution aside from rolling back chromium? Also, I’m assuming that this is an issue that’s specific to Chromium? Or is it in other/all browsers?

Thanks!

Chris
Re #6: You can edit $HOME/.config/chromium-flags.conf and remove the incorrect --user-data-dir flag (and the --homepage one as well if you want).

Mostly Antergos users are affected by this, although there is an underlying issue of Chrome 66 trying to display a message dialog whereas Chrome 65 would print the error shown in comment #4.

Comment 8 by cdluc...@gmail.com, Apr 20 2018

Thank you very much!
 Issue 834763  has been merged into this issue.
Thanks for the quick help/feedback. You guys are amazing. I was able to change the --user-data-dir and it loaded correctly. There is a bug already reported for Antergos. However, I think Chrome 66 should provide a friendlier error message. 

Thanks again!

Comment 11 by sky@chromium.org, Apr 23 2018

Cc: gab@chromium.org
This is more likely related to gab's recent changes.
@sky: But my bisect in comment #4 points to your CL. :3
Ref #7 as of the latest update to chromium if I were to remove chromium-flags.conf, it would simply return :ERROR:in_progress_cache_impl.cc(93)] Could not read download entries from file because there was a read failure.

Of course, one could create a new default (https://productforums.google.com/forum/#!topic/chrome/nEgOUAudNqA) but so far I don't know what would be best 

Restoring 
Re # 13 for myself so I can remember it later... For some reason, this is not the first time nor it will be the last, by the looks of it - regarding the ERROR:in_progress_cache_impl.cc(93). Removing it, resolves the issue even without a chromium-flags.conf file under the XDG variable. 

https://chromium.googlesource.com/chromium/src.git/+/lkcr/chrome/common/chrome_constants.cc#142

Comment 15 by gab@chromium.org, May 2 2018

Owner: sky@chromium.org
@sky: which change of mine did you mean in #11?

The bisect clearly seems to point at your change in r533989 (and it seems related given the error is core dump when user-data isn't readable).

Don't know that we need to support this, I'll let you triage.
Also a crash ID from `chrome --user-data-dir=/test` (in case that provides a better backtrace): 82adfaca356e56c4

Comment 17 by gab@chromium.org, May 2 2018

Cc: pkasting@chromium.org
Owner: kylixrd@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks for the crash, here's the culprit : https://codereview.chromium.org/2818123002

The issue is that chrome::MaybeShowInvalidUserDataDirWarningDialog() ends up invoking LayoutProvider::Get()->GetDistanceMetric(...) as part of views::MessageBoxView::InitParams::InitParams(...).

But that CL moves ChromeLayoutProvider::CreateLayoutProvider(); just a tad too early as:
 ChromeBrowserMainParts::PreCreateThreads() invokes
    PreCreateThreadsImpl() -> MaybeShowInvalidUserDataDirWarningDialog()
  just before
    chrome_extra_parts_[i]->PreCreateThreads() ->  ChromeBrowserMainExtraPartsViews::PreCreateThreads() -> ChromeLayoutProvider::CreateLayoutProvider()

https://cs.chromium.org/chromium/src/chrome/browser/chrome_browser_main.cc?type=cs&q=ChromeBrowserMainParts::PreCreateThreads%5C(%5C)&l=1131

So the call to chrome::MaybeShowInvalidUserDataDirWarningDialog() will always crash as of r464777 if it has to generate a warning dialog.


Crashing stack (from http://crash/82adfaca356e56c4):

(chrome -message_box_view.cc:81 ) views::MessageBoxView::InitParams::InitParams(...)
(chrome -simple_message_box_views.cc:228 )  SimpleMessageBoxViews::Show(...)
(chrome -simple_message_box_views.cc:66 ) SimpleMessageBoxViews::Show(...)
(chrome -simple_message_box_views.cc:262 )  chrome::ShowWarningMessageBox(...)
(chrome -bad_flags_prompt.cc:179 )  chrome::MaybeShowInvalidUserDataDirWarningDialog()
(chrome -chrome_browser_main.cc:1252 )  ChromeBrowserMainParts::PreCreateThreads()
(chrome -browser_main_loop.cc:855 ) content::BrowserMainLoop::PreCreateThreads()
(chrome -callback.h:124 ) content::StartupTaskRunner::RunAllTasksNow()
(chrome -browser_main_loop.cc:969 ) content::BrowserMainLoop::CreateStartupTasks()
(chrome -browser_main_runner.cc:139 ) content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&)
(chrome -browser_main.cc:42 ) content::BrowserMain(content::MainFunctionParams const&)
(chrome -content_main_runner.cc:423 ) content::ContentMainRunnerImpl::Run()
(chrome -main.cc:453 )  service_manager::Main(service_manager::MainParams const&)
(chrome -content_main.cc:19 ) content::ContentMain(content::ContentMainParams const&)

Comment 18 by gab@chromium.org, May 2 2018

Summary: [Crash] MaybeShowInvalidUserDataDirWarningDialog() invoked before ChromeLayoutProvider::CreateLayoutProvider() (was: [1] 1766 segmentation fault (core dumped) chromium)

Comment 19 by gab@chromium.org, May 2 2018

Labels: -Needs-Triage-M66 M-66

Comment 20 by sky@chromium.org, May 2 2018

Thanks for investigating gab. I was hoping your earlier changes some how triggered this, but I was clearing wrong.

Sign in to add a comment