New issue
Advanced search Search tips

Issue 693559 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Mar 2017
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

ArcAppModelBuilderTest.LaunchShortcuts test is flaky

Project Member Reported by emaxx@chromium.org, Feb 17 2017

Issue description

Chrome Version: ToT
OS: chromeos=1 build under Linux

What steps will reproduce the problem?
(1) Run the ArcAppModelBuilderTest.LaunchShortcuts test with ArcAppModelBuilderTest.LaunchApps:

$ out/Default/unit_tests --gtest_filter="*ArcAppModelBuilderTest.Launch*"

The test crashes with the following stack trace:

[FATAL:child_process_launcher_helper_posix.cc(140)] Check failed: GetRequiredFilesByServiceMap().count(service_name) == 0.
#0 0x7fce31ea003b base::debug::StackTrace::StackTrace()
#1 0x7fce31e9e6bc base::debug::StackTrace::StackTrace()
#2 0x7fce31f048ac logging::LogMessage::~LogMessage()
#3 0x7fce2d5cfc85 content::internal::SetFilesToShareForServicePosix()
#4 0x7fce2d5ce525 content::internal::ChildProcessLauncherHelper::SetRegisteredFilesForService()
#5 0x7fce2d5ca5e5 content::ChildProcessLauncher::SetRegisteredFilesForService()
#6 0x7fce2ddee431 content::(anonymous namespace)::BuiltinManifestProvider::AddServiceManifest()
#7 0x7fce2dded35d content::ServiceManagerContext::ServiceManagerContext()
#8 0x000004541a6f content::TestServiceManagerContext::TestServiceManagerContext()
#9 0x00000451e135 content::InProcessUtilityThreadHelper::InProcessUtilityThreadHelper()
#10 0x00000177761d extensions::ExtensionServiceTestBase::ExtensionServiceTestBase()
#11 0x0000021c881f AppListTestBase::AppListTestBase()
#12 0x0000021e506f ArcAppModelBuilderTest::ArcAppModelBuilderTest()
#13 0x0000021e7ccf ArcAppModelBuilderTest_LaunchShortcuts_Test::ArcAppModelBuilderTest_LaunchShortcuts_Test()
#14 0x0000021e7c97 testing::internal::TestFactoryImpl<>::CreateTest()
#15 0x000001a88e1e _ZN7testing8internal12InvokeHelperIN16sync_file_system18RemoteServiceStateESt5tupleIJEEE12InvokeMethod
INS2_25MockRemoteFileSyncServiceEMS8_KFS3_vEEES3_PT_T0_RKS5_
#16 0x0000045f4352 testing::internal::HandleExceptionsInMethodIfSupported<>()
#17 0x0000045e98e8 testing::TestInfo::Run()
#18 0x0000045e9eaf testing::TestCase::Run()
#19 0x0000045ef20c testing::internal::UnitTestImpl::RunAllTests()
#20 0x000001ee8b8e _ZN7testing8internal12InvokeHelperIbSt5tupleIJEEE12InvokeMethodI25MockServiceProcessControlMS6_FbvEEEb
PT_T0_RKS3_
#21 0x0000045f56d2 testing::internal::HandleExceptionsInMethodIfSupported<>()
#22 0x0000045eeeaf testing::UnitTest::Run()
#23 0x000004464681 RUN_ALL_TESTS()
#24 0x000004463612 base::TestSuite::Run()
#25 0x00000452349d content::UnitTestTestSuite::Run()
#26 0x0000008ebe05 _ZN4base8internal13FunctorTraitsIMNS_7RunLoopEFvvEvE6InvokeIPS2_JEEEvS4_OT_DpOT0_
#27 0x0000008ebd21 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMNS_7RunLoopEFvvEJPS4_EEEvOT_DpOT0_
#28 0x00000444ddc7 _ZN4base8internal7InvokerINS0_9BindStateIMN7content17UnitTestTestSuiteEFivEJNS0_17UnretainedWrapperIS4
_EEEEEFivEE7RunImplIRKS6_RKSt5tupleIJS8_EEJLm0EEEEiOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
#29 0x00000444dd0c _ZN4base8internal7InvokerINS0_9BindStateIMN7content17UnitTestTestSuiteEFivEJNS0_17UnretainedWrapperIS4
_EEEEEFivEE3RunEPNS0_13BindStateBaseE
#30 0x0000008e963b base::internal::RunMixin<>::Run()
#31 0x0000044676c1 base::(anonymous namespace)::LaunchUnitTestsInternal()
#32 0x000004467554 base::LaunchUnitTests()
#33 0x00000444db0c main
#34 0x7fce19b38f45 __libc_start_main
#35 0x0000008d71b5 <unknown>


