New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 832517 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Tab Discarding Regression - All tabs except the front tab are discarded

Project Member Reported by vovoy@chromium.org, Apr 13 2018

Issue description

https://crrev.com/c/980742 replaces EstimatedMemoryFreedKB() with GetEstimatedMemoryFreedOnDiscardKB().

GetEstimatedMemoryFreedOnDiscardKB() always returns 0, tab_manager_delegate_chromeos could not lower target memory to free and keep discarding more tabs.

stripped chrome log:
Memory: tab_manager_delegate_chromeos.cc:573 Target memory to free: 9216 KB
Memory: tab_manager_delegate_chromeos.cc:620 Killed tab Inbox – crosarcplusplustest@gmail.com, estimated 0 KB freed
Memory: tab_manager_delegate_chromeos.cc:573 Target memory to free: 9216 KB
Memory: tab_manager_delegate_chromeos.cc:620 Killed tab Inbox – crosarcplusplustest@gmail.com, estimated 0 KB freed
Memory: tab_manager_delegate_chromeos.cc:573 Target memory to free: 9216 KB
Memory: tab_manager_delegate_chromeos.cc:620 Killed tab Inbox – crosarcplusplustest@gmail.com, estimated 0 KB freed
Memory: tab_manager_delegate_chromeos.cc:573 Target memory to free: 9216 KB
Memory: tab_manager_delegate_chromeos.cc:620 Killed tab Inbox – crosarcplusplustest@gmail.com, estimated 0 KB freed
Memory: tab_manager_delegate_chromeos.cc:573 Target memory to free: 9216 KB
Memory: tab_manager_delegate_chromeos.cc:620 Killed tab Inbox – crosarcplusplustest@gmail.com, estimated 0 KB freed
Memory: tab_manager_delegate_chromeos.cc:573 Target memory to free: 9216 KB
Memory: tab_manager_delegate_chromeos.cc:620 Killed tab Inbox – crosarcplusplustest@gmail.com, estimated 0 KB freed
Memory: tab_manager_delegate_chromeos.cc:573 Target memory to free: 9216 KB
Memory: tab_manager_delegate_chromeos.cc:620 Killed tab Inbox – crosarcplusplustest@gmail.com, estimated 0 KB freed
Memory: tab_manager_delegate_chromeos.cc:573 Target memory to free: 9216 KB
Memory: tab_manager_delegate_chromeos.cc:620 Killed tab Inbox – crosarcplusplustest@gmail.com, estimated 0 KB freed
Memory: tab_manager_delegate_chromeos.cc:573 Target memory to free: 9216 KB
Memory: tab_manager_delegate_chromeos.cc:620 Killed tab Inbox – crosarcplusplustest@gmail.com, estimated 0 KB freed
Memory: tab_manager_delegate_chromeos.cc:573 Target memory to free: 9216 KB
Memory: tab_manager_delegate_chromeos.cc:620 Killed tab Inbox – crosarcplusplustest@gmail.com, estimated 0 KB freed
Memory: tab_manager_delegate_chromeos.cc:573 Target memory to free: 9216 KB
Memory: tab_manager_delegate_chromeos.cc:620 Killed tab Inbox – crosarcplusplustest@gmail.com, estimated 0 KB freed
Memory: tab_manager_delegate_chromeos.cc:573 Target memory to free: 9216 KB
Memory: tab_manager_delegate_chromeos.cc:620 Killed tab Inbox – crosarcplusplustest@gmail.com, estimated 0 KB freed
Memory: tab_manager_delegate_chromeos.cc:573 Target memory to free: 9216 KB
...


 

Comment 1 by cywang@chromium.org, Apr 13 2018

Cc: wuchengli@chromium.org

Comment 2 Deleted

Project Member

Comment 3 by bugdroid1@chromium.org, Apr 13 2018

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

commit 8901493d98ea26516d5e794e5afba6f45d204c3d
Author: Kuo-Hsin Yang <vovoy@chromium.org>
Date: Fri Apr 13 13:00:30 2018

Fix Chrome OS tab discard regression

https://crrev.com/c/980742 replaces EstimatedMemoryFreedKB() with
GetEstimatedMemoryFreedOnDiscardKB() which always returns 0. It confuses
Chrome OS Tab Manager and all tabs except the front tab are discarded.
It's a quick fix to make tab discard work on Chrome OS.

