New issue
Advanced search Search tips

Issue 798753 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

AppsGridViewTest.MouseDragFlipPage occasionally crashing on linux-chromeos-dbg

Project Member Reported by glevin@chromium.org, Jan 3 2018

Issue description

Chrome Version: 65.0.3311.0
OS: Chrome

The AppsGridViewTest.MouseDragFlipPage test in app_list_unittests is crashing on about one in nine runs on the linux-chromeos-dbg builder (https://ci.chromium.org/buildbot/chromium.chromiumos/linux-chromeos-dbg/?limit=300).  However, the fault doesn't seem to lie entirely within this test.  The crash only appears to happen when a previous test in this suite gives an "Unable to terminate process group" error, e.g.,

[110/178] AppsGridViewTest.CreatePage (169 ms)
[1950:1957:1222/192555.609121:49334447:ERROR:kill_posix.cc(84)] Unable to terminate process group 2122: No such process (3)

When one of these occurs first, AppsGridViewTest.MouseDragFlipPage and all its retries will crash; when the "Unable to terminate" error doesn't occur on a prior test, MouseDragFlipPage will succeed.  The "Unable to terminate" error has been seen on (among others):
  FolderHeaderViewTest.MaxFoldernNameLength
  AppListViewTest.GestureScrollTransitionsToFullscreen
  AppsGridViewTest.CreatePage
  AppListViewFocusTest.CtrlASelectsAllTextInSearchbox

AppsGridViewTest.MouseDragFlipPage will also give the "Unable to terminate" error on all its retries, but not on its first failure.

The first observed failure was on 12/21/17 (https://ci.chromium.org/buildbot/chromium.chromiumos/linux-chromeos-dbg/3324).
jennyz@, your CL https://chromium-review.googlesource.com/c/chromium/src/+/827880 is the only change immediately prior to this first failure in app_list/views that seems to involve dragging and page flipping, so it seems a possible candidate for when this started.
+xiyuan@, since you seem to have done the most work in this test.  Could one of you take a look, or reassign as appropriate?

Here's the crash (from 1st retry, which includes the "Unable to terminate" error):

Retrying 1 test (retry #1)
[31256:31264:1222/040652.205843:9510532759:ERROR:kill_posix.cc(84)] Unable to terminate process group 32097: No such process (3)
[ RUN      ] AppsGridViewTest.MouseDragFlipPage
[32097:32097:1222/040652.128476:9510455462:FATAL:apps_grid_view_unittest.cc(186)] Check failed: view. 
#0 0x7f579539018d base::debug::StackTrace::StackTrace()
#1 0x7f579538e70c base::debug::StackTrace::StackTrace()
#2 0x7f5795412b3d logging::LogMessage::~LogMessage()
#3 0x0000004fb168 app_list::test::AppsGridViewTest::SimulateDrag()
#4 0x0000004f199c app_list::test::AppsGridViewTest_MouseDragFlipPage_Test::TestBody()
#5 0x00000059295e testing::internal::HandleSehExceptionsInMethodIfSupported<>()
#6 0x000000584a42 testing::internal::HandleExceptionsInMethodIfSupported<>()
#7 0x00000056fb46 testing::Test::Run()
#8 0x00000057047d testing::TestInfo::Run()
#9 0x000000570edc testing::TestCase::Run()
#10 0x00000057ca3c testing::internal::UnitTestImpl::RunAllTests()
#11 0x00000059337e testing::internal::HandleSehExceptionsInMethodIfSupported<>()
#12 0x000000585fc2 testing::internal::HandleExceptionsInMethodIfSupported<>()
#13 0x00000057c64e testing::UnitTest::Run()
#14 0x00000094fec1 RUN_ALL_TESTS()
#15 0x00000094cf92 base::TestSuite::Run()
#16 0x0000004a761d _ZN4base8internal13FunctorTraitsIMNS_9TestSuiteEFivEvE6InvokeIPN12_GLOBAL__N_116AppListTestSuiteEJEEEiS4_OT_DpOT0_
#17 0x0000004a7564 _ZN4base8internal12InvokeHelperILb0EiE8MakeItSoIRKMNS_9TestSuiteEFivEJPN12_GLOBAL__N_116AppListTestSuiteEEEEiOT_DpOT0_
#18 0x0000004a7515 _ZN4base8internal7InvokerINS0_9BindStateIMNS_9TestSuiteEFivEJNS0_17UnretainedWrapperIN12_GLOBAL__N_116AppListTestSuiteEEEEEEFivEE7RunImplIRKS5_RKNSt3__15tupleIJS9_EEEJLm0EEEEiOT_OT0_NSG_16integer_sequenceImJXspT1_EEEE
#19 0x0000004a745c _ZN4base8internal7InvokerINS0_9BindStateIMNS_9TestSuiteEFivEJNS0_17UnretainedWrapperIN12_GLOBAL__N_116AppListTestSuiteEEEEEEFivEE3RunEPNS0_13BindStateBaseE
#20 0x00000095642d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv
#21 0x0000009570af base::(anonymous namespace)::LaunchUnitTestsInternal()
#22 0x000000956f45 base::LaunchUnitTests()
#23 0x0000004a69cf main
#24 0x7f578ddf5f45 __libc_start_main
#25 0x00000044c29a _start

[179/179] AppsGridViewTest.MouseDragFlipPage (CRASHED)
 
Proposed fix: https://chromium-review.googlesource.com/c/chromium/src/+/848423

The flake is because EndDrag animates the dragged view at the end. MouseDragFlipPage has a second drag. If the animation does not finish in time, the second drag fails because the view is not found at its expected location.
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 3 2018

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

commit 27cff7f4367f237bfcb960e7ee51edad24f9816f
Author: Xiyuan Xia <xiyuan@chromium.org>
Date: Wed Jan 03 22:30:34 2018

applist: Fix flaky MouseDragFlipPage

AppsGridView::EndDrag() animates the dragged view at the end. This
causes test flakes in MouseDragFlipPage, where the test attempts
a second drag. If the animation does not finish in time, the second
drag fails because the view is not at its expected location. Fix
this by forcing a layout after EndDrag.

Bug:  798753 
Change-Id: Ibd12d665d01d36699023dbc57b7aacf463f04f05
Reviewed-on: https://chromium-review.googlesource.com/848423
Reviewed-by: Jenny Zhang <jennyz@chromium.org>
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526841}
[modify] https://crrev.com/27cff7f4367f237bfcb960e7ee51edad24f9816f/ui/app_list/views/apps_grid_view_unittest.cc

Status: Fixed (was: Assigned)
Status: Verified (was: Fixed)
No recurrences seen since the change was checked in.  Thanks for fixing!

Sign in to add a comment