New issue
Advanced search Search tips

Issue 875995 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 23
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac , Fuchsia
Pri: 1
Type: Bug

Blocking:
issue 873214



Sign in to add a comment

Avoid freezing visible pages in page scheduler

Project Member Reported by shaseley@google.com, Aug 20

Issue description

On the embedder page freezing path, the page and frame schedulers fire DCHECKS and NOTREACHED if attempting to freeze a visible page. On release builds, the freeze will succeed, leaving the scheduler in a possibly bad state. Furthermore, on Chrome OS, NOTREACHED will result in error log messages.

The page scheduler should be defensive and reject the freeze in cases where the page is visible.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 21

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

commit 6f67719f5ea0360a9099e114b26c8d18c8a3fd3d
Author: Scott Haseley <shaseley@google.com>
Date: Tue Aug 21 02:18:22 2018

[scheduler] Do not allow freezing visible pages in PageSchedulerImpl

We have a DCHECK and a NOTREACHED that fire when freezing a visible
page, but the freeze will still succeed on release builds. This CL adds
a check to ensure visible pages cannot be frozen by the embedder.

Bug:  875995 
Change-Id: I933c5e9377e0fa9670c60efa6deb2ced7ef1601b
Reviewed-on: https://chromium-review.googlesource.com/1180503
Commit-Queue: Scott Haseley <shaseley@google.com>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584597}
[modify] https://crrev.com/6f67719f5ea0360a9099e114b26c8d18c8a3fd3d/third_party/blink/renderer/platform/scheduler/main_thread/page_scheduler_impl.cc

Status: Fixed (was: Started)
Labels: Merge-Approved-69
Cc: panicker@chromium.org
Labels: -Merge-Approved-69 Merge-Request-69
Before we approve merge to M69, please answer followings:
* Is this M69 regression? Is it critical?
* Is the change well baked/verified in Canary, having enough automation tests coverage and safe to merge to M69?
* Any other important details to justify the merge.

Please note M69 is going to stable VERY soon, so we're only taking absolutely critical and safe merges in at this point. Thank you.

Project Member

Comment 7 by sheriffbot@chromium.org, Aug 23

Labels: -Merge-Request-69 Merge-Review-69 Hotlist-Merge-Review
This bug requires manual review: We are only 11 days from stable.
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), kariahda@(iOS), cindyb@(ChromeOS), govind@(Desktop)

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

* Is this M69 regression? Is it critical?
Yes. It is a stability improvement, will remove lot of log errors (see crbug//873214) and the risk of freezing pages that are visible to the user.

* Is the change well baked/verified in Canary, having enough automation tests coverage and safe to merge to M69?
Yes, it will well tested, verified in canary, it fixes the issue in crbug/873214

* Any other important details to justify the merge.
Freezing & Discarding is an important new feature in the birthday release of Chrome.
This fixes an important bug in freezing - where visible pages could be frozen -- which would be a very bad user experience.


crbug//873214 is for Chrome OS. Is this merge request is for Chrome OS only?
No, we would want this for all desktop platforms. Because of how Chrome OS compiles NOTREACHED on release bugs (it logs them), we were able to figure out that this was happening. We changed a similar check to a dump w/o crashing and found this is an issue on multiple platforms (see crbug/873214 here also).
^ release builds, not bugs
Labels: -Merge-Review-69 Merge-Approved-69
Approving merge to M69 branch 3497 based on comment #8. Please merge ASAP, Thank you.
Project Member

Comment 13 by bugdroid1@chromium.org, Aug 24

Labels: -merge-approved-69 merge-merged-3497
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eec902abb5a888786d3bd0c83ef23e9914d6c12d

commit eec902abb5a888786d3bd0c83ef23e9914d6c12d
Author: Scott Haseley <shaseley@google.com>
Date: Fri Aug 24 00:22:59 2018

[scheduler] Do not allow freezing visible pages in PageSchedulerImpl

We have a DCHECK and a NOTREACHED that fire when freezing a visible
page, but the freeze will still succeed on release builds. This CL adds
a check to ensure visible pages cannot be frozen by the embedder.

Bug:  875995 
Change-Id: I933c5e9377e0fa9670c60efa6deb2ced7ef1601b
Reviewed-on: https://chromium-review.googlesource.com/1180503
Commit-Queue: Scott Haseley <shaseley@google.com>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#584597}(cherry picked from commit 6f67719f5ea0360a9099e114b26c8d18c8a3fd3d)
Reviewed-on: https://chromium-review.googlesource.com/1187097
Reviewed-by: Shubhie Panicker <panicker@chromium.org>
Cr-Commit-Position: refs/branch-heads/3497@{#796}
Cr-Branched-From: 271eaf50594eb818c9295dc78d364aea18c82ea8-refs/heads/master@{#576753}
[modify] https://crrev.com/eec902abb5a888786d3bd0c83ef23e9914d6c12d/third_party/blink/renderer/platform/scheduler/main_thread/page_scheduler_impl.cc

Sign in to add a comment