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

Issue 791829 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

platform_MemoryMonitor fails due to change in 'top' output

Project Member Reported by djkurtz@chromium.org, Dec 5 2017

Issue description

Forked from b/69728251:

Test fails with: Test failed due to 'NoneType' object has no attribute 'groups'. Exception log follows the after_iteration_hooks.

re.search(r'\s+(\d+) total,\s+(\d+) used,\s+(\d+) free', line) is returning None
where value of line = KiB Mem :  3884292 total,  2644488 free,   387904 used,   851900 buff/cache

Proposed fix:
https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/798818

The test used to work when it was written in 2014.  

However the output of "top -b -n 1" changed in 2014 [0]:

[0] https://gitlab.com/procps-ng/procps/commits/318919094d3f56fd707587679b503aac14151111
    top: rearrange Mem & Swap lines and standardize 'used'

This change first appeared in procps v3.3.10, and was picked up in May 2017 when CL:517973 updated procps in Chrome OS from v3.3.9 -> v3.3.12.


Note: This test is part of the "perf_v2" suite, which was de-scheduled in June 2016 (see issue 619041).
As noted by ihf this test blindly enumerates processes. (Some of which have random names, which is seriously wrong as it will pollute any dashboard).  If somebody wanted to monitor memory usage, it would be worth fixing the test. Otherwise I am fine with deleting the test.

 
Since between June 2016 and now nobody complained about the missing data, I am also in favor of removing the test.

In any case, for those specific numbers (MemTotal, MemFree, SwapTotal etc.) there are more stable sources (/proc/meminfo) and probably for process data as well (/proc/pid/stat for instance).

Cc: bccheng@chromium.org
Project Member

Comment 4 by bugdroid1@chromium.org, Dec 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/c0543c65bd6f3396845120e6d876f40c27397512

commit c0543c65bd6f3396845120e6d876f40c27397512
Author: Daniel Kurtz <djkurtz@chromium.org>
Date: Wed Dec 06 04:22:33 2017

[autotest] Remove platform_MemoryMonitor

This test is currently broken due to a change in the output of
"top -b -n 1".	 While we could fix this test to properly parse the output,
or preferably, modify it to fetch memory values (MemTotal, MemFree,
SwapTotal, etc.) from a more stable source (eg /proc/pid/stat), this test
is fundamentally broken anyway because of the way it generates a ton of
individual timeseries which cannot be tracked in a dashboard.

In fact, this problem led to its suite (suite:perf_v2) being de-scheduled
in 2016.  Since nobody has complained about the missing data for 2 years,
let's just completely remove the test.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>

BUG= chromium:791829 
TEST=None

Change-Id: I693845a118fa3029f042bc55f108d81a8cf65437
Reviewed-on: https://chromium-review.googlesource.com/807744
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[delete] https://crrev.com/1a1a87f34416416cc77e4f7c28c8d3be041d3635/client/site_tests/platform_MemoryMonitor/platform_MemoryMonitor.py
[delete] https://crrev.com/1a1a87f34416416cc77e4f7c28c8d3be041d3635/client/site_tests/platform_MemoryMonitor/control

Status: Verified (was: Started)

Sign in to add a comment