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

Issue 2515353005: [Android WebView] Implement copying and uploading of Minidumps. (Closed)

Created:
4 years ago by gsennton
Modified:
4 years ago
CC:
chromium-reviews, kalyank, sadrul, android-webview-reviews_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android WebView] Implement copying and uploading of Minidumps. During WebView start-up after crashing WebView, we will pass previously created minidumps to CrashReceiverService which copies the minidumps to the current WebView provider's data directory and starts a job through JobScheduler. This job will eventually start a MinidumpUploadJobService which in turn uploads Minidumps to Crash servers. Both the copying-service and the upload-service run in processes separate from the crashing app-process. BUG=652730 Committed: https://crrev.com/19b0d1b784a9581b02a5dbe8e6fa1d2556743e75 Cr-Commit-Position: refs/heads/master@{#440130}

Patch Set 1 #

Patch Set 2 : Add test to ensure copying + uploading implementations work together. #

Total comments: 6

Patch Set 3 : Add some more tests, move back getCrashType() from CrashFileManager to MDUS. #

Total comments: 1

Patch Set 4 : Make minidump-copying serialized, put temporary copy-files in separate directory. #

Patch Set 5 : Removed some incorrect/unnecessary minor stuff (comments/logs). #

Total comments: 85

Patch Set 6 : Fix most of Ilya's comments (a couple of bugs and some javadocs comments). #

Total comments: 2

Patch Set 7 : Add storage/app-throttling + minidump file size restriction. #

Total comments: 8

Patch Set 8 : Add command line argument to ensure minidump uploading is turned off by default. #

Patch Set 9 : Remove debug logging. #

Total comments: 12

Patch Set 10 : Fix (most of) Toby's comments. #

Total comments: 23

Patch Set 11 : Fix Ilya's comments + change upload-job back-off timing. #

Total comments: 4

Patch Set 12 : Fix Ilya's comments for realz (count maxTried minidumps towards minidump limit). #

Patch Set 13 : Fix bug that deleted the newest minidump instead of the oldest when copying a minidump after hittin… #

Patch Set 14 : Add minidump-component deps to android_webview. Fix file-io-related trybot issues. #

Total comments: 2

Patch Set 15 : Fix trybot failures + close ParcelFDs after use + fix Ilya's nit. #

Patch Set 16 : Fix findbugs errors. #

