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

Issue 882606 link

Starred by 5 users

Issue metadata

Status: Verified
Owner:
Closed: Sep 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: ----

Blocked on:
issue 442214
issue 884963



Sign in to add a comment

webui_polymer2_browser_tests very flaky on chromium.memory/Linux ChromiumOS MSan Tests

Project Member Reported by sheriff-...@appspot.gserviceaccount.com, Sep 10

Issue description

Filed by sheriff-o-matic@appspot.gserviceaccount.com on behalf of ojan@google.com

webui_polymer2_browser_tests failing on chromium.memory/Linux ChromiumOS MSan Tests

Builders failed on: 
- Linux ChromiumOS MSan Tests: 
  https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20ChromiumOS%20MSan%20Tests


 
Labels: -Pri-2 Pri-1
Owner: rbpotter@chromium.org
Status: Assigned (was: Available)
rbpotter, looks like you just added these tests?
Labels: OS-Chrome
Tests were added nearly a month ago in https://crrev.com/c/1132320, and it appears the flakiness is much more recent and limited to the GalleryBrowserTest* tests (the runs where the test times out appear to be due to those tests also). Will remove the gallery browser tests from the polymer2 test list, and investigate whether there is a recent change that may have caused these failures.

Looking at the builds that have failed, observed the following tests appear to be failing: 

GalleryBrowserTest.TraverseSlideThumbnailsOnDownloads
GalleryBrowserTest.CheckAvailabilityOfEditAndPrintButtons
GalleryBrowserTest.CheckAvailabilityOfShareButtonOnDownloads
GalleryBrowserTest.RenameImageOnDownloads
GalleryBrowserTestInGuestMode.CropImageOnDownloads
GalleryBrowserTestInGuestMode.ResizeImageOnDownloads

Several other gallery browser tests are also timing out.
Labels: -Sheriff-Chromium
Given that rbpotter offered to take care of this, I will take it out of the sheriffing queue.
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 14

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

commit e3469424bb4f6cf771cd150d22dd54c4e7d74c0b
Author: rbpotter <rbpotter@chromium.org>
Date: Fri Sep 14 19:43:14 2018

Disable GalleryBrowserTests with Polymer 2

These tests are flaky on the Chrome OS MSAN bot.

Bug:  882606 
Change-Id: Ia4a8eaf07b4f0d649f197a89290595a3250a9f3d
Reviewed-on: https://chromium-review.googlesource.com/1217715
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591438}
[modify] https://crrev.com/e3469424bb4f6cf771cd150d22dd54c4e7d74c0b/testing/buildbot/filters/webui_polymer2_browser_tests.filter

Cc: slangley@chromium.org tapted@chromium.org rbpotter@chromium.org fukino@chromium.org yoshiki@chromium.org dpa...@chromium.org
Owner: noel@chromium.org
Per the webui_polymer2_browser_tests flakiness dashboard results:

https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=webui_polymer2_browser_tests&tests=GalleryBrowserTest

the GalleryBrowserTests are flake-tastic [1] when run with the webui_polymer2 enabled via the --enable-features=WebUIPolymer2 flag.

[1] image attached.
gallery-browser-test-webui-md2-11-23-08.png
216 KB View Download
Components: Platform>Apps>FileManager UI>Browser>WebUI
Looking at the failure LOG for MSAN/ASAN runs, I see:

[9930:9930:0913/051614.131875:INFO:CONSOLE(4957)] "Received the result of openGallery", source: chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/background/js/background_common_scripts.js (4957)
[9930:9930:0913/051614.245019:INFO:CONSOLE(3773)] "Uncaught (in promise) Error: Assertion failed: Missing required element: bottom-toolbar", source: chrome-extension://nlkncpkkdoccmpiclbokaimcnedabhhm/js/gallery_scripts.js (3773)
[9930:9930:0913/051617.568707:INFO:CONSOLE(156)] "at RemoteCallGallery.RemoteCall.waitForElement (/remote_call.js:182:15): Element .gallery[mode="thumbnail"] is not found.", source: chrome-extension://ejhcmmdhhpdhhgmifplfmjobgegbibkn/test_util.js (156)
[9930:9930:0913/051620.547035:INFO:CONSOLE(156)] "at RemoteCallGallery.RemoteCall.waitForElement (/remote_call.js:182:15): Element

The error is:

"Uncaught (in promise) Error: Assertion failed: Missing required element: bottom-toolbar", source: chrome-extension://nlkncpkkdoccmpiclbokaimcnedabhhm/js/gallery_scripts.js (3773)

