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

Issue 654622 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

ChromeLauncherController tests fail when registering the instance.

Project Member Reported by msw@chromium.org, Oct 11 2016

Issue description

ChromeLauncherController tests fail when registering the instance.

This came up in my CL: https://codereview.chromium.org/2391253004 but a simpler repro is:
  Call ChromeLauncherControllerImpl::CreateInstance in InitLauncherController instead of using the constructor.
Setting that ChromeLauncherController::instance_ static pointer to this instance crashes tests:
  MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerImplTest.V1AppMenuGenerationTwoUsers
  MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerImplTest.V1AppUpdateOnUserSwitch
  MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerImplTest.V1AppUpdateOnUserSwitchEdgecases
  MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerImplTest.V1AppUpdateOnUserSwitchEdgecases2
  MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerImplTest.V1CloseOnVisitingDesktop

I should be able to avoid this by clearing the static pointer after creating the instance, but that seems odd.

[ RUN      ] MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerImplTest.V1AppUpdateOnUserSwitch
[22561:22561:1010/163536:2343323076504:WARNING:merge_session_throttling_utils.cc(138)] Loading content for a profile without session restore?
Received signal 11 SEGV_MAPERR 000000000000
#0 0x7f2e87446ace base::debug::StackTrace::StackTrace()
#1 0x7f2e8744660f base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x7f2e8a514330 <unknown>
#3 0x00000485b913 chrome::GetBrowserContextRedirectedInIncognito()
#4 0x0000074390c9 app_list::AppListSyncableServiceFactory::GetBrowserContextToUse()
#5 0x7f2e7e8a221f BrowserContextKeyedServiceFactory::GetContextToUse()
#6 0x7f2e801aa2ed KeyedServiceFactory::GetServiceForContext()
#7 0x7f2e7e8a1f67 BrowserContextKeyedServiceFactory::GetServiceForBrowserContext()
#8 0x000007438b8a app_list::AppListSyncableServiceFactory::GetForProfile()
#9 0x00000724fc78 ash::launcher::GetPinnedAppsFromPrefs()
#10 0x00000726546f ChromeLauncherControllerImpl::UpdateAppLaunchersFromPref()
#11 0x00000726903e ChromeLauncherControllerImpl::ActiveUserChanged()
#12 0x0000072a087a chrome::UserSwitchAnimatorChromeOS::TransitionUserShelf()
#13 0x0000072a035e chrome::UserSwitchAnimatorChromeOS::AdvanceUserTransitionAnimation()
#14 0x0000072a04b2 chrome::UserSwitchAnimatorChromeOS::FinalizeAnimation()
#15 0x00000729fbaf chrome::UserSwitchAnimatorChromeOS::UserSwitchAnimatorChromeOS()
#16 0x000007292a1d chrome::MultiUserWindowManagerChromeOS::ActiveUserChanged()
#17 0x000001a4bc16 MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerImplTest::SwitchActiveUser()
#18 0x000001a29ef5 MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerImplTest_V1AppUpdateOnUserSwitch_Test::TestBody()
#19 0x0000018ea95a _ZN7testing8internal12InvokeHelperIN16sync_file_system18RemoteServiceStateESt5tupleIJEEE12InvokeMethodINS2_25MockRemoteFileSyncServiceEMS8_KFS3_vEEES3_PT_T0_RKS5_
#20 0x000004095b8e testing::internal::HandleExceptionsInMethodIfSupported<>()
#21 0x00000408ad65 testing::Test::Run()
#22 0x00000408b488 testing::TestInfo::Run()
#23 0x00000408ba2a testing::TestCase::Run()
#24 0x000004090d7c testing::internal::UnitTestImpl::RunAllTests()
#25 0x000001d525fa _ZN7testing8internal12InvokeHelperIbSt5tupleIJEEE12InvokeMethodI25MockServiceProcessControlMS6_FbvEEEbPT_T0_RKS3_
#26 0x00000409716e testing::internal::HandleExceptionsInMethodIfSupported<>()
#27 0x000004090a1f testing::UnitTest::Run()
#28 0x000003f15811 RUN_ALL_TESTS()
#29 0x000003f147b2 base::TestSuite::Run()
#30 0x000003fc088d content::UnitTestTestSuite::Run()
#31 0x0000008404f9 _ZN4base8internal13FunctorTraitsIMNS_7RunLoopEFvvEvE6InvokeIPS2_JEEEvS4_OT_DpOT0_
#32 0x000000840421 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMNS_7RunLoopEFvvEJPS4_EEEvOT_DpOT0_
#33 0x000003f037e7 _ZN4base8internal7InvokerINS0_9BindStateIMN7content17UnitTestTestSuiteEFivEJNS0_17UnretainedWrapperIS4_EEEEEFivEE7RunImplIRKS6_RKSt5tupleIJS8_EEJLm0EEEEiOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
#34 0x000003f0372c _ZN4base8internal7InvokerINS0_9BindStateIMN7content17UnitTestTestSuiteEFivEJNS0_17UnretainedWrapperIS4_EEEEEFivEE3RunEPNS0_13BindStateBaseE
#35 0x00000083deab base::internal::RunMixin<>::Run()
#36 0x000003f18951 base::(anonymous namespace)::LaunchUnitTestsInternal()
#37 0x000003f187e4 base::LaunchUnitTests()
#38 0x000003f0352c main
#39 0x7f2e721a5f45 __libc_start_main
#40 0x00000082bae5 <unknown>
  r8: 00000000000000fe  r9: 00007ffca94c6b00 r10: fffffffffffffeb8 r11: 00007f2e7230a390
 r12: 000000000082babc r13: 00007ffca94c85c0 r14: 0000000000000000 r15: 0000000000000000
  di: 0000000000000000  si: 0000000000000000  bp: 00007ffca94c5a70  bx: 0000000000000000
  dx: 000000000060bb00  ax: 0000000000000000  cx: 000006aec69031a0  sp: 00007ffca94c5a60
  ip: 000000000485b913 efl: 0000000000010206 cgf: 0000000000000033 erf: 0000000000000004
 trp: 000000000000000e msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
