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

Issue 716476 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 716727



Sign in to add a comment

SessionController::SetUserSessionOrder Check Failing

Project Member Reported by jonr...@chromium.org, Apr 28 2017

Issue description

When running the mash_browser_tests we are seeing failures in SessionController::SetUserSessionOrder

To run: out/${OUT_DIR}/browser_tests --run-in-mash

One test with high reproduction rate is MultiProfileFileManagerBrowserTest.PRE_BasicDownloads. However this is disabled on debug and asan builds. But it repros locally.

Stack Trace:

[0428/062229.133366:FATAL:session_controller.cc(203)] Check failed: user_sessions_.size() == user_session_order.size() (4 vs. 1)
#0 0x00000366143c base::debug::StackTrace::StackTrace()
#1 0x000003679c61 logging::LogMessage::~LogMessage()
#2 0x000005ffc57f ash::SessionController::SetUserSessionOrder()
#3 0x000002925b96 ash::mojom::SessionControllerStubDispatch::Accept()
#4 0x00000487c878 mojo::InterfaceEndpointClient::HandleValidatedMessage()
#5 0x00000488f296 mojo::FilterChain::Accept()
#6 0x00000487d985 mojo::InterfaceEndpointClient::HandleIncomingMessage()
#7 0x000004884365 mojo::internal::MultiplexRouter::ProcessIncomingMessage()
#8 0x000004883b94 mojo::internal::MultiplexRouter::Accept()
#9 0x00000488f296 mojo::FilterChain::Accept()
#10 0x00000487adcc mojo::Connector::ReadSingleMessage()
#11 0x00000487b481 mojo::Connector::ReadAllAvailableMessages()
#12 0x00000487b339 mojo::Connector::OnHandleReadyInternal()
#13 0x000004890c0c mojo::SimpleWatcher::OnHandleReady()
#14 0x00000252871f _ZN4base8internal7InvokerINS0_9BindStateIMN7content25ServiceWorkerProviderHostEFviN5blink21WebServiceWorkerStateEEJNS_7WeakPtrIS4_EEiS6_EEEFvvEE7RunImplIRKS8_RKSt5tupleIJSA_iS6_EEJLm0ELm1ELm2EEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
#15 0x0000006c7da9 _ZNO4base8CallbackIFvvELNS_8internal8CopyModeE1ELNS2_10RepeatModeE1EE3RunEv
#16 0x000003710ce4 base::debug::TaskAnnotator::RunTask()
#17 0x000003681269 base::MessageLoop::RunTask()
#18 0x0000036814fb base::MessageLoop::DeferOrRunPendingTask()
#19 0x0000036819ad base::MessageLoop::DoWork()
#20 0x000003684129 base::MessagePumpLibevent::Run()
#21 0x000003680ff1 base::MessageLoop::RunHandler()
#22 0x0000036a9be9 base::RunLoop::Run()
#23 0x000003653528 (anonymous namespace)::StartEmbeddedService()
#24 0x0000022e859d _ZN4base8internal7InvokerINS0_9BindStateIPFvN4mojo16InterfaceRequestIN5blink5mojom20InstalledAppProviderEEEEJEEES9_E3RunEPNS0_13BindStateBaseEOS8_
#25 0x00000200927e service_manager::RunStandaloneService()
#26 0x0000036531ed RunMashBrowserTests()
#27 0x000003653067 main
#28 0x7f82e2429f45 __libc_start_main
#29 0x00000061a72e <unknown>