Bug:  832517 
Change-Id: Ic72be7a7535bf6e0a48a6f6efa9afc28635813c8
Reviewed-on: https://chromium-review.googlesource.com/1011885
Commit-Queue: François Doray <fdoray@chromium.org>
Reviewed-by: Cheng-Yu Lee <cylee@google.com>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550602}
[modify] https://crrev.com/8901493d98ea26516d5e794e5afba6f45d204c3d/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc

Comment 4 by fdoray@chromium.org, Apr 17 2018

Labels: Merge-Request-67
Status: Started (was: Available)
Request to merge 8901493d98ea26516d5e794e5afba6f45d204c3d to M67 branch 3396. This commit fixes an important issue (tabs being discarded way to often), and landed just a little bit to late to be part of M67.
Project Member

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

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

commit 8901493d98ea26516d5e794e5afba6f45d204c3d
Author: Kuo-Hsin Yang <vovoy@chromium.org>
Date: Fri Apr 13 13:00:30 2018

Fix Chrome OS tab discard regression

https://crrev.com/c/980742 replaces EstimatedMemoryFreedKB() with
GetEstimatedMemoryFreedOnDiscardKB() which always returns 0. It confuses
Chrome OS Tab Manager and all tabs except the front tab are discarded.
It's a quick fix to make tab discard work on Chrome OS.

Bug:  832517 
Change-Id: Ic72be7a7535bf6e0a48a6f6efa9afc28635813c8
Reviewed-on: https://chromium-review.googlesource.com/1011885
Commit-Queue: François Doray <fdoray@chromium.org>
Reviewed-by: Cheng-Yu Lee <cylee@google.com>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550602}
[modify] https://crrev.com/8901493d98ea26516d5e794e5afba6f45d204c3d/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc

Do we know where this was reported?  M67 regression confirmed? Or a new feature since it's covering a //TODO?

Comment 7 by vovoy@chromium.org, Apr 18 2018

I found this issue when I ran autotest power_LowMemorySuspend on M67 soraka. M67 regression confirmed.
Project Member

Comment 8 by sheriffbot@chromium.org, Apr 18 2018

Labels: -Merge-Request-67 Merge-Approved-67 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M67. Please go ahead and merge the CL to branch 3396 manually. Please contact milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

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

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

Labels: -merge-approved-67 merge-merged-3396
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/792bf61cf22af38e200623e1e6b59e9166f90e1e

commit 792bf61cf22af38e200623e1e6b59e9166f90e1e
Author: Kuo-Hsin Yang <vovoy@chromium.org>
Date: Thu Apr 19 05:50:01 2018

[Merge to M67] Fix Chrome OS tab discard regression

https://crrev.com/c/980742 replaces EstimatedMemoryFreedKB() with
GetEstimatedMemoryFreedOnDiscardKB() which always returns 0. It confuses
Chrome OS Tab Manager and all tabs except the front tab are discarded.
It's a quick fix to make tab discard work on Chrome OS.

Bug:  832517 
Change-Id: Ic72be7a7535bf6e0a48a6f6efa9afc28635813c8
Reviewed-on: https://chromium-review.googlesource.com/1011885
Commit-Queue: François Doray <fdoray@chromium.org>
Reviewed-by: Cheng-Yu Lee <cylee@google.com>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#550602}(cherry picked from commit 8901493d98ea26516d5e794e5afba6f45d204c3d)
Reviewed-on: https://chromium-review.googlesource.com/1013800
Cr-Commit-Position: refs/branch-heads/3396@{#118}
Cr-Branched-From: 9ef2aa869bc7bc0c089e255d698cca6e47d6b038-refs/heads/master@{#550428}
[modify] https://crrev.com/792bf61cf22af38e200623e1e6b59e9166f90e1e/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc

Vovo. How did you find this bug? Is there a test that can catch the bug?
Components: Internals>Core

Comment 12 by vovoy@chromium.org, Apr 23 2018

The autotest power_LowMemorySuspend can catch this bug, I found this issue when I am developing power_LowMemorySuspend. power_LowMemorySuspend is a stress test that may run for more than 1 hour, I could add a simpler autotest to catch similar issue in the future.
Status: Fixed (was: Started)
I confirm that the issue was introduced by https://chromium-review.googlesource.com/c/chromium/src/+/980742, which landed in 67.0.3388.0, which is a refactor of an existing feature. The merge in comment #9 fixes the issue.

Sign in to add a comment