New issue
Advanced search Search tips

Issue 883071 link

Starred by 8 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 14
Cc:
Components:
EstimatedDays: ----
NextAction: 2018-09-14
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

[User Feedback - Stable] 250%+ increase in feedback reports about tabs automatically refreshing

Project Member Reported by melodychu@chromium.org, Sep 11

Issue description

Chrome Version: 69.0.3497.81
OS: Windows


User feedback examples:
When you open several tabs of the Chrome browser and change the tab without closing (obviously) the browser reloads the page; This occurs every time I change the tab. I do not know if it's a mistake, but it does not seem right that I have to wait for it to load everything again.

How can I stop reloading pages every single moment. Once I go from a tab to another, it starts reloading and because of this I miss much information. 

after chrome updated , my page always re-load after i leave for just 2-3 seconds , why its happen ?

After the last update, each time you change the tab, it recharges again. I can not, for example, be in a game or fill out a form and go to another flap because when I return, the page is not as I left

Screenshot of increase:
https://screenshot.googleplex.com/Uvs5gZCzdnH

Link:
http://shortn/_OgFuYiAAB0

 
Cc: pbomm...@chromium.org
Labels: Needs-Triage-M69
Components: Internals>ResourceCoordinator
Owner: chrisha@chromium.org
To Chris - for triage.
Cc: sebmarchand@chromium.org
Is this issue also reported on latest M69 stable release #69.0.3497.92?
Cc: fdoray@chromium.org
Note that ProactiveTabDiscarding hasn't been enabled on M69 Stable yet, so this isn't related to that.

I've noted that there's quite a difference between M68 and M69 for TabManager.Discarding.ReloadCount , but the other discarding metrics seems pretty stable... Could it be that the number of urgent discard interventions is the same but the UX change make people use more tabs and hence there more likely to reload a discarded tab?
Labels: ReleaseBlock-Stable Target-70 M-70 Target-69
Adding "RBS" for tracking, pls remove if needed. Thank you.
Cc: vamshi.kommuri@chromium.org
Labels: Triaged-ET Needs-Feedback
Unable to reproduce the issue on reported chrome version 69.0.3497.81 using Windows 10 with the below mentioned steps.
1. Launched Chrome
2. Opened Few webpages in various tabs.
3. Changed/navigated between the tabs.
We didn't observe the webpages getting refreshed. Attaching the screen cast of the same for reference.

@melodychu: Could you please have a look at the screencast and let us know if we have missed anything in the process. Any further inputs from your end may be helpful.

Thanks!

883071.mp4
6.7 MB View Download
The session restore changes could *also* look like tab refreshes (we decide not to load tabs that are not deemed sufficiently important), but that code is also not yet enabled on stable (about to go to 1% experiment). Color me very confused as to what could have changed to be causing discards.

We do have a diagnostics page for the feature available at chrome://discards/
It would be great if we could get a screenshot of that page from an affected user to see if this is truly due to discarding.
Okay... more digging here. There was *one* change to the discarding policy that did make it in M69 that also affects urgent discards: specifically, we used to limit urgent discards to at most once per tab, as a band-aid fix to systems that are effectively always under memory pressure. This logic was removed. I'm going to work on a small fix that we can merge back.
Is this bug only applicable to Windows or any other OSs too?
The issue is that when the machine is under memory pressure, we allow the same tab to be discarded multiple times. Before, on Windows and Mac, we had a protection that limited the number of discards per tab to 1. The limit never existed on Chrome OS. https://chromium.googlesource.com/chromium/src/+/a19a4e098a4c1fb019f0ade434dc116202bc7795/chrome/browser/resource_coordinator/tab_manager.cc#1079 So I guess we can say that only Windows and Mac are affected by the regression. Note: Discarding does not exist on mobile.
Labels: OS-Mac
From the stats at [1] we can estimate the following:

- Discarding.Urgent.TimeSinceLastUrgent shows that about 17% of people are seeing multiple consecutive discards (entries in the 5 second bucket).
- TabManager.Discarding.DiscardCount indicates that about 5% are in browsing session with 10+ discards, which would be a reasonable proxy for bad discarding behavior.
- TabManager.Discarding.ReloadCount indicates that About 4% of people are seeing more than 10 discard reloads in a session.

Comparing to M68 stable we see:

