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

Issue 819592 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Jul 13
Cc:
Components:
EstimatedDays: ----
NextAction: 2018-03-12
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 821461



Sign in to add a comment

OutOfMemoryReporterTests are flaky on Android

Project Member Reported by chromium...@appspot.gserviceaccount.com, Mar 7 2018

Issue description

"OutOfMemoryReporterTest.OOMOnPreviousPage" is flaky.

This issue was created automatically by the chromium-try-flakes app. Please find the right owner to fix the respective test/step and assign this issue to them. If the step/test is infrastructure-related, please add Infra-Troopers label and change issue status to Untriaged. When done, please remove the issue from Sheriff Bug Queue by removing the Sheriff-Chromium label.

We have detected 3 recent flakes. List of all flakes can be found at https://chromium-try-flakes.appspot.com/all_flake_occurrences?key=ahVzfmNocm9taXVtLXRyeS1mbGFrZXNyNAsSBUZsYWtlIilPdXRPZk1lbW9yeVJlcG9ydGVyVGVzdC5PT01PblByZXZpb3VzUGFnZQw.

Flaky tests should be disabled within 30 minutes unless culprit CL is found and reverted. Please see more details here: https://sites.google.com/a/chromium.org/dev/developers/tree-sheriffs/sheriffing-bug-queues#triaging-auto-filed-flakiness-bugs
 
 Issue 819593  has been merged into this issue.
Cc: mariakho...@chromium.org ssid@chromium.org
Labels: -Sheriff-Chromium
Owner: csharrison@chromium.org
Status: Assigned (was: Untriaged)
OutOfMemoryReporterTest.SubframeNavigation_IsNotLogged is flaky es as well:

https://chromium-try-flakes.appspot.com/all_flake_occurrences?key=ahVzfmNocm9taXVtLXRyeS1mbGFrZXNyQQsSBUZsYWtlIjZPdXRPZk1lbW9yeVJlcG9ydGVyVGVzdC5TdWJmcmFtZU5hdmlnYXRpb25fSXNOb3RMb2dnZWQM

I'm disabling the tests for Android in https://crrev.com/c/951770. OOM OWNERS, please take a look.
Summary: OutOfMemoryReporterTests are flaky on Android (was: "OutOfMemoryReporterTest.OOMOnPreviousPage" is flaky)
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 7 2018

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

commit 521ccbb8fc8057e0966b8c7f4397a1221b25f29f
Author: jdoerrie <jdoerrie@chromium.org>
Date: Wed Mar 07 14:36:35 2018

Disable Flaky OOM tests on Android

TBR=csharrison

Bug:  819592 
Change-Id: Ibe928fa90db3d840a8c8adb6e8b1da97e8c7a58e
Reviewed-on: https://chromium-review.googlesource.com/951770
Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541428}
[modify] https://crrev.com/521ccbb8fc8057e0966b8c7f4397a1221b25f29f/chrome/browser/metrics/oom/out_of_memory_reporter_unittest.cc

 Issue 818087  has been merged into this issue.
I'll try to look at this today. Android is the primary target for these tests so this is unfortunate.
Project Member

Comment 8 by bugdroid1@chromium.org, Mar 7 2018

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

commit 300aae2d0c5790dafa6d127c99c978ba77d0a9f4
Author: jdoerrie <jdoerrie@chromium.org>
Date: Wed Mar 07 17:41:34 2018

Disable OutOfMemoryReporterTest.SimpleOOM on Android

TBR=csharrison

Bug:  819592 
Change-Id: Iab5688d761675b69b9ecddf83dc55abd37ea875d
Reviewed-on: https://chromium-review.googlesource.com/952450
Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541489}
[modify] https://crrev.com/300aae2d0c5790dafa6d127c99c978ba77d0a9f4/chrome/browser/metrics/oom/out_of_memory_reporter_unittest.cc

I think this can happen due to us not properly flushing the task scheduler tasks when we receive the crash dump. I have a fix in progress but it is speculative since I can't repro right now.
Project Member

