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

Issue 2708883006: Add possibility to ignore unregistered crash keys. Use this from WebView (Closed)

Created:
3 years, 10 months ago by gsennton
Modified:
3 years, 9 months ago
CC:
chromium-reviews, android-webview-reviews_chromium.org, vmpstr+watch_chromium.org, Torne
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add possibility to ignore unregistered crash keys. Use this from WebView WebView should only use a subset of the crash keys used throughout the different chrome-layers. Before this change the crash-logging mechanism would simply try to add unregistered keys regardless of whether they fit in the crash-key storage. BUG=691560

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -1 line) Patch
M android_webview/common/crash_reporter/crash_keys.cc View 1 chunk +2 lines, -1 line 0 comments Download
M base/debug/crash_logging.h View 1 chunk +7 lines, -0 lines 0 comments Download
M base/debug/crash_logging.cc View 4 chunks +16 lines, -0 lines 0 comments Download
M base/debug/crash_logging_unittest.cc View 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
gsennton
tobiasjs@chromium.org: android_webview/ mark@chromium.org: base/debug/ rsesek@: FYI
3 years, 10 months ago (2017-02-22 16:44:43 UTC) #2
Robert Sesek
See my comment here: https://codereview.chromium.org/2694083004/#msg24
3 years, 10 months ago (2017-02-22 16:45:20 UTC) #3
Robert Sesek
(continuing discussion from the other CL) On 2017/02/22 16:48:59, Tobias Sargeant wrote: > On 2017/02/22 ...
3 years, 10 months ago (2017-02-23 20:35:11 UTC) #4
gsennton
On 2017/02/23 20:35:11, Robert Sesek wrote: > (continuing discussion from the other CL) > > ...
3 years, 10 months ago (2017-02-24 14:59:34 UTC) #5
Robert Sesek
3 years, 10 months ago (2017-02-24 16:00:18 UTC) #6
On 2017/02/24 14:59:34, gsennton wrote:
> Alright whitelisting sounds like the way to go here.
> We (me and Toby) scoped this out:
> 
> 1. Whitelist:
> We'll add a whitelist to breakpad_linux.cc, which will be applied in
> breakpad_linux::SetCrashKeyValue.

That seems fine, since there's no way to get a key-value. The other option would
be to filter at report time.

> The whitelist will only be enabled for WebView, and we will whitelist the keys
> that are currently in android_webview//crash_keys.cc.
> This whitelist mechanism will have to support adding crash values that span
> several chunks - i.e. it will have to match '[crash key]-%d' for crash values
> that are bigger than kSmallSize.

It's probably easiest to keep it simple: whitelist up to the N chunks that are
declared.

> 2. Registered keys for WebView
> WebView will have to register almost all keys registered by Chrome (probably
> including command-line related keys but excluding extension-related keys).

I'd keep the lists identical because that's easier to reason about, and there's
no benefit to skipping certain keys.

> 3. Test
> We should be able to test that
> a) A key that is whitelisted does get printed to a WebView minidump.
> b) A key that isn't whitelisted doesn't get printed to a WebView minidumps.
> We will do this using AwDebugTest
>
https://cs.chromium.org/chromium/src/android_webview/javatests/src/org/chromi...
> by registering one or several debug-keys for WebView, adding (or not adding)
> these keys to the whitelist, and then reading the dump from AwDebugTest to
> ensure that the whitelisted keys are in there.

This may be easier to test in native, since it's all C++, but yes, a test for
this would be important.

Powered by Google App Engine
This is Rietveld 408576698