- Discarding.Urgent.TimeSinceLastUrgent shows that about 18% of people are seeing multiple consecutive discards (entries in the 5 second bucket).
- TabManager.Discarding.DiscardCount indicates that about 5% are in browsing session with 10+ discards, which would be a reasonable proxy for bad discarding behavior.
- TabManager.Discarding.ReloadCount indicates that About 2% of people are seeing more than 10 discard reloads in a session.

My best guess is that this is materially affecting somewhere around 2% of users (the increase seen in TabManager.Discarding.ReloadCount) on the Windows platform, and an order of magnitude fewer on the Mac platform. Other platforms are not affected.

[1] Internal only: https://uma.googleplex.com/p/chrome/histograms?endDate=20180910&dayCount=1&histograms=Discarding.Urgent.TimeSinceLastUrgent%2CTabManager.Discarding.DiscardCount%2CTabManager.Discarding.InactiveToReloadTime%2CTabManager.Discarding.ReloadCount&fixupData=true&uniqueUsers=true&showMax=true&filters=platform%2Ceq%2CW%2Cchannel%2Ceq%2C4%2Cmilestone%2Ceq%2C69%2Cisofficial%2Ceq%2CTrue&implicitFilters=isofficial
[Bulk Edit]

Tentative plan is to respin M69 stable early next week. Pls have safe fix ready to merge by this Friday 1:00 PM PT, 09/14 if this is indeed critical or target fix for M70. 
Fix should be in today, will merge back to M70 and try for M69 as well. Note that this doesn't block M69 release for now.
 chrisha@, when do you expect change to be landed in trunk?
Project Member

Comment 17 by bugdroid1@chromium.org, Sep 14

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

commit e9678b0ebc9d28877e51a8c2933203b27d31e37d
Author: Chris Hamilton <chrisha@chromium.org>
Date: Fri Sep 14 03:39:42 2018

Fix broken urgent discarding protections.

These were lost in the shuffle during refactoring for proactive discarding, and
are causing a small spike in user complaints.

BUG= 883071 

Change-Id: I367398a4a148d760910f2c2edca73765f5f3dcc5
Reviewed-on: https://chromium-review.googlesource.com/1224954
Commit-Queue: Chris Hamilton <chrisha@chromium.org>
Reviewed-by: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591283}
[modify] https://crrev.com/e9678b0ebc9d28877e51a8c2933203b27d31e37d/chrome/browser/resource_coordinator/lifecycle_unit_base.cc
[modify] https://crrev.com/e9678b0ebc9d28877e51a8c2933203b27d31e37d/chrome/browser/resource_coordinator/lifecycle_unit_base.h
[modify] https://crrev.com/e9678b0ebc9d28877e51a8c2933203b27d31e37d/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc
[modify] https://crrev.com/e9678b0ebc9d28877e51a8c2933203b27d31e37d/chrome/browser/resource_coordinator/tab_lifecycle_unit.h
[modify] https://crrev.com/e9678b0ebc9d28877e51a8c2933203b27d31e37d/chrome/browser/resource_coordinator/tab_lifecycle_unit_source_unittest.cc
[modify] https://crrev.com/e9678b0ebc9d28877e51a8c2933203b27d31e37d/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc
[modify] https://crrev.com/e9678b0ebc9d28877e51a8c2933203b27d31e37d/chrome/browser/resource_coordinator/tab_manager.h
[modify] https://crrev.com/e9678b0ebc9d28877e51a8c2933203b27d31e37d/chrome/browser/resource_coordinator/tab_manager_browsertest.cc
[modify] https://crrev.com/e9678b0ebc9d28877e51a8c2933203b27d31e37d/chrome/browser/resource_coordinator/tab_manager_unittest.cc

Project Member

Comment 18 by bugdroid1@chromium.org, Sep 14

Labels: merge-merged-3551
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aa2c98f33a00ae85da96b1e6e1b89c6dd28ab8df

commit aa2c98f33a00ae85da96b1e6e1b89c6dd28ab8df
Author: Chris Hamilton <chrisha@chromium.org>
Date: Fri Sep 14 03:41:40 2018

Fix broken urgent discarding protections.

These were lost in the shuffle during refactoring for proactive discarding, and
are causing a small spike in user complaints.

BUG= 883071 
TBR=govind@chromium.org

