New issue
Advanced search Search tips

Issue 638891 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , Fuchsia
Pri: 1
Type: Bug

Blocking:
issue 738275



Sign in to add a comment

DiskCacheBackendTest.SimpleCacheEnumerationCorruption fails on Marshmallow bot

Project Member Reported by pauljensen@chromium.org, Aug 18 2016

Issue description

https://build.chromium.org/p/chromium.android/builders/Android%20Cronet%20Marshmallow%2064bit%20Perf/builds/457/steps/net_unittests/logs/stdio
https://build.chromium.org/p/chromium.android/builders/Android%20Cronet%20Marshmallow%2064bit%20Perf/builds/299/steps/net_unittests/logs/stdio

I  766.169s run_tests_on_device(00bebe3061e6bdcf)  [==========] Running 1 test from 1 test case.
I  766.169s run_tests_on_device(00bebe3061e6bdcf)  [----------] Global test environment set-up.
I  766.169s run_tests_on_device(00bebe3061e6bdcf)  [----------] 1 test from DiskCacheBackendTest
I  766.169s run_tests_on_device(00bebe3061e6bdcf)  [ RUN      ] DiskCacheBackendTest.SimpleCacheEnumerationCorruption
I  766.169s run_tests_on_device(00bebe3061e6bdcf)  ../../net/disk_cache/backend_unittest.cc:294: Failure
I  766.170s run_tests_on_device(00bebe3061e6bdcf)  Value of: keys_to_match->erase(entry->GetKey())
I  766.170s run_tests_on_device(00bebe3061e6bdcf)    Actual: 0
I  766.170s run_tests_on_device(00bebe3061e6bdcf)  Expected: 1U
I  766.170s run_tests_on_device(00bebe3061e6bdcf)  Which is: 1
I  766.170s run_tests_on_device(00bebe3061e6bdcf)  ../../net/disk_cache/backend_unittest.cc:3790: Failure
I  766.170s run_tests_on_device(00bebe3061e6bdcf)  Value of: count
I  766.170s run_tests_on_device(00bebe3061e6bdcf)    Actual: 11
I  766.170s run_tests_on_device(00bebe3061e6bdcf)  Expected: key_pool.size()
I  766.170s run_tests_on_device(00bebe3061e6bdcf)  Which is: 10
I  766.170s run_tests_on_device(00bebe3061e6bdcf)  [  FAILED  ] DiskCacheBackendTest.SimpleCacheEnumerationCorruption (51 ms)
I  766.170s run_tests_on_device(00bebe3061e6bdcf)  [----------] 1 test from DiskCacheBackendTest (53 ms total)
 

Comment 1 by mge...@chromium.org, Aug 18 2016

This flake has been happening (rarely) since the Marshmallow 64-bit Cronet bots were set up.
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 2 2016

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

commit caf40d64922a44e8a4ae9e337c7693bcb022cdb3
Author: xunjieli <xunjieli@chromium.org>
Date: Fri Sep 02 20:07:38 2016

Disables flaky test DiskCacheBackendTest.SimpleCacheEnumerationCorruption

The test is flaky on Android Marshmallow bot.

TBR=gavinp@chromium.org

BUG= 638891 

Review-Url: https://codereview.chromium.org/2289133003
Cr-Commit-Position: refs/heads/master@{#416327}

[modify] https://crrev.com/caf40d64922a44e8a4ae9e337c7693bcb022cdb3/net/disk_cache/backend_unittest.cc

Status: Assigned (was: Untriaged)
Blocking: 738275
Labels: OS-Fuchsia
Failed on Fuchsia too just now, with the same expectation failure. https://build.chromium.org/p/chromium.fyi/builders/Fuchsia/builds/9993
Hmm, I think the trick of using the read-after-write to serialize things doesn't work since it's just using stream 0, which is in memory these days, so the only thing that's doing I/O is the asynchronous Close call which of course races with the let's-corrupt-these-files thing. One sec, will upload something to try. 


Owner: morlovich@chromium.org
Status: Started (was: Assigned)
https://chromium-review.googlesource.com/#/c/chromium/src/+/710394 is intended to be a fix...

Project Member

Comment 9 by bugdroid1@chromium.org, Oct 16 2017

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

commit 0cfd62154dfa05a665a735a8c3e9892d589d1e30
Author: Maks Orlovich <morlovich@chromium.org>
Date: Mon Oct 16 14:26:34 2017

SimpleCache: deflake SimpleCacheEnumerationCorruption test on Fuchsia (and re-enable it on Android).

The trick of serializing I/O ops by doing a read-after-write to ensure
the write commit doesn't work on stream 0 since that's in memory now;
but even doing it on stream 1 would still potentially race the writes
done in close with the call to CreateCorruptFileForTests... so just use
a thread + scheduler flush to synchronize instead.

Bug:  638891 
Change-Id: Ie2d06fd97f9356b695e138cc7d63b8ff06892b47
Reviewed-on: https://chromium-review.googlesource.com/710394
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Asanka Herath <asanka@chromium.org>
Commit-Queue: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509039}
[modify] https://crrev.com/0cfd62154dfa05a665a735a8c3e9892d589d1e30/net/disk_cache/backend_unittest.cc

@scottmg: could I get confirmation that this is OK on Fuchsia now?
Status: Fixed (was: Started)
I haven't seen it flake recently, thanks. I'll reopen if I see it again.

Sign in to add a comment