New issue
Advanced search Search tips

Issue 691507 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 546953



Sign in to add a comment

Add support for crash reporting

Project Member Reported by skyos...@chromium.org, Feb 13 2017

Issue description

We should add support for creating minidumps in headless mode. Initially this would be breakpad for Linux, followed by crashpad for mac/win. The API is the following plus the equivalent command line flags:

HeadlessBrowser::Options::Builder builder;
builder.SetCrashReportingEnabled(true);  // Turn on crash dumps.
builder.SetCrashDumpDir(dir); 	         // Specify dir where crash dumps will be written.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 13 2017

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

commit da9d63951e492f669ea947d700d3bafc5bfdd0e5
Author: skyostil <skyostil@chromium.org>
Date: Mon Feb 13 12:25:18 2017

headless: Add generated version header

This header can be used to determine which Chromium revision was used to
build headless.

BUG= 691507 

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

[modify] https://crrev.com/da9d63951e492f669ea947d700d3bafc5bfdd0e5/headless/BUILD.gn
[add] https://crrev.com/da9d63951e492f669ea947d700d3bafc5bfdd0e5/headless/public/version.h.in

Project Member

Comment 2 by bugdroid1@chromium.org, Feb 15 2017

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

commit c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4
Author: skyostil <skyostil@chromium.org>
Date: Wed Feb 15 10:37:27 2017

headless: Add support for minidump generation on Linux

This patch adds support for minidump generation in headless mode. This
is controlled by two new browser settings:

- SetCrashReporterEnabled: Turns crash reporter on or off. Off by
  default.
- SetCrashDumpsDir: Controls where crash dumps are written. Uses the
  directory of the executable by default.

Headless Shell is also modified to accept the equivalent command line
flags: --enable-crash-reporter and --crash-dumps-dir. Note that we don't
enable crash dumps automatically because we currently can't determine
whether the user has opted into metrics reporting.

In official builds, the generated minidumps are also uploaded
automatically. This can be disabled either with --disable-breakpad or by
setting the CHROME_HEADLESS environment variable to indicate an
unattended testing mode (as with regular Chrome).

Design doc:
https://docs.google.com/document/d/1l6AGOOBLk99PaAKoZQW_DVhM8FQ6Fut27lD938CRbTM/edit#

BUG= 691507 

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

[modify] https://crrev.com/c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4/headless/BUILD.gn
[modify] https://crrev.com/c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4/headless/DEPS
[modify] https://crrev.com/c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4/headless/app/headless_shell.cc
[modify] https://crrev.com/c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4/headless/app/headless_shell_switches.cc
[modify] https://crrev.com/c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4/headless/app/headless_shell_switches.h
[modify] https://crrev.com/c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4/headless/lib/browser/headless_content_browser_client.cc
[modify] https://crrev.com/c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4/headless/lib/browser/headless_content_browser_client.h
[modify] https://crrev.com/c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4/headless/lib/embedder_mojo_browsertest.cc
[modify] https://crrev.com/c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4/headless/lib/headless_browser_browsertest.cc
[modify] https://crrev.com/c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4/headless/lib/headless_content_main_delegate.cc
[modify] https://crrev.com/c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4/headless/lib/headless_content_main_delegate.h
[add] https://crrev.com/c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4/headless/lib/headless_crash_reporter_client.cc
[add] https://crrev.com/c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4/headless/lib/headless_crash_reporter_client.h
[add] https://crrev.com/c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4/headless/lib/headless_macros.h
[modify] https://crrev.com/c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4/headless/public/headless_browser.cc
[modify] https://crrev.com/c3c9701cc44e6cb38e78c8e1d9d2bca5a74726a4/headless/public/headless_browser.h

Components: Internals>Headless
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 26 2017

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

commit 2824ef26127320c50ce1f64d2b0f02233ecfabb4
Author: Sami Kyostila <skyostil@chromium.org>
Date: Tue Sep 26 16:13:14 2017

headless: Enable crash reporting in headless mode by default

This patch turns on crash reporting in headless mode by default. This
helps us diagnose headless-only crashes. Crash reporting can be disabled
with the --disable-crash-reporter command line flag.

Note that this only affects Headless Shell and --headless; C++ embedders
of headless are not affected.

BUG= 691507 

Change-Id: I5f100908a9fdaf6ddeac0c3bd13d07ba50e89402
Reviewed-on: https://chromium-review.googlesource.com/684020
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504384}
[modify] https://crrev.com/2824ef26127320c50ce1f64d2b0f02233ecfabb4/headless/app/headless_shell.cc
[modify] https://crrev.com/2824ef26127320c50ce1f64d2b0f02233ecfabb4/headless/app/headless_shell_switches.cc
[modify] https://crrev.com/2824ef26127320c50ce1f64d2b0f02233ecfabb4/headless/app/headless_shell_switches.h

Status: Fixed (was: Started)

Sign in to add a comment