Change-Id: I367398a4a148d760910f2c2edca73765f5f3dcc5
Reviewed-on: https://chromium-review.googlesource.com/1225996
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Cr-Commit-Position: refs/branch-heads/3551@{#10}
Cr-Branched-From: 08c03be7fdeabd63de8e4efca4c562a2f5a70ba9-refs/heads/master@{#590850}
[modify] https://crrev.com/aa2c98f33a00ae85da96b1e6e1b89c6dd28ab8df/chrome/browser/resource_coordinator/lifecycle_unit_base.cc
[modify] https://crrev.com/aa2c98f33a00ae85da96b1e6e1b89c6dd28ab8df/chrome/browser/resource_coordinator/lifecycle_unit_base.h
[modify] https://crrev.com/aa2c98f33a00ae85da96b1e6e1b89c6dd28ab8df/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc
[modify] https://crrev.com/aa2c98f33a00ae85da96b1e6e1b89c6dd28ab8df/chrome/browser/resource_coordinator/tab_lifecycle_unit.h
[modify] https://crrev.com/aa2c98f33a00ae85da96b1e6e1b89c6dd28ab8df/chrome/browser/resource_coordinator/tab_lifecycle_unit_source_unittest.cc
[modify] https://crrev.com/aa2c98f33a00ae85da96b1e6e1b89c6dd28ab8df/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc
[modify] https://crrev.com/aa2c98f33a00ae85da96b1e6e1b89c6dd28ab8df/chrome/browser/resource_coordinator/tab_manager.h
[modify] https://crrev.com/aa2c98f33a00ae85da96b1e6e1b89c6dd28ab8df/chrome/browser/resource_coordinator/tab_manager_browsertest.cc
[modify] https://crrev.com/aa2c98f33a00ae85da96b1e6e1b89c6dd28ab8df/chrome/browser/resource_coordinator/tab_manager_unittest.cc

Project Member

Comment 19 by bugdroid1@chromium.org, Sep 14

Labels: merge-merged-3552
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cd107c94ac6db8d3b3d6959ef7a305a41eb6a228

commit cd107c94ac6db8d3b3d6959ef7a305a41eb6a228
Author: Chris Hamilton <chrisha@chromium.org>
Date: Fri Sep 14 03:47:27 2018

Fix broken urgent discarding protections.

These were lost in the shuffle during refactoring for proactive discarding, and
are causing a small spike in user complaints.

BUG= 883071 

Change-Id: I367398a4a148d760910f2c2edca73765f5f3dcc5
Reviewed-on: https://chromium-review.googlesource.com/1224954
Commit-Queue: Chris Hamilton <chrisha@chromium.org>
Reviewed-by: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#591283}(cherry picked from commit e9678b0ebc9d28877e51a8c2933203b27d31e37d)
Reviewed-on: https://chromium-review.googlesource.com/1226526
Reviewed-by: Krishna Govind <govind@chromium.org>
Cr-Commit-Position: refs/branch-heads/3552@{#3}
Cr-Branched-From: b7c18c08fc612dbee789d3d413ce8e3625fd6ea8-refs/heads/master@{#591210}
[modify] https://crrev.com/cd107c94ac6db8d3b3d6959ef7a305a41eb6a228/chrome/browser/resource_coordinator/lifecycle_unit_base.cc
[modify] https://crrev.com/cd107c94ac6db8d3b3d6959ef7a305a41eb6a228/chrome/browser/resource_coordinator/lifecycle_unit_base.h
[modify] https://crrev.com/cd107c94ac6db8d3b3d6959ef7a305a41eb6a228/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc
[modify] https://crrev.com/cd107c94ac6db8d3b3d6959ef7a305a41eb6a228/chrome/browser/resource_coordinator/tab_lifecycle_unit.h
[modify] https://crrev.com/cd107c94ac6db8d3b3d6959ef7a305a41eb6a228/chrome/browser/resource_coordinator/tab_lifecycle_unit_source_unittest.cc
[modify] https://crrev.com/cd107c94ac6db8d3b3d6959ef7a305a41eb6a228/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc
[modify] https://crrev.com/cd107c94ac6db8d3b3d6959ef7a305a41eb6a228/chrome/browser/resource_coordinator/tab_manager.h
[modify] https://crrev.com/cd107c94ac6db8d3b3d6959ef7a305a41eb6a228/chrome/browser/resource_coordinator/tab_manager_browsertest.cc
[modify] https://crrev.com/cd107c94ac6db8d3b3d6959ef7a305a41eb6a228/chrome/browser/resource_coordinator/tab_manager_unittest.cc

Labels: OS-Linux
Status: Started (was: Untriaged)
The fix for this took way longer than expected, because there was a lot of changes to behaviour that had to be accommodated for in unittests, and some of the failures only happened on bots for which I can't develop locally.

Regardless, this has been landed on trunk and merged to tomorrow's canary.

The production code changes amount to the 8 lines of code in this file:

https://chromium-review.googlesource.com/c/chromium/src/+/1224954/7/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc

The remaining changes are to support unittest changes. Note that all of the unittest fall-out and fixes gives me very high confidence that this code is working as intended, as the expectations of several dozen unittests had to be changed, and several new tests were added to double check this.

I will check stats on tomorrow's release and request merge after that.
NextAction: 2018-09-14
Thank you so much chrisha@ for fix and staying up very late to make sure it lands in trunk and merge to canary branch.

Pls update bug with canary result tomorrow, canary version 71.0.3552.2 or higher.
The NextAction date has arrived: 2018-09-14
As per comment# 7, unable to reproduce the issue on chrome reported version from TE end and as per comment# 11 the issue will reproducible when the machine is under memory pressure.

chrisha@ Could you please try to test it on latest chrome#71.0.3552.2 and help us in verifying the fix.

Thanks!
You can force the browser to run in a constant critical memory pressure state by using the --memory-pressure-thresholds-mb command-line. The format is:

--memory-pressure-thresholds-mb=moderate_mb,critical_mb

where

moderate_mb must be > critical_mb and
moderate_mb is the amount of free memory (in MB) that must be available, otherwise the system is in moderate memory pressure and,
critical_mb is the amount of free memory (in MB) that must be available,
otherwise the system is in critical memory pressure.

To force the system to be in critical memory pressure all the time simply choose a value for critical_mb that is larger than the amount of memory on the system, and choose a value for moderate_mb that is critical_mb + 1. If I have 4GB of RAM on the sytem, I'd use:

--memory-pressure-thresholds-mb=4001,4000

You can verify that Chrome thinks it's under memory pressure by checking chrome://histograms/Memory.PressureLevel and verifying that there are non-zero entries in the bucket corresponding to value 2.

In the old release, you'd navigate around over a period of minutes and tabs would be discarded often and possibly repeatedly. You can verify discard state by visiting the chrome://discards tab. Without the fix a tab is discarded every 5 seconds. With the fix, a tab should only be discarded if it has been in background for at least 10 minutes, and each tab should only ever be discarded once.

I can verify that the fix works for 71.0.3552.2 by doing the following:

- Launching Chrome with parameters that force it to stay in critical memory pressure.
- Opening multiple tabs.
- Navigating another tab to chrome://discards
- Waiting 10+ minutes, and seeing the other tabs be discarded, one every ~5 seconds
- Focusing each of the tabs to reload them, and then refocusing chrome://discards
- Waiting another ten minutes and noticing that none of the tabs get discarded a second time.

Labels: Merge-Request-69 Merge-Request-70
Labels: -Merge-Request-69 -Merge-Request-70 Merge-Approved-70 Merge-Approved-69
Approving merge to M69 branch 3497 & M70 branch 3538 based on comments #20, #24 and per offline chat with chrisha@. 
Merge applies clean to M70, but there's a conflict for M69. Looking now...
Project Member

Comment 28 by bugdroid1@chromium.org, Sep 14

Labels: -merge-approved-70 merge-merged-3538
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0a425cc0fa93c27d37434a8c39f3be138418801c

commit 0a425cc0fa93c27d37434a8c39f3be138418801c
Author: Chris Hamilton <chrisha@chromium.org>
Date: Fri Sep 14 16:49:52 2018

Fix broken urgent discarding protections.

These were lost in the shuffle during refactoring for proactive discarding, and
are causing a small spike in user complaints.

BUG= 883071 

Change-Id: I367398a4a148d760910f2c2edca73765f5f3dcc5
Reviewed-on: https://chromium-review.googlesource.com/1224954
Commit-Queue: Chris Hamilton <chrisha@chromium.org>
Reviewed-by: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#591283}(cherry picked from commit e9678b0ebc9d28877e51a8c2933203b27d31e37d)
Reviewed-on: https://chromium-review.googlesource.com/1227136
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Cr-Commit-Position: refs/branch-heads/3538@{#405}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}
[modify] https://crrev.com/0a425cc0fa93c27d37434a8c39f3be138418801c/chrome/browser/resource_coordinator/lifecycle_unit_base.cc
[modify] https://crrev.com/0a425cc0fa93c27d37434a8c39f3be138418801c/chrome/browser/resource_coordinator/lifecycle_unit_base.h
[modify] https://crrev.com/0a425cc0fa93c27d37434a8c39f3be138418801c/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc
[modify] https://crrev.com/0a425cc0fa93c27d37434a8c39f3be138418801c/chrome/browser/resource_coordinator/tab_lifecycle_unit.h
[modify] https://crrev.com/0a425cc0fa93c27d37434a8c39f3be138418801c/chrome/browser/resource_coordinator/tab_lifecycle_unit_source_unittest.cc
[modify] https://crrev.com/0a425cc0fa93c27d37434a8c39f3be138418801c/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc
[modify] https://crrev.com/0a425cc0fa93c27d37434a8c39f3be138418801c/chrome/browser/resource_coordinator/tab_manager.h
[modify] https://crrev.com/0a425cc0fa93c27d37434a8c39f3be138418801c/chrome/browser/resource_coordinator/tab_manager_browsertest.cc
[modify] https://crrev.com/0a425cc0fa93c27d37434a8c39f3be138418801c/chrome/browser/resource_coordinator/tab_manager_unittest.cc

Cc: swarnasree.mukkala@chromium.org
 Issue 883750  has been merged into this issue.
Project Member

Comment 30 by bugdroid1@chromium.org, Sep 14

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

commit d1672e0b5190ed20c4b2dab4f62a554eefb38e91
Author: Chris Hamilton <chrisha@chromium.org>
Date: Fri Sep 14 20:36:34 2018

Fix broken urgent discarding protections.

These were lost in the shuffle during refactoring for proactive discarding, and
are causing a small spike in user complaints.

BUG= 883071 

Change-Id: I367398a4a148d760910f2c2edca73765f5f3dcc5
Reviewed-on: https://chromium-review.googlesource.com/1224954
Commit-Queue: Chris Hamilton <chrisha@chromium.org>
Reviewed-by: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#591283}
Reviewed-on: https://chromium-review.googlesource.com/1227224
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Cr-Commit-Position: refs/branch-heads/3497@{#942}
Cr-Branched-From: 271eaf50594eb818c9295dc78d364aea18c82ea8-refs/heads/master@{#576753}
[modify] https://crrev.com/d1672e0b5190ed20c4b2dab4f62a554eefb38e91/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc
[modify] https://crrev.com/d1672e0b5190ed20c4b2dab4f62a554eefb38e91/chrome/browser/resource_coordinator/tab_lifecycle_unit.h
[modify] https://crrev.com/d1672e0b5190ed20c4b2dab4f62a554eefb38e91/chrome/browser/resource_coordinator/tab_lifecycle_unit_source_unittest.cc
[modify] https://crrev.com/d1672e0b5190ed20c4b2dab4f62a554eefb38e91/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc
[modify] https://crrev.com/d1672e0b5190ed20c4b2dab4f62a554eefb38e91/chrome/browser/resource_coordinator/tab_manager.h
[modify] https://crrev.com/d1672e0b5190ed20c4b2dab4f62a554eefb38e91/chrome/browser/resource_coordinator/tab_manager_browsertest.cc
[modify] https://crrev.com/d1672e0b5190ed20c4b2dab4f62a554eefb38e91/chrome/browser/resource_coordinator/tab_manager_unittest.cc

Status: Fixed (was: Started)
The merge to M69 is finished. The patch didn't apply cleanly, but the changes were localized to 2 unittests. I rebuilt and re-ran things locally to double check all is well.

Please do let me know if there are any issues.
Tried to reproduce the issue on Windows 10 on the reported version 69.0.3497.81 as per comment #24, but unable to reproduce the issue by following the below steps.

1. Launched Chrome with --memory-pressure-thresholds-mb=16001,16000 and opened multiple tabs.
2. Navigated to chrome://discards and waited for ~10+ minutes and couldn't observe any tabs being discarded every ~5 seconds.
Attached is the screen shot for reference.

chrisha@ -  As we are unable to reproduce this issue on build without fix manually, request you to help us in verifying the fix on the latest M-69(69.0.3497.100) build.

Thanks..
883071-reported.png
146 KB View Download
Verified that with the .81 build that memory pressure discards will continuously and repeatedly discard all tabs.

Also verified that with the .100 build the discards only occur after a minimum of 10 minutes in background, and that they do not occur a second time.

I'd consider this issue closed.
Good news: 69.0.3497.100  is now available with the fix on Chrome Stable. You can force an update by visiting chrome://chrome. Thank you.

Sign in to add a comment