New issue
Advanced search Search tips

Issue 900289 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

memd: add detection of tab discard and OOM kills under low memory pressure

Project Member Reported by semenzato@chromium.org, Oct 30

Issue description

At the moment, memd detects and logs tab discards and OOM kills only when it's running in fast-poll mode, which is triggered by some degree of memory pressure.  But we've seen discards and kills happen under unexpected circumstances and we want to keep track of them at all times, especially since it's not expensive.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/58a1f033475ff6eca406bb48b1c173ae37a33d48

commit 58a1f033475ff6eca406bb48b1c173ae37a33d48
Author: Luigi Semenzato <semenzato@chromium.org>
Date: Wed Nov 07 14:34:30 2018

metrics: memd: detect dbus events in slow-poll

To avoid wasting power, memd maintains its ring buffer only
in fast-poll mode, which is entered when memory pressure is
rising.  However we also wish to notice unexpected tab discards
or OOM kills when memory pressure is understood to be low.
This change adds such detection to slow-poll mode, without
impact to power usage.

The functional change also revealed two bugs in the test
code (which BTW were not exercised by previous tests),
in the mock select(): the value of the returned fd_set
could have been wrong, and the delivery of events spaced
in time could have resulted in a premature (fake) timeout.
This change also fixes those bugs.

BUG= chromium:900289 
TEST=unit test

Change-Id: I487fe3fd92d35b999b2cbe7c85e2ec7e7cbd2e59
Reviewed-on: https://chromium-review.googlesource.com/1312383
Commit-Ready: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>

[modify] https://crrev.com/58a1f033475ff6eca406bb48b1c173ae37a33d48/metrics/memd/src/test.rs
[modify] https://crrev.com/58a1f033475ff6eca406bb48b1c173ae37a33d48/metrics/memd/src/main.rs

Labels: Merge-Request-71
Do we still allow merges for 71? I don't think this is risky.
Project Member

Comment 3 by sheriffbot@chromium.org, Nov 13

Labels: -Merge-Request-71 Hotlist-Merge-Reject Merge-Reject-71
The bug is marked as P3 or Feature. It should not be merged as M71 is in beta. 
Please contact the approriate milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Type-Feature Type-Bug
Status: Fixed (was: Assigned)
Sorry, wrong category.  It's actually important to get the extra information from this change.

Sign in to add a comment