New issue
Advanced search Search tips

Issue 591504 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug



Sign in to add a comment

crashpad does not run on first run

Project Member Reported by wfh@chromium.org, Mar 2 2016

Issue description

Version: Chrome 51.0.2663 05e15a6d740a2ac808c8191c08d3b4a30c8c0cfe also tested on Chrome Stable 49.0.2623.75
OS: Windows 8.1

What steps will reproduce the problem?

1. Install Chrome from the webz
2. Run Chrome
3. Notice that crashpad-handler process is not running
4. Exit Chrome
5. Run Chrome again
6. Notice that crashpad-handler is running

Also seen on a local install of mini_installer.exe. Only first run.

Also noticed that if I insert a crash in browser then WERReport gets run on first run (since crashpad isn't loaded) but subsequent runs of Chrome, crashpad catches the crash fine. This could mean we are leaking a lot of crashes to WER.
 

Comment 1 by wfh@chromium.org, Mar 2 2016

This just seems like a race between Chrome creating the profile directory, and crashpad starting.

Deleting the %appdatalocal%\google\chrome\user data directory and re-running Chrome causes crashpad not to start.

Crashpad starts fine as long as there is a directory (it can be empty) called %appdatalocal%\google\chrome\user data

Comment 2 by wfh@chromium.org, Mar 4 2016

Cc: lafo...@chromium.org grt@chromium.org
I finally got around to trying this just now and I couldn't repro (New win7 VM, installing Canary). Without having debugged yet, I feel like there's not a race, because I think we're still single threaded at this point, and the browser launches the handler and then blocks until it's connected to. So I think the directory either exists or doesn't.

I'll try a few more configs. Maybe it depends on whether the install was system or user too.
OK, seems to happen reliably with Stable. :/
Project Member

Comment 5 by bugdroid1@chromium.org, Mar 7 2016

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

commit 92905ef36a30be9be9041d8ee07ccd6e7ca45d64
Author: scottmg <scottmg@chromium.org>
Date: Mon Mar 07 23:00:43 2016

crashpad win: Ensure database dir exists on first run

Crashpad will only create one level of directory for its database
storage. On Windows, the target is %LOCALAPPDATA%\Google\Chrome\User
Data\Crashpad.

However, on first run when Crashpad is initialized, "User Data" will not
yet have been created. We don't want to move Crashpad initialization
later in startup, so we instead create the directory if it does not
exist.

Note that this is calling file_util::CreateDirectory(), rather than
CreateDirectoryW() which means the full parent tree will be created, not
just the last entry in the path.

R=thakis@chromium.org,wfh@chromium.org
TEST=remove local user data dir, install chrome, confirm that chrome --process-type=crashpad-handler exists on first run
BUG= 591504 

Review URL: https://codereview.chromium.org/1774573002

Cr-Commit-Position: refs/heads/master@{#379676}

[modify] https://crrev.com/92905ef36a30be9be9041d8ee07ccd6e7ca45d64/chrome/common/chrome_paths_win.cc

Labels: Merge-Request-50 Merge-Request-49
I think we probably ought to try to merge this back unfortunately.
Labels: -Merge-Request-49 Merge-Approved-49
Merge approved for M49 (branch 2623)

Comment 8 by tin...@google.com, Mar 8 2016

Labels: -Merge-Request-50 Merge-Approved-50 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M50 (branch: 2661)
Project Member

Comment 9 by bugdroid1@chromium.org, Mar 8 2016

Labels: -merge-approved-50 merge-merged-2661
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/de5a07178265d61dce571d65f6c6b2d06cb97bdf

commit de5a07178265d61dce571d65f6c6b2d06cb97bdf
Author: Scott Graham <scottmg@chromium.org>
Date: Tue Mar 08 22:14:08 2016

crashpad win: Ensure database dir exists on first run

Crashpad will only create one level of directory for its database
storage. On Windows, the target is %LOCALAPPDATA%\Google\Chrome\User
Data\Crashpad.

However, on first run when Crashpad is initialized, "User Data" will not
yet have been created. We don't want to move Crashpad initialization
later in startup, so we instead create the directory if it does not
exist.

Note that this is calling file_util::CreateDirectory(), rather than
CreateDirectoryW() which means the full parent tree will be created, not
just the last entry in the path.

R=thakis@chromium.org,wfh@chromium.org
TEST=remove local user data dir, install chrome, confirm that chrome --process-type=crashpad-handler exists on first run
BUG= 591504 

Review URL: https://codereview.chromium.org/1774573002

Cr-Commit-Position: refs/heads/master@{#379676}
(cherry picked from commit 92905ef36a30be9be9041d8ee07ccd6e7ca45d64)

Review URL: https://codereview.chromium.org/1781443003 .

Cr-Commit-Position: refs/branch-heads/2661@{#134}
Cr-Branched-From: ef6f6ae5e4c96622286b563658d5cd62a6cf1197-refs/heads/master@{#378081}

[modify] https://crrev.com/de5a07178265d61dce571d65f6c6b2d06cb97bdf/chrome/common/chrome_paths_win.cc

Please try to merge your change to M49 branch 2623 ASAP if you think it is a safe merge so we can pick it up for next stable refresh when it happens. Thank you.
Project Member

Comment 11 by bugdroid1@chromium.org, Mar 11 2016

Labels: -merge-approved-49 merge-merged-2623
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4a5c529d37e17c3ea7def8aa7de2507a5548d84d

commit 4a5c529d37e17c3ea7def8aa7de2507a5548d84d
Author: Scott Graham <scottmg@chromium.org>
Date: Fri Mar 11 18:42:14 2016

crashpad win: Ensure database dir exists on first run

Crashpad will only create one level of directory for its database
storage. On Windows, the target is %LOCALAPPDATA%\Google\Chrome\User
Data\Crashpad.

However, on first run when Crashpad is initialized, "User Data" will not
yet have been created. We don't want to move Crashpad initialization
later in startup, so we instead create the directory if it does not
exist.

Note that this is calling file_util::CreateDirectory(), rather than
CreateDirectoryW() which means the full parent tree will be created, not
just the last entry in the path.

R=thakis@chromium.org,wfh@chromium.org
TEST=remove local user data dir, install chrome, confirm that chrome --process-type=crashpad-handler exists on first run
BUG= 591504 

Review URL: https://codereview.chromium.org/1774573002

Cr-Commit-Position: refs/heads/master@{#379676}
(cherry picked from commit 92905ef36a30be9be9041d8ee07ccd6e7ca45d64)

Review URL: https://codereview.chromium.org/1790493003 .

Cr-Commit-Position: refs/branch-heads/2623@{#613}
Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}

[modify] https://crrev.com/4a5c529d37e17c3ea7def8aa7de2507a5548d84d/chrome/common/chrome_paths_win.cc

Status: Fixed (was: Assigned)

Sign in to add a comment