[1010/163537:ERROR:kill_posix.cc(84)] Unable to terminate process group 22561: No such process
[1/11] MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerImplTest.V1AppUpdateOnUserSwitch (CRASHED)

 
Project Member

Comment 1 by sheriffbot@chromium.org, Oct 11 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 2 by msw@chromium.org, Oct 11 2017

Cc: khmel@chromium.org
Components: Platform>ARC
Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)
I fixed most fixtures that need to call ChromeLauncherController::set_instance_for_test(nullptr).
The one remaining test that does this is ChromeLauncherControllerMultiProfileWithArcTest.ArcMultiUser*
Removing that workaround causes a crash in ChromeLauncherController::AttachProfile, not sure why offhand:

[ RUN      ] ChromeLauncherControllerMultiProfileWithArcTest.ArcMultiUser/0
Received signal 11 SEGV_MAPERR 000000000000
#0 0x7f251ff22dac base::debug::StackTrace::StackTrace()
#1 0x7f251ff22891 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x7f2521f0e330 <unknown>
#3 0x000004408725 ChromeLauncherController::AttachProfile()
#4 0x00000440b8ee ChromeLauncherController::ActiveUserChanged()
#5 0x0000044197a3 chrome::UserSwitchAnimatorChromeOS::AdvanceUserTransitionAnimation()
#6 0x0000044192c8 chrome::UserSwitchAnimatorChromeOS::UserSwitchAnimatorChromeOS()
#7 0x000004417ed4 chrome::MultiUserWindowManagerChromeOS::ActiveUserChanged()
#8 0x0000018f8e8d MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest::SwitchActiveUser()
#9 0x0000018f7fd5 ChromeLauncherControllerMultiProfileWithArcTest_ArcMultiUser_Test::TestBody()
...
Cc: -mfomitchev@chromium.org

Comment 4 by vadimt@chromium.org, Nov 29 2017

Labels: Not-Touch-Friendly-Launcher
Project Member

Comment 5 by bugdroid1@chromium.org, Mar 28 2018

Comment 6 by khmel@chromium.org, Mar 28 2018

Owner: khmel@chromium.org

Comment 7 by khmel@chromium.org, Mar 28 2018

Status: Fixed (was: Available)

Sign in to add a comment