Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Issue 2128683002: Collect unclean shutdown debug information (Closed)

Created:
4 years, 5 months ago by manzagop (departed)
Modified:
4 years, 3 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@tracker
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Collect unclean shutdown debug information Introduces PostmortemReportCollector which harvests unclean shutdown debug information to a protocol buffer, wraps this proto inside a barebone minidump and registers the minidump with CrashPad for upload. Notes: - This is experimental work that currently only targets the windows canary channel (using an experiment). - Reports are collected as part of the metrics service client initialization task chain. - CrashPad handles consent checking/uploading/throttling. - Manufacturing the minidump is a temporary approach. Longer term, Crashpad should handle this. - This first version also collects reports for crashes. Longer term, the reports pertaining to crashes will be bundled with the crash reports. - Stability file naming is revised so a unique file name is used every time. TODOs for subsequent CL: - fleshing out the contents of the stability report - avoid reports from clean exits on the fast exit path - fix report collection stats version attribution on upgrade TEST - launch chrome with the stability instrumentation (--enable-features=StabilityDebugging) - crash chrome by visiting chrome://chrome://inducebrowsercrashforrealz - Validate the existence of a stability file in <user-data-dir>/Stability - start chrome again - validate "ActivityTracker.Collect.*" metrics chrome://histograms/ActivityTracker - validate the presence of a new crash at chrome://crashes BUG=620813

Patch Set 1 #

Patch Set 2 : StabilityReport now contains module information. #

Patch Set 3 : Unit testing #

Patch Set 4 : Create minidump #

Patch Set 5 : Minimal collection to proto #

Total comments: 22

Patch Set 6 : Switch from ReporterDelegate to CrashReportDatabase #

Patch Set 7 : Add CrashpadInfo to minidump #

Total comments: 2

Patch Set 8 : Address bcwhite comments. #

Patch Set 9 : Merge #

Total comments: 54

Patch Set 10 : Address Siggi's comments #

Patch Set 11 : Revise stability file naming and wire in the collection #

Patch Set 12 : Merge #

Patch Set 13 : Merge #

Patch Set 14 : Revise changes to metrics provider #

Patch Set 15 : Rewire collection as a metrics init task #