Note that the test works successfully when executed alone.


Xiaohui: could you PTAL? Assigning to you as the test author.
 

Comment 1 by emaxx@chromium.org, Feb 17 2017

Actually, the same crashes are also observed with some of the other ArcAppModelBuilderTest test cases (probably this is determined by the order of the tests execution):

* ArcAppModelBuilderTest.RefreshAllFillsContent crashes when running with --gtest_filter="ArcAppModelBuilderTest.*RefreshAll*"
* ArcAppModelBuilderTest.RefreshAllOnReady crashes when running with --gtest_filter="ArcAppModelBuilderTest.*"
Owner: khmel@chromium.org
Assign to khmel@ who probably have more up to date knowledge for this test.

Comment 3 by khmel@chromium.org, Feb 21 2017

Status: Started (was: Assigned)
Easy reproducible. Taking a look

Comment 4 by khmel@chromium.org, Feb 21 2017

This not only ARC related. Many other tests affected.

Comment 5 by khmel@chromium.org, Mar 13 2017

CL: crrev.com/2749653002
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 13 2017

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

commit 1a2563dcc211e71fa8c32f52c9bc4d64d71a42cc
Author: khmel <khmel@chromium.org>
Date: Mon Mar 13 22:51:13 2017

allow unit_tests to re-create service manager context.

ServiceManagerContext is designed to be created only once. However in
unit tests in batch mode TestServiceManagerContext might be recreated
many times for the same process. This calls several asserts. This CL
resets static files association after destroying
TestServiceManagerContext

TEST=unit_tests passes, number of retry tests changed 81->4 time
     from 256 seconds to 88.
BUG= 693559 

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

[modify] https://crrev.com/1a2563dcc211e71fa8c32f52c9bc4d64d71a42cc/content/browser/child_process_launcher.cc
[modify] https://crrev.com/1a2563dcc211e71fa8c32f52c9bc4d64d71a42cc/content/browser/child_process_launcher.h
[modify] https://crrev.com/1a2563dcc211e71fa8c32f52c9bc4d64d71a42cc/content/browser/child_process_launcher_helper.h
[modify] https://crrev.com/1a2563dcc211e71fa8c32f52c9bc4d64d71a42cc/content/browser/child_process_launcher_helper_android.cc
[modify] https://crrev.com/1a2563dcc211e71fa8c32f52c9bc4d64d71a42cc/content/browser/child_process_launcher_helper_linux.cc
[modify] https://crrev.com/1a2563dcc211e71fa8c32f52c9bc4d64d71a42cc/content/browser/child_process_launcher_helper_mac.cc
[modify] https://crrev.com/1a2563dcc211e71fa8c32f52c9bc4d64d71a42cc/content/browser/child_process_launcher_helper_posix.cc
[modify] https://crrev.com/1a2563dcc211e71fa8c32f52c9bc4d64d71a42cc/content/browser/child_process_launcher_helper_posix.h
[modify] https://crrev.com/1a2563dcc211e71fa8c32f52c9bc4d64d71a42cc/content/browser/child_process_launcher_helper_win.cc
[modify] https://crrev.com/1a2563dcc211e71fa8c32f52c9bc4d64d71a42cc/content/public/test/test_service_manager_context.cc

Comment 7 by khmel@chromium.org, Mar 13 2017

Status: Fixed (was: Started)
Status: Verified (was: Fixed)

Sign in to add a comment