New issue
Advanced search Search tips

Issue 829725 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Apr 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

Renderer oom detection stops running after navigation / reloading / switching tabs

Project Member Reported by yuzus@chromium.org, Apr 6 2018

Issue description

Renderer stops calculating memory usage for near-oom intervention after navigation / reloading / switching tabs.

The state machine of oom_intervention_tab_helper seems to have some flaw.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 9 2018

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

commit 0d61eb50f96e3c7dcc813e03638dead88c219b62
Author: Yuzu Saijo <yuzus@chromium.org>
Date: Mon Apr 09 08:26:03 2018

Unbind binding_ in oom_intervention_tab_helper

This CL intends to fix a bug where renderer oom detection stops running after reloading / navigation / switching tabs. This was caused because binding_ was never unbound although it was stated as one of the requirements to start detection in renderer.

BUG= 829725 

Change-Id: I43507a5eb12a6206dca333be4d6d609b1c8fac72
Reviewed-on: https://chromium-review.googlesource.com/999224
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Yuzu Saijo <yuzus@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549123}
[modify] https://crrev.com/0d61eb50f96e3c7dcc813e03638dead88c219b62/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc
[modify] https://crrev.com/0d61eb50f96e3c7dcc813e03638dead88c219b62/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.h

Comment 2 by yuzus@chromium.org, Apr 9 2018

Status: Fixed (was: Assigned)
I discussed another possible solution to this problem with haraken@. It is to keep the same OomInterventionImpl instance for the same process regardless of navigation / reload / tab switching. 
Altough sharing the instance makes sense, it would complicate the code since oom_intervention_tab_helper needs to manage the list of OomInterventionImpl instances. 
So we decided not to keep the instance, but to continue with the current approach, which is to create and destroy the instance each time for navigation / reload / tab switch.
Labels: -Pri-3 Pri-1
Cc: haraken@chromium.org
Labels: Merge-Request-66 Merge-Request-65
We'd like to request a merge to stable and beta.

- The fix is a very low risk because 1) the fix is about a feature enabled only under Finch experiments (1%) and 2) the fix is very trivial.

- The fix is critical. A near-OOM intervention is a P1 project and we were planning to ship it after confirming numbers on the Finch experiments. However, it turned out that the existing code has a bug and we cannot get a meaningful result without applying the fix. Given the pressure to reduce a high OOM rate on Android Go devices, it's not really acceptable to wait for another 12 weeks until the fix is rolled out to the stable channel.

Would you consider approving the merge? I'm happy to provide more rationale if needed :)

Project Member

Comment 5 by sheriffbot@chromium.org, Apr 12 2018

Labels: -Merge-Request-66 Merge-Review-66 Hotlist-Merge-Review
This bug requires manual review: We are only 4 days from stable.
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), josafat@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 6 by cma...@chromium.org, Apr 12 2018

Add OS

Comment 7 by bashi@chromium.org, Apr 13 2018

Labels: OS-Android
It's Android only.

Comment 8 by cma...@chromium.org, Apr 17 2018

We are shipping M66 stable today so we cannot take this merge. The RC was cut last week and so this merge came to late.

Comment 9 by cma...@chromium.org, Apr 17 2018

Labels: -Hotlist-Merge-Review -Merge-Request-65 -Merge-Review-66 Merge-Approved-66
Approving based on offline discussion with bashi@. Please merge this into M66 branch and we will only ship it to stable if there is a respin.
Project Member

Comment 10 by bugdroid1@chromium.org, Apr 17 2018

Labels: -merge-approved-66 merge-merged-3359
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/919355d0aba43ab9729a3eb87dce0213d2dd06ed

commit 919355d0aba43ab9729a3eb87dce0213d2dd06ed
Author: Yuzu Saijo <yuzus@chromium.org>
Date: Tue Apr 17 23:02:24 2018

Unbind binding_ in oom_intervention_tab_helper

This CL intends to fix a bug where renderer oom detection stops running after reloading / navigation / switching tabs. This was caused because binding_ was never unbound although it was stated as one of the requirements to start detection in renderer.

BUG= 829725 

Change-Id: I43507a5eb12a6206dca333be4d6d609b1c8fac72
Reviewed-on: https://chromium-review.googlesource.com/999224
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Yuzu Saijo <yuzus@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#549123}(cherry picked from commit 0d61eb50f96e3c7dcc813e03638dead88c219b62)
Reviewed-on: https://chromium-review.googlesource.com/1016020
Cr-Commit-Position: refs/branch-heads/3359@{#731}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[modify] https://crrev.com/919355d0aba43ab9729a3eb87dce0213d2dd06ed/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc
[modify] https://crrev.com/919355d0aba43ab9729a3eb87dce0213d2dd06ed/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.h

Comment 11 by bashi@chromium.org, Apr 17 2018

Merged. Thanks!
Status: Verified (was: Fixed)
Verified in 66.0.3359.126 / Android Go 512Mb / 8.1.0 that near-OOM intervention infobar is shown after following steps,

Set near-OOM intervention flags on a 512MB device
In Chrome, navigate to a page which uses a lot of memory (used https://html.spec.whatwg.org) (used https://codepen.io/bashik7/full/bYbMPv?chunkSizeKB=128&intervalMillis=700 )
Open few more tabs and navigate to some URLs in them 
In the tab from 'Step 2' navigate to another heavy page (used https://codepen.io/bashik7/full/bYbMPv?chunkSizeKB=128&intervalMillis=700)
Navigate back after the page loads -> Gets back to Url in 'Step 2'
Wait for sometime and navigate forward -> Gets back to Url in 'Step 4'
Wait for ~5 mins (Memory usage count in increasing)
OBSERVED: After ~5 mins near-OOM intervention infobar is shown.

Sign in to add a comment