Patch Set 16 : Merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1810 lines, -32 lines) Patch
M base/debug/activity_analyzer.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/chrome_browser_field_trials_desktop.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +32 lines, -12 lines 0 comments Download
M chrome/browser/metrics/chrome_metrics_service_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +14 lines, -2 lines 0 comments Download
M chrome/browser/metrics/chrome_metrics_service_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +26 lines, -4 lines 0 comments Download
M components/browser_watcher/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +60 lines, -0 lines 0 comments Download
M components/browser_watcher/DEPS View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
A components/browser_watcher/features.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +16 lines, -0 lines 0 comments Download
A components/browser_watcher/features.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +13 lines, -0 lines 0 comments Download
A components/browser_watcher/postmortem_minidump_writer.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +133 lines, -0 lines 0 comments Download
A components/browser_watcher/postmortem_minidump_writer_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +244 lines, -0 lines 0 comments Download
A components/browser_watcher/postmortem_minidump_writer_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +144 lines, -0 lines 0 comments Download
A components/browser_watcher/postmortem_report_collector.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +77 lines, -0 lines 0 comments Download
A components/browser_watcher/postmortem_report_collector.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +180 lines, -0 lines 0 comments Download
A components/browser_watcher/postmortem_report_collector_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +375 lines, -0 lines 0 comments Download
A components/browser_watcher/print_report_main_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +106 lines, -0 lines 0 comments Download
A components/browser_watcher/stability_debugging_win.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +32 lines, -0 lines 0 comments Download
A components/browser_watcher/stability_debugging_win.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +66 lines, -0 lines 0 comments Download
A components/browser_watcher/stability_debugging_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +83 lines, -0 lines 0 comments Download
A components/browser_watcher/stability_report.proto View 1 2 3 4 5 6 7 8 9 1 chunk +76 lines, -0 lines 0 comments Download
M components/browser_watcher/watcher_metrics_provider_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +31 lines, -4 lines 0 comments Download
M components/browser_watcher/watcher_metrics_provider_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +73 lines, -4 lines 0 comments Download
M components/browser_watcher/watcher_metrics_provider_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +11 lines, -5 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (21 generated)
manzagop (departed)
Hi bcwhite@, scottmg@, Could you have a look? Thanks, Pierre
4 years, 4 months ago (2016-08-03 21:45:25 UTC) #9
scottmg
Looks good, haven't read through postmortem_unittest.cc yet. https://codereview.chromium.org/2128683002/diff/200001/components/browser_watcher/BUILD.gn File components/browser_watcher/BUILD.gn (right): https://codereview.chromium.org/2128683002/diff/200001/components/browser_watcher/BUILD.gn#newcode5 components/browser_watcher/BUILD.gn:5: import("//third_party/protobuf/proto_library.gni") So ...
4 years, 4 months ago (2016-08-03 22:47:06 UTC) #10
bcwhite
lgtm https://codereview.chromium.org/2128683002/diff/200001/base/debug/activity_analyzer.cc File base/debug/activity_analyzer.cc (right): https://codereview.chromium.org/2128683002/diff/200001/base/debug/activity_analyzer.cc#newcode7 base/debug/activity_analyzer.cc:7: #include <utility> Why this? https://codereview.chromium.org/2128683002/diff/200001/components/browser_watcher/postmortem.cc File components/browser_watcher/postmortem.cc (right): ...
4 years, 4 months ago (2016-08-04 13:38:11 UTC) #11
manzagop (departed)
Thanks for the review! The new patch registers the minidump with crashpad and adds a ...
4 years, 4 months ago (2016-08-10 15:59:52 UTC) #13
bcwhite
https://codereview.chromium.org/2128683002/diff/240001/components/browser_watcher/postmortem_minidump_writer_win.cc File components/browser_watcher/postmortem_minidump_writer_win.cc (right): https://codereview.chromium.org/2128683002/diff/240001/components/browser_watcher/postmortem_minidump_writer_win.cc#newcode43 components/browser_watcher/postmortem_minidump_writer_win.cc:43: minidump_file_ = minidump_file; Does |minidump_file_| exist just to avoid ...
4 years, 4 months ago (2016-08-10 16:59:53 UTC) #15
manzagop (departed)
Addressed comment! https://codereview.chromium.org/2128683002/diff/240001/components/browser_watcher/postmortem_minidump_writer_win.cc File components/browser_watcher/postmortem_minidump_writer_win.cc (right): https://codereview.chromium.org/2128683002/diff/240001/components/browser_watcher/postmortem_minidump_writer_win.cc#newcode43 components/browser_watcher/postmortem_minidump_writer_win.cc:43: minidump_file_ = minidump_file; On 2016/08/10 16:59:52, bcwhite ...
4 years, 4 months ago (2016-08-11 13:40:47 UTC) #18
manzagop (departed)
Hi siggi@, Can you have a look? Thanks, Pierre
4 years, 4 months ago (2016-08-11 13:42:36 UTC) #20
Sigurður Ásgeirsson
sweet - first batch of comments. https://codereview.chromium.org/2128683002/diff/320001/components/browser_watcher/postmortem_minidump_writer.h File components/browser_watcher/postmortem_minidump_writer.h (right): https://codereview.chromium.org/2128683002/diff/320001/components/browser_watcher/postmortem_minidump_writer.h#newcode14 components/browser_watcher/postmortem_minidump_writer.h:14: #include "base/files/scoped_file.h" doesn't ...
4 years, 4 months ago (2016-08-11 17:44:15 UTC) #21
manzagop (departed)
Addressed most comments. I still need to: - move the code to a better home, ...
4 years, 4 months ago (2016-08-12 21:23:23 UTC) #22
manzagop (departed)
Short update: things seem to be working but I need to make some changes to ...
4 years, 3 months ago (2016-09-02 21:08:44 UTC) #30
manzagop (departed)
This is ready for another look!
4 years, 3 months ago (2016-09-07 20:45:39 UTC) #32
Sigurður Ásgeirsson
This CL looks pretty large and unwieldy, do you mind breaking it up? I'd suggest ...
4 years, 3 months ago (2016-09-08 15:38:40 UTC) #33
manzagop (departed)
Totatlly agree, sgtm! On Thu, Sep 8, 2016 at 11:38 AM, <siggi@chromium.org> wrote: > This ...
4 years, 3 months ago (2016-09-08 21:02:10 UTC) #34
bcwhite
LGTM for ActivityTracker interface. Looking forward to seeing this in the field!
4 years, 3 months ago (2016-09-16 16:47:51 UTC) #35
manzagop (departed)
4 years, 3 months ago (2016-09-22 18:14:17 UTC) #36
Closing this issue as it was broken up into:
- minidump writer https://codereview.chromium.org/2327043002/
- minidump dumper https://codereview.chromium.org/2339873003/
- report collector https://codereview.chromium.org/2339193003/
- wire it in https://codereview.chromium.org/2344343002/

Powered by Google App Engine
This is Rietveld 408576698