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

Issue 19969003: Android: distinguish between crashes and out-of-memory kills in content (Closed)

Created:
7 years, 5 months ago by ppi
Modified:
7 years, 4 months ago
Reviewers:
joth, Yaron, klobag.chromium
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, android-webview-reviews_chromium.org, Yaron, Philippe
Visibility:
Public.

Description

Android: distinguish between crashes and out-of-memory kills in content The process management logic in the content layer adjusts the renderer out-of-memory priority allowing the OS to kill inactive renderers when under memory pressure. Separately, content layer is also responsible for notyfing the ContentView clients about death of the renderer process that backs the ContentView, while the death can be caused either by the out-of-memory kill or an actual process crash. It would be useful to notify the clients not only that the process died, but also about the out-of-memory priority of the process upon its death - otherwise the clients have to employ heuristics to distinguish between crashes and out-of-memory kills which inevitably leads to tricky corner-cases. This patch makes ChildProcessLauncher an authoritative agent that keeps track of the bindings that raise the renderer process priority in order to protect it from out-of-memory killing. ChildProcessConnections use callbacks to notify ChildProcessLauncher each time a high priority connection is bound or unbound. Delegating this logic to ChildProcessLauncher allows to escape threading problems, as ChildProcessConnection might be notified about process disconnection (and hence closed) before as well as after the content layer detects a missing renderer and the ContentView client is notified. BUG=263047 R=joth@chromium.org, yfriedman@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=214366

Patch Set 1 : #

Total comments: 8

Patch Set 2 : Address remarks. #

Total comments: 12

Patch Set 3 : Address further remarks & rebase. #

Total comments: 2

Patch Set 4 : Address onConnected() reentrancy issue, describe interfaces in JavaDoc, rebase. #

Patch Set 5 : Rebase. #

Patch Set 6 : Amend assert in onRenderProcessSwap(). #

Messages

Total messages: 23 (0 generated)
ppi
Hi, Could you please have a look at this as well?
7 years, 5 months ago (2013-07-22 18:42:06 UTC) #1
joth
https://codereview.chromium.org/19969003/diff/2001/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java File android_webview/java/src/org/chromium/android_webview/AwContentsClient.java (right): https://codereview.chromium.org/19969003/diff/2001/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java#newcode110 android_webview/java/src/org/chromium/android_webview/AwContentsClient.java:110: } you can just delete this method right away ...
7 years, 5 months ago (2013-07-22 22:07:42 UTC) #2
Yaron
I'll leave this for posterity, but I'm not sure it's really worth pursuing. I had ...
7 years, 5 months ago (2013-07-23 01:23:37 UTC) #3
ppi
Thanks, Jonathan and Yaron! I have addressed your remarks in patch set 2. As to ...
7 years, 5 months ago (2013-07-23 18:41:57 UTC) #4
joth
https://codereview.chromium.org/19969003/diff/14001/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java File content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java (right): https://codereview.chromium.org/19969003/diff/14001/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java#newcode180 content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java:180: private static SparseIntArray mOomBindingCount = new SparseIntArray(); nit: sOomBindingCount ...
7 years, 5 months ago (2013-07-23 21:39:09 UTC) #5
ppi
Thanks a lot, Jonathan! I have addressed your remarks in patch set 3 and in ...
7 years, 5 months ago (2013-07-24 12:27:12 UTC) #6
joth
lgtm
7 years, 5 months ago (2013-07-24 16:57:24 UTC) #7
ppi
Thanks, Jonathan! Yaron, are you ok with landing the patch the way it is?
7 years, 5 months ago (2013-07-24 18:17:40 UTC) #8
Yaron
lgtm https://codereview.chromium.org/19969003/diff/21001/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java File content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java (right): https://codereview.chromium.org/19969003/diff/21001/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java#newcode37 content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java:37: // Used to notify the consumer about disconnection ...
7 years, 5 months ago (2013-07-24 19:08:22 UTC) #9
ppi
Thanks a lot! I realized that calling the onConnected() callback in certain circumstances directly reenters ...
7 years, 5 months ago (2013-07-25 13:57:53 UTC) #10
Yaron
lgtm
7 years, 5 months ago (2013-07-25 20:24:24 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ppi@chromium.org/19969003/47002
7 years, 4 months ago (2013-07-29 09:13:43 UTC) #12
commit-bot: I haz the power
Retried try job too often on win7_aura for step(s) interactive_ui_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win7_aura&number=64474
7 years, 4 months ago (2013-07-29 11:02:03 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ppi@chromium.org/19969003/47002
7 years, 4 months ago (2013-07-29 11:36:10 UTC) #14
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 4 months ago (2013-07-29 12:18:16 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ppi@chromium.org/19969003/47002
7 years, 4 months ago (2013-07-29 12:27:52 UTC) #16
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 4 months ago (2013-07-29 12:44:45 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ppi@chromium.org/19969003/47002
7 years, 4 months ago (2013-07-29 14:27:42 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ppi@chromium.org/19969003/94001
7 years, 4 months ago (2013-07-29 16:40:16 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ppi@chromium.org/19969003/94001
7 years, 4 months ago (2013-07-30 01:48:22 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ppi@chromium.org/19969003/94001
7 years, 4 months ago (2013-07-30 12:24:19 UTC) #21
ppi
The trybots are green, but the patch has been stuck in the CQ for almost ...
7 years, 4 months ago (2013-07-30 15:56:44 UTC) #22
ppi
7 years, 4 months ago (2013-07-30 16:51:36 UTC) #23
Message was sent while issue was closed.
Committed patchset #6 manually as r214366 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698