Comment 10 by bugdroid1@chromium.org, Mar 8 2018

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

commit ad42f86fd3a1fe68b6ae9de735d2493fec70254f
Author: Charles Harrison <csharrison@chromium.org>
Date: Thu Mar 08 17:51:26 2018

Speculative fixes for flaky OOMReporter unit tests

Bug:  819592 
Change-Id: Ic43116c52e1b401aea1f813334a5352441d6d9a9
Reviewed-on: https://chromium-review.googlesource.com/953302
Reviewed-by: Siddhartha S <ssid@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541831}
[modify] https://crrev.com/ad42f86fd3a1fe68b6ae9de735d2493fec70254f/chrome/browser/metrics/oom/out_of_memory_reporter_unittest.cc

NextAction: 2018-03-12
Should hopefully be fixed by r541831 but let's wait and see if the flakes keep showing up. Adding next-action for next Monday.
The flakes are not entirely gone [1], but the recent changes have made it easier to diagnose.

[ RUN      ] OutOfMemoryReporterTest.OOMOnPreviousPage
../../chrome/browser/metrics/oom/out_of_memory_reporter_unittest.cc:143: Failure
Expected equality of these values:
  expect_oom
    Which is: true
  was_oom
    Which is: false
../../chrome/browser/metrics/oom/out_of_memory_reporter_unittest.cc:239: Failure
Value of: last_oom_url_.has_value()
  Actual: false
Expected: true
[FATAL:optional.h(592)] Check failed: storage_.is_populated_.

So, something in CrashDumpManager::IsForegroundOom is racily wrong. My hunch is that somehow APPLICATION_STATE_HAS_RUNNING_ACTIVITIES might not be set? 

[1]: https://logs.chromium.org/v/?s=chromium%2Fbb%2Ftryserver.chromium.android%2Fandroid_n5x_swarming_rel%2F377496%2F%2B%2Frecipes%2Fsteps%2Funit_tests__with_patch__on_Android%2F0%2Flogs%2FOutOfMemoryReporterTest.OOMOnPreviousPage%2F0


The NextAction date has arrived: 2018-03-12
Project Member

Comment 14 by bugdroid1@chromium.org, Mar 12 2018

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

commit 551fb984f81cc04388b2d1809195de0a368c0e02
Author: Charles Harrison <csharrison@chromium.org>
Date: Mon Mar 12 22:07:49 2018

[oom] Add debug logs to EXPECT to root-cause flakes

After looking through the code, it seems the only thing that could
be going wrong here is |app_state| not thinking we have running
activities during the unit test.

This CL will let us figure out if app_state is the member at fault here,
and hopefully what to do about it.

Bug:  819592 
Change-Id: I3f43b3b7ec5dab8c7c5e6ca0b4fa9f2967e4ea9f
Reviewed-on: https://chromium-review.googlesource.com/958190
Reviewed-by: Siddhartha S <ssid@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542621}
[modify] https://crrev.com/551fb984f81cc04388b2d1809195de0a368c0e02/chrome/browser/metrics/oom/out_of_memory_reporter_unittest.cc

We got a new flake today with the data:

Expected equality of these values:
  expect_oom
    Which is: true
  breakpad::CrashDumpManager::IsForegroundOom(details)
    Which is: false
process_type: 3 termination_status: 5 file_size: 0 app_state: 2

My hypothesis was right, app_state is APPLICATION_STATE_HAS_PAUSED_ACTIVITIES instead of APPLICATION_STATE_HAS_RUNNING_ACTIVITIES during the test. I'll try to land a fix.
Blockedon: 821461
Labels: -Pri-1 Pri-3
It seems flakes are much rarer now (none in the last 5 days for SubframeNavigation_IsNotLogged/OOMOnPreviousPage), so reducing priority. I'm guessing r541831 made this harder to flake.
Status: Archived (was: Assigned)
No flakes in the last couple months.

Sign in to add a comment