New issue
Advanced search Search tips

Issue 823762 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 29
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

WallpaperControllerTest.PreventReloadingSameWallpaper is flaky

Project Member Reported by jamescook@chromium.org, Mar 20 2018

Issue description

Build with these GN args:

dcheck_always_on = true
is_debug = false
is_component_build = true
target_os = "chromeos"
use_goma = true
enable_nacl = false

Build and run all ash_unittests locally:

ninja -C out/Default -j500 -l99 ash_unittests && testing/xvfb.py out/Default/ash_unittests

Failures:

[ RUN      ] WallpaperControllerTest.PreventReloadingSameWallpaper
[205356:205356:0320/092400.050524:1213524695311:ERROR:wallpaper_controller.cc(588)] Wrote 18446744073709551615 byte(s) instead of 1483 to chrome_os_custom_wallpapers/small/user1@test.com-hash/user1@test.com-file
../../ash/wallpaper/wallpaper_controller_unittest.cc:387: Failure
Value of: WallpaperController::WriteJPEGFileForTesting( small_wallpaper_path, kSmallWallpaperWidth, kSmallWallpaperHeight, kSmallCustomWallpaperColor)
  Actual: false
Expected: true
[205356:206496:0320/092400.084985:1213524729771:ERROR:gl_context_virtual.cc(39)] Trying to make virtual context current without decoder.
[205356:206496:0320/092400.091571:1213524736357:ERROR:gl_context_virtual.cc(39)] Trying to make virtual context current without decoder.
[  FAILED  ] WallpaperControllerTest.PreventReloadingSameWallpaper (94 ms)

It's writing "-1" bytes. Maybe it's trying to open a file that's already open because the tests are running in parallel?

WallpaperControllerTest.ShowCustomWallpaperWithCorrectResolution is also flaky, maybe related?

  Issue 786266   "WallpaperControllerTest.MojoWallpaperObserverTest is flaky" sounds familiar.
 

Comment 1 by wzang@chromium.org, Mar 20 2018

Status: Started (was: Assigned)
FWIW I find I can introduce wallpaper flake more easily if I build with ASAN:

is_asan = true
is_debug = false
use_goma = true
target_os="chromeos"

Comment 3 by wzang@chromium.org, Apr 7 2018

This is the same with  issue 786266 : since deleting wallpaper files is done on another thread, RunUntilIdle sometimes unblocks before the deletion completes.

Although it can be fixed in the same way with 786266, the wallpaper deletion code is invoked for at least 15 times in multiple tests, and adding a run_loop for each introduces lots of code, plus we need to create an additional observer method to notify the deletion completion. I'm still trying to find a better way to fix it. 
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 29

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

commit 1acc13b654e33bbf0d86c5bde3d9450666ad6469
Author: Wenzhao Zang <wzang@chromium.org>
Date: Sat Sep 29 07:59:34 2018

cros: WallpaperControllerTest should use ScopedTempDir

The flakiness is not related to RunUntilIdle(), but is because
ScopedTempDir is not used for custom or online wallpapers: the tests
do lots of operations on the directories, so we should make sure they
are unique to avoid affecting each other.

Bug:  823760 ,  823762 
Test: ash_unittests (Run all tests together)
Change-Id: I9cf6a70a4cfc146c8a0b91ed4cf2860dbc72394f
Reviewed-on: https://chromium-review.googlesource.com/1252981
Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595308}
[modify] https://crrev.com/1acc13b654e33bbf0d86c5bde3d9450666ad6469/ash/wallpaper/wallpaper_controller_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment