New issue
Advanced search Search tips

Issue 870295 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

"org.chromium.chrome.browser.offlinepages.prefetch.PrefetchBackgroundTaskTest#testSuspend" is flaky

Project Member Reported by chromium...@appspot.gserviceaccount.com, Aug 2

Issue description

"org.chromium.chrome.browser.offlinepages.prefetch.PrefetchBackgroundTaskTest#testSuspend" 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 4 recent flakes. List of all flakes can be found at https://chromium-try-flakes.appspot.com/all_flake_occurrences?key=ahVzfmNocm9taXVtLXRyeS1mbGFrZXNyYwsSBUZsYWtlIlhvcmcuY2hyb21pdW0uY2hyb21lLmJyb3dzZXIub2ZmbGluZXBhZ2VzLnByZWZldGNoLlByZWZldGNoQmFja2dyb3VuZFRhc2tUZXN0I3Rlc3RTdXNwZW5kDA.

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
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 2

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

commit 38eadfd86164575dd66a332150966529a8850333
Author: Christos Froussios <cfroussios@chromium.org>
Date: Thu Aug 02 14:18:15 2018

Disable org.chromium.chrome.browser.offlinepages.prefetch.PrefetchBackgroundTaskTest#testSuspend"

It is flaky

TBR=dewittj@chromium.org

Bug: 870295
Change-Id: I319bd6b5038cb384dea15fb23c8d0173aa3cf0ff
Reviewed-on: https://chromium-review.googlesource.com/1160621
Reviewed-by: Christos Froussios <cfroussios@chromium.org>
Commit-Queue: Christos Froussios <cfroussios@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580165}
[modify] https://crrev.com/38eadfd86164575dd66a332150966529a8850333/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTaskTest.java

Cc: carlosk@chromium.org jianli@chromium.org dewittj@chromium.org
Components: UI>Browser>Offline
Labels: -Sheriff-Chromium OS-Android
Test is disabled. cc'ing some of the test's owners for further triaging and removing from the sheriff queue.
All 4 flaky failures happened when waiting for the next task to be started after the previous one was suspended [1].

We can add some more asserts to this test -- for instance, confirming that TestBackgroundTaskScheduler.addCount and removeCount are at the expected values midway through the test -- to try and detect earlier invalid states and some more DLOG_INFO messages to help understanding this issue. If it's impossible to reproduce this locally we might need to re-enable the test for a while.

While doing this let's also remove PrefetchBackgroundTask::reschedule_type() as it's not called anywhere and causes confusion as one would expect it to be used to define how the task should be rescheduled (when in fact that happens internally in its destructor).

[1] https://cs.chromium.org/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTaskTest.java?l=295,302
Labels: Hotlist-Fixit
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 2

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

commit a9344e3d7d8e203bc1797102f159484d67d10969
Author: Carlos Knippschild <carlosk@chromium.org>
Date: Thu Aug 02 23:59:31 2018

Link disabled offline pages tests with respective crbug issues

To make it easier to track the reason why tests are disabled one should
add links from the disabled test to the issue in crbug that explains why
they were disabled. This adds missing links from a few offline pages
tests.

TBR=dimich@chromium.org

Bug: 830282, 870295
Change-Id: I1de64bfaf41211fd4585ec9733e6c80c338d4526
Reviewed-on: https://chromium-review.googlesource.com/1161441
Reviewed-by: Carlos Knippschild <carlosk@chromium.org>
Commit-Queue: Carlos Knippschild <carlosk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580381}
[modify] https://crrev.com/a9344e3d7d8e203bc1797102f159484d67d10969/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTaskTest.java
[modify] https://crrev.com/a9344e3d7d8e203bc1797102f159484d67d10969/chrome/browser/offline_pages/offline_page_request_handler_unittest.cc

As this is not reproducible locally, this is what can be done to allow us to get more information on this issue:
* Add extra ASSERTs to check for changes in TestBackgroundTaskScheduler's addCount() and removeCount() at each point in that test where we can measure changes to those values (run the test and add checks as needed).
* Re-enable the test so that we can see if these new checks shed light on the problem (hopefully).
* Remove PrefetchBackgroundTask.reschedule_type()

Extra:
* It seems to also make sense to make sure that when TestBackgroundTaskScheduler.waitForTaskStarted successfully acquires the semaphore, there are no more available permits. So let's add an ASSERT for availablePermits() being zero and then remove the creation of a new Semaphore instance as it won't be needed anymore.

Owner: dewittj@chromium.org
Status: Assigned (was: Untriaged)

Sign in to add a comment