Patch Set 17 : Fix findbugs errors for realz! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1588 lines, -5 lines) Patch
M android_webview/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +27 lines, -0 lines 0 comments Download
M android_webview/apk/java/AndroidManifest.xml View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
M android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java View 1 1 chunk +1 line, -0 lines 0 comments Download
M android_webview/java/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +86 lines, -0 lines 0 comments Download
A android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +247 lines, -0 lines 0 comments Download
A android_webview/java/src/org/chromium/android_webview/crash/ICrashReceiverService.aidl View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
A android_webview/java/src/org/chromium/android_webview/crash/MinidumpUploadJobService.java View 1 2 3 4 5 6 7 8 1 chunk +71 lines, -0 lines 0 comments Download
A android_webview/java/src/org/chromium/android_webview/crash/MinidumpUploader.java View 1 2 3 4 5 6 7 1 chunk +30 lines, -0 lines 0 comments Download
A android_webview/java/src/org/chromium/android_webview/crash/MinidumpUploaderImpl.java View 1 2 3 4 5 6 7 8 9 11 1 chunk +187 lines, -0 lines 0 comments Download
A android_webview/java/src/org/chromium/android_webview/crash/SynchronizedWebViewCommandLine.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +59 lines, -0 lines 0 comments Download
M android_webview/javatests/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
A android_webview/javatests/src/org/chromium/android_webview/test/crash/MinidumpUploaderTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +479 lines, -0 lines 0 comments Download
M android_webview/test/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M components/minidump_uploader/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +181 lines, -3 lines 0 comments Download
M components/minidump_uploader/android/javatests/src/org/chromium/components/minidump_uploader/CrashFileManagerTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +190 lines, -0 lines 0 comments Download
M components/minidump_uploader/android/javatests/src/org/chromium/components/minidump_uploader/CrashTestCase.java View 1 2 1 chunk +1 line, -1 line 0 comments Download
M components/minidump_uploader/android/javatests/src/org/chromium/components/minidump_uploader/MinidumpUploadCallableTest.java View 1 2 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 63 (15 generated)
gsennton
Just uploading this for visibility right now.
4 years ago (2016-11-23 12:09:20 UTC) #2
gsennton
Hi Ilya, I'm not asking for this to be reviewed yet (there are too many ...
4 years ago (2016-11-29 14:21:09 UTC) #4
Ilya Sherman
https://codereview.chromium.org/2515353005/diff/20001/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java File components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java (right): https://codereview.chromium.org/2515353005/diff/20001/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java#newcode436 components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java:436: // TODO does it make any sense to put ...
4 years ago (2016-11-30 01:26:04 UTC) #5
gsennton
https://codereview.chromium.org/2515353005/diff/20001/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java File components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java (right): https://codereview.chromium.org/2515353005/diff/20001/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java#newcode436 components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java:436: // TODO does it make any sense to put ...
4 years ago (2016-11-30 17:37:50 UTC) #6
Tobias Sargeant
> Urk, are there any such devices? :) > Not sure how to ensure this ...
4 years ago (2016-11-30 17:57:36 UTC) #7
Ilya Sherman
On 2016/11/30 17:57:36, Tobias Sargeant wrote: > > Urk, are there any such devices? :) ...
4 years ago (2016-12-01 00:42:44 UTC) #8
Tobias Sargeant
On 2016/12/01 00:42:44, Ilya Sherman wrote: > On 2016/11/30 17:57:36, Tobias Sargeant wrote: > > ...
4 years ago (2016-12-01 10:45:20 UTC) #9
gsennton
On 2016/12/01 10:45:20, Tobias Sargeant wrote: > On 2016/12/01 00:42:44, Ilya Sherman wrote: > > ...
4 years ago (2016-12-01 13:23:24 UTC) #10
Tobias Sargeant
On 2016/12/01 13:23:24, gsennton wrote: > We are only talking about tmp-files here so they ...
4 years ago (2016-12-01 13:52:20 UTC) #11
gsennton
On 2016/12/01 13:52:20, Tobias Sargeant wrote: > On 2016/12/01 13:23:24, gsennton wrote: > > > ...
4 years ago (2016-12-01 16:01:05 UTC) #12
Ilya Sherman
On 2016/12/01 16:01:05, gsennton wrote: > On 2016/12/01 13:52:20, Tobias Sargeant wrote: > > On ...
4 years ago (2016-12-02 03:34:01 UTC) #13
gsennton
Regarding your suggestion Ilya: I could be wrong but it feels like only applying the ...
4 years ago (2016-12-02 12:48:51 UTC) #14
gsennton
On 2016/12/02 12:48:51, gsennton wrote: > Regarding your suggestion Ilya: > I could be wrong ...
4 years ago (2016-12-02 13:50:37 UTC) #15
Ilya Sherman
Sorry, I might not have a chance to take a look today. Will try to ...
4 years ago (2016-12-06 04:10:20 UTC) #16
gsennton
On 2016/12/06 04:10:20, Ilya Sherman wrote: > Sorry, I might not have a chance to ...
4 years ago (2016-12-06 09:12:29 UTC) #17
gsennton
On 2016/12/06 04:10:20, Ilya Sherman wrote: > Sorry, I might not have a chance to ...
4 years ago (2016-12-06 09:12:30 UTC) #18
gsennton
Alright! In PS5 the copying of minidumps is serialized so we don't run into any ...
4 years ago (2016-12-06 16:03:36 UTC) #19
Ilya Sherman
Haven't looked at the API uses yet, will try to get to that later today. ...
4 years ago (2016-12-06 22:35:47 UTC) #20
Ilya Sherman
I didn't fully read/think through the MinidumpUploaderImpl code yet. I think it might be useful ...
4 years ago (2016-12-07 00:59:20 UTC) #21
gsennton
Thanks for the review Ilya! There is a design doc here: https://docs.google.com/a/google.com/document/d/1xFkDwIwr3_XzGhohi_BnpPs0G8KI1Osb1Af1oZjE_fQ/edit?usp=sharing Most of what ...
4 years ago (2016-12-07 18:51:44 UTC) #22
Ilya Sherman
Sorry, again not going to have a chance to make a thorough pass today; will ...
4 years ago (2016-12-08 06:55:48 UTC) #23
Ilya Sherman
In the meantime, responding to in-progress comment-conversations =) https://codereview.chromium.org/2515353005/diff/80001/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java File android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java (right): https://codereview.chromium.org/2515353005/diff/80001/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java#newcode211 android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java:211: minidumpFiles[i].delete(); ...
4 years ago (2016-12-08 07:32:30 UTC) #24
gsennton
Thanks Ilya! Don't worry about not having had time to do a thorough pass - ...
4 years ago (2016-12-08 17:14:03 UTC) #25
Ilya Sherman
https://codereview.chromium.org/2515353005/diff/80001/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java File android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java (right): https://codereview.chromium.org/2515353005/diff/80001/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java#newcode217 android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java:217: // XXX: are we prepared to just lose crashes ...
4 years ago (2016-12-09 00:42:08 UTC) #26
Ilya Sherman
And a code comment: https://codereview.chromium.org/2515353005/diff/100001/android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java File android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java (right): https://codereview.chromium.org/2515353005/diff/100001/android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java#newcode85 android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java:85: if (copyMinidumps(context, appPackageName, fileDescriptors) && ...
4 years ago (2016-12-09 00:46:32 UTC) #27
gsennton
Woop woop, it feels like we are getting closer :) https://codereview.chromium.org/2515353005/diff/80001/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java File android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java (right): https://codereview.chromium.org/2515353005/diff/80001/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java#newcode217 ...
4 years ago (2016-12-09 23:08:40 UTC) #28
Ilya Sherman
Thanks, Gustav! I think I should probably make another thorough pass through the files and ...
4 years ago (2016-12-13 07:24:22 UTC) #29
gsennton
Cool, yeah looking at the overall design is a good idea :). Let me know ...
4 years ago (2016-12-13 14:45:46 UTC) #30
gsennton
Hey Toby and Ilya, PS9 is functionally equivalent to PS8 - I just removed debug ...
4 years ago (2016-12-15 10:17:38 UTC) #31
Tobias Sargeant
https://codereview.chromium.org/2515353005/diff/160001/android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java File android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java (right): https://codereview.chromium.org/2515353005/diff/160001/android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java#newcode171 android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java:171: // TODO(gsennton): add UMA metric to ensure we aren't ...
4 years ago (2016-12-15 13:24:01 UTC) #32
gsennton
https://codereview.chromium.org/2515353005/diff/160001/android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java File android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java (right): https://codereview.chromium.org/2515353005/diff/160001/android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java#newcode171 android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java:171: // TODO(gsennton): add UMA metric to ensure we aren't ...
4 years ago (2016-12-15 14:47:21 UTC) #33
Tobias Sargeant
https://codereview.chromium.org/2515353005/diff/160001/android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java File android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java (right): https://codereview.chromium.org/2515353005/diff/160001/android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java#newcode171 android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java:171: // TODO(gsennton): add UMA metric to ensure we aren't ...
4 years ago (2016-12-15 15:04:10 UTC) #34
Ilya Sherman
Okay, the high-level structure looks good! Just some nitty gritties =) https://codereview.chromium.org/2515353005/diff/180001/android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java File android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java (right): ...
4 years ago (2016-12-19 03:34:03 UTC) #35
gsennton
Wow, thanks for looking at this Ilya! I guess all I need now is a ...
4 years ago (2016-12-19 14:28:27 UTC) #36
Ilya Sherman
Thanks! This basically LGTM. I still have a small quibble, but it could easily be ...
4 years ago (2016-12-19 21:26:54 UTC) #37
gsennton
Thanks a lot Ilya! I ended up posting a couple of new patch sets - ...
4 years ago (2016-12-20 13:32:53 UTC) #38
Tobias Sargeant
LGTM. I look forward to witnessing the firepower of this fully armed and operational battle ...
4 years ago (2016-12-20 14:24:47 UTC) #39
gsennton
Cool, thanks Toby! Given that I have fixed Ilya's comments in PS12, PS13 is a ...
4 years ago (2016-12-20 14:38:48 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2515353005/240001
4 years ago (2016-12-20 14:43:11 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/337861)
4 years ago (2016-12-20 15:37:25 UTC) #45
sgurun-gerrit only
On 2016/12/20 15:37:25, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years ago (2016-12-20 18:05:24 UTC) #48
Ilya Sherman
Thanks, Gustav! Still LGTM, with one minor comment that could easily be addressed in a ...
4 years ago (2016-12-21 03:23:26 UTC) #49
gsennton
For the record, Selim's l g t m was for the DEPS changes under android_webview/ ...
4 years ago (2016-12-21 10:36:04 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2515353005/300001
4 years ago (2016-12-21 11:49:43 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/184904)
4 years ago (2016-12-21 13:30:57 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2515353005/320001
4 years ago (2016-12-21 14:28:30 UTC) #58
commit-bot: I haz the power
Committed patchset #17 (id:320001)
4 years ago (2016-12-21 16:56:16 UTC) #61
commit-bot: I haz the power
4 years ago (2016-12-21 16:58:31 UTC) #63
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/19b0d1b784a9581b02a5dbe8e6fa1d2556743e75
Cr-Commit-Position: refs/heads/master@{#440130}

Powered by Google App Engine
This is Rietveld 408576698