bottom-toolbar is a <div> in the gallery.html

https://cs.chromium.org/chromium/src/ui/file_manager/gallery/gallery.html?type=cs&q=gallery_scripts.js+bottom-toolbar&sq=package:chromium&g=0&l=154

Seems that <div> is missing when the Gallery JS tries to access it.
Blockedon: 442214
I repro-ed this error when locally running the tests in ASAN.  The missing element is missing _because the gallery DOM document is still "loading"_

This bug was introduced by a no change in behavior (per the change description) refactoring change r317031 on  issue 442214 , where it changed the foreground gallery page script ...

ui/file_manager/gallery/js/gallery.js:

  + var initializePromise =
  +     Promise.all([loadTimeDataPromise, volumeManagerPromise]). 
  +     then(function(args) {
  +       var volumeManager = args[1];
  +       var gallery = new Gallery(volumeManager);
  +       return gallery;
  +     });

The "new Gallery(...)" will try access the gallery.html DOM document, and the code throws an exception when required elements are not present (see #6).

r317031 also added/defined loadTimeDataPromise as follows:

  + var loadTimeDataPromise = new Promise(function(fulfill, reject) {
  +   chrome.fileManagerPrivate.getStrings(function(strings) {
  +     window.loadTimeData.data = strings;
  +     i18nTemplate.process(document, loadTimeData);
  +     fulfill(true);
  +   });
  + });

Notice the document access?  Given #6, the document might be still be "loading"
though, and if so, the call applies i18 string transforms to an _incomplete DOM document_, viz., some i18 string transforms could be missed.

rbpotter@ WebUI not running in MSAN/ASAN: as you see above, MSAN/ASAN can slow things enough to reveal race conditions in the JS code [1].

[1] The entire FilesApp browser test suite runs in MSAN/ASAN for this reason, and often finds problems, not just in the JS code, but in the C++ code, recent examples being  crbug.com/883578   crbug.com/882293 
 Issue 884404  has been merged into this issue.
 Issue 884399  has been merged into this issue.

Comment 11 Deleted

Project Member

Comment 12 by bugdroid1@chromium.org, Sep 19

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

commit c841ca64e953eb74898f2bcfd5950900e9561fdc
Author: Noel Gordon <noel@chromium.org>
Date: Wed Sep 19 05:24:33 2018

Deflake GalleryBrowserTests on the WebUIPolymer2 bots

GalleryBrowserTests flake on the Polymer2 bots due to exceptions about
"missing DOM element bottom-toolbar" on the MSAN/ASAN bots.

Those bots are correct: the DOM document is still loading when gallery
JS tries to access the DOM to construct the JS Gallery. Application of
i18 transforms could also applied to an incomplete document.

Add a DOMContentLoaded handler and use it initialize the gallery: move
the loadTimeData i18 template processing therein and add asserts about
the document state when the Gallery is being constructed, catch errors
during construction.

With this change, the gallery browser tests no longer flake locally in
ASAN when run with the --enable-features=WebUIPolymer2 flag: re-enable
Gallery browser tests on the WebUIPolymer2 bots therefore.

Test: browser_tests --gtest_filter="GalleryBrowserTest*"
Bug:  882606 
Change-Id: I3bed9bac37e7c82cfdc7c25fd863f5fe0bb03370
Reviewed-on: https://chromium-review.googlesource.com/1227855
Commit-Queue: Noel Gordon <noel@chromium.org>
Reviewed-by: Naoki Fukino <fukino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592325}
[modify] https://crrev.com/c841ca64e953eb74898f2bcfd5950900e9561fdc/testing/buildbot/filters/webui_polymer2_browser_tests.filter
[modify] https://crrev.com/c841ca64e953eb74898f2bcfd5950900e9561fdc/ui/file_manager/gallery/js/gallery.js
[modify] https://crrev.com/c841ca64e953eb74898f2bcfd5950900e9561fdc/ui/file_manager/gallery/js/gallery_scripts.js

Cc: noel@chromium.org
 Issue 884207  has been merged into this issue.
Files Manager's AudioPlayer and VideoPlayer also have similar DOMContentLoaded issues that could produce flaky MSAN/ASAN test results.  Filed  issue 884963 .

Blocking: 884963
Cc: -ojan@google.com
Blocking: -884963
Blockedon: 884963
Status: Fixed (was: Assigned)
https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=webui_polymer2_browser_tests&tests=GalleryBrowserTest


GalleryBrowserTest-2018-09-21-MSAN-ASAN.png
244 KB View Download
Status: Verified (was: Fixed)
All good here.

Sign in to add a comment