Received signal 6
#0 0x00000366143c base::debug::StackTrace::StackTrace()
#1 0x000003660fa1 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x7f82e5dae330 <unknown>
#3 0x7f82e243ec37 gsignal
#4 0x7f82e2442028 abort
#5 0x00000365fc95 base::debug::BreakDebugger()
#6 0x00000367a027 logging::LogMessage::~LogMessage()
#7 0x000005ffc57f ash::SessionController::SetUserSessionOrder()
#8 0x000002925b96 ash::mojom::SessionControllerStubDispatch::Accept()
#9 0x00000487c878 mojo::InterfaceEndpointClient::HandleValidatedMessage()
#10 0x00000488f296 mojo::FilterChain::Accept()
#11 0x00000487d985 mojo::InterfaceEndpointClient::HandleIncomingMessage()
#12 0x000004884365 mojo::internal::MultiplexRouter::ProcessIncomingMessage()
#13 0x000004883b94 mojo::internal::MultiplexRouter::Accept()
#14 0x00000488f296 mojo::FilterChain::Accept()
#15 0x00000487adcc mojo::Connector::ReadSingleMessage()
#16 0x00000487b481 mojo::Connector::ReadAllAvailableMessages()
#17 0x00000487b339 mojo::Connector::OnHandleReadyInternal()
#18 0x000004890c0c mojo::SimpleWatcher::OnHandleReady()
#19 0x00000252871f _ZN4base8internal7InvokerINS0_9BindStateIMN7content25ServiceWorkerProviderHostEFviN5blink21WebServiceWorkerStateEEJNS_7WeakPtrIS4_EEiS6_EEEFvvEE7RunImplIRKS8_RKSt5tupleIJSA_iS6_EEJLm0ELm1ELm2EEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
#20 0x0000006c7da9 _ZNO4base8CallbackIFvvELNS_8internal8CopyModeE1ELNS2_10RepeatModeE1EE3RunEv
#21 0x000003710ce4 base::debug::TaskAnnotator::RunTask()
#22 0x000003681269 base::MessageLoop::RunTask()
#23 0x0000036814fb base::MessageLoop::DeferOrRunPendingTask()
#24 0x0000036819ad base::MessageLoop::DoWork()
#25 0x000003684129 base::MessagePumpLibevent::Run()
#26 0x000003680ff1 base::MessageLoop::RunHandler()
#27 0x0000036a9be9 base::RunLoop::Run()
#28 0x000003653528 (anonymous namespace)::StartEmbeddedService()
#29 0x0000022e859d _ZN4base8internal7InvokerINS0_9BindStateIPFvN4mojo16InterfaceRequestIN5blink5mojom20InstalledAppProviderEEEEJEEES9_E3RunEPNS0_13BindStateBaseEOS8_
#30 0x00000200927e service_manager::RunStandaloneService()
#31 0x0000036531ed RunMashBrowserTests()
#32 0x000003653067 main
#33 0x7f82e2429f45 __libc_start_main
#34 0x00000061a72e <unknown>
  r8: ffffa491dbc27d88  r9: ffffa491dbc27d78 r10: 0000000000000008 r11: 0000000000000206
 r12: 00007f82e2ce5940 r13: 00007fffb6d2e748 r14: 0000000000000080 r15: 00007fffb6d2e740
  di: 00000000000001e1  si: 00000000000001e1  bp: 00007fffb6d2e2a0  bx: 00007fffb6d2e2b0
  dx: 0000000000000006  ax: 0000000000000000  cx: ffffffffffffffff  sp: 00007fffb6d2e168
  ip: 00007f82e243ec37 efl: 0000000000000206 cgf: 0000000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]

Instance of a failing build with the error: https://build.chromium.org/p/chromium.fyi/builders/Mojo%20ChromiumOS/builds/16953

I've also seen other tests failing with this error.
 

Comment 1 by xiy...@chromium.org, Apr 28 2017

Status: Started (was: Assigned)
Saw this on try bots before. Let me try to repro locally.

Comment 2 by xiy...@chromium.org, Apr 28 2017

 Issue 716505  has been merged into this issue.

Comment 3 by xiy...@chromium.org, Apr 28 2017

It seems like ash stays alive when we go from PRE_test to test. PRE_BasicDownloads adds 4 users. When BasicDownloads runs, it has no idea of those users.

Comment 4 by xiy...@chromium.org, Apr 28 2017

Confirmed that ash does not go away in PRE_test -> test. We start ServiceManager in MashTestLauncherDelegate::PreRunTest by creating a MojoTestConnector instance. The MojoTestConnector instance goes away in OnDoneRunningTests. However, OnDoneRunningTests is only called when all dependent tests are finished. The call seq is something like:
  PreRunTest -> PRE_test -> PreRunTest -> test -> OnDoneRunningTests.

So the same MojoTestConnector instance thus same service manager and mash_session services are used for PRE_test -> test. 

IIRC, when mash work starts, I was told that we can assume ash would go away when browser goes away. This breaks that assumption, i.e. browser is restarted during the PRE_test to test transistion. But ash does not.

I can fix the problem by resetting SessionController's cached states when a new connection is made to it (or when the old connection goes away). Not sure whether this is the right thing to do though. Let me know whether I should pursue that approach.
Cc: xiy...@chromium.org
Owner: jonr...@chromium.org
No I would hold off on that approach.

As this PRE_test ordering you see would also affect other tests. I'll take a look.
Project Member

Comment 6 by chromium...@appspot.gserviceaccount.com, May 1 2017

Labels: Sheriff-Chromium
Detected 3 new flakes for test/step "PrintPreviewDestinationSearchTest.Select". To see the actual flakes, please visit https://chromium-try-flakes.appspot.com/all_flake_occurrences?key=ahVzfmNocm9taXVtLXRyeS1mbGFrZXNyMwsSBUZsYWtlIihQcmludFByZXZpZXdEZXN0aW5hdGlvblNlYXJjaFRlc3QuU2VsZWN0DA. This message was posted automatically by the chromium-try-flakes app. Since flakiness is ongoing, the issue was moved back into Sheriff Bug Queue (unless already there).

Comment 7 by suzyh@chromium.org, May 1 2017

Labels: -Sheriff-Chromium
Removing sheriff label since this is already under investigation.
Cc: jmad...@chromium.org dnojiri@chromium.org hychao@chromium.org sduvvuri@chromium.org
 Issue 718471  has been merged into this issue.
Labels: -Pri-3 Pri-2
upgrading priority.
Blocking: 716727
Status: Fixed (was: Started)
SessionController failures were resolved with https://codereview.chromium.org/2858103002/
Components: -MUS Internals>Services>WindowService

Sign in to add a comment