mash: DCHECK "Can't create service preferences" on startup |
||||||||
Issue descriptionChrome ToT r455790, ozone target_os="chromeos" build on linux desktop out/Default/chrome --user-data-dir=/tmp/udd --ash-debug-shortcuts --ash-dev-shortcuts --ash-host-window-bounds="1280x768" --no-sandbox --mash About 50% of the time I get this DCHECK failure: [9476:9566:0309/134708.925953:FATAL:service_manager_connection_impl.cc(333)] Check failed: it != request_handlers_.end(). Can't create service preferences. No handler found. #0 0x7f48c76ff397 base::debug::StackTrace::StackTrace() #1 0x7f48c7720e5a logging::LogMessage::~LogMessage() #2 0x7f48c4cbf4d5 content::ServiceManagerConnectionImpl::IOThreadContext::CreateService() #3 0x7f48c4d9d69e service_manager::mojom::ServiceFactoryStubDispatch::Accept() #4 0x7f48c7c64742 mojo::InterfaceEndpointClient::HandleValidatedMessage() #5 0x7f48c7c63eb6 mojo::FilterChain::Accept() #6 0x7f48c7c6583b mojo::InterfaceEndpointClient::HandleIncomingMessage() #7 0x7f48c7c6d5f9 mojo::internal::MultiplexRouter::ProcessIncomingMessage() #8 0x7f48c7c6cef4 mojo::internal::MultiplexRouter::Accept() #9 0x7f48c7c63eb6 mojo::FilterChain::Accept() #10 0x7f48c7c6064e mojo::Connector::ReadSingleMessage() #11 0x7f48c7c60bf1 mojo::Connector::OnHandleReadyInternal() #12 0x7f48c7c45586 mojo::Watcher::OnHandleReady() #13 0x7f48c7c45322 mojo::Watcher::CallOnHandleReady() #14 0x7f48c39fd594 mojo::edk::Watcher::MaybeInvokeCallback() #15 0x7f48c39f7c43 mojo::edk::RequestContext::~RequestContext() #16 0x7f48c39e8561 mojo::edk::NodeChannel::OnChannelMessage() #17 0x7f48c39d3ff6 mojo::edk::Channel::OnReadComplete() #18 0x7f48c39d5777 mojo::edk::(anonymous namespace)::ChannelPosix::OnFileCanReadWithoutBlocking() #19 0x7f48c77305b1 base::MessagePumpLibevent::OnLibeventNotification() #20 0x7f48c77f3917 event_base_loop #21 0x7f48c77307fe base::MessagePumpLibevent::Run() #22 0x7f48c772d9ba base::MessageLoop::RunHandler() #23 0x7f48c776053f base::RunLoop::Run() #24 0x7f48c779c09b base::Thread::Run() #25 0x7f48c4f654c5 content::BrowserThreadImpl::IOThreadRun() #26 0x7f48c4f65652 content::BrowserThreadImpl::Run() #27 0x7f48c779c54e base::Thread::ThreadMain() #28 0x7f48c779463c base::(anonymous namespace)::ThreadFunc() #29 0x7f48c7873184 start_thread #30 0x7f48be88137d clone jonross, service not starting properly? rockot, some kind of race in service startup?
,
Mar 9 2017
+tibell@ as there have been recent changes to preferences +riajiang and kylechar who both saw this today. riajiang mentioned that clearing the user data dir was needed to get it running. It does sound we are trying to accept a connection to the "preferences service" before it has been added to the io thread.
,
Mar 10 2017
sammc@ change something regarding which thread we run something on, but none of our actual changes to the pref service landed before this bug was filed (i.e. they started landing today in SYD).
,
Mar 10 2017
,
Mar 10 2017
So the failing DCHECK was added by sammc@ in https://codereview.chromium.org/2729733003/ This is blocking mash dev right now, so I will revert the change. Then I'll take a look into the actual reason we are hitting this failure. Considering that the change referenced involved changing of which threads are used we likely have an unintended race. Especially since this is happening only 50% of the time.
,
Mar 10 2017
Revert available: https://codereview.chromium.org/2742523005/
,
Mar 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3c309fdbb3787d140f76c1cfc3ef8a994d8d4a4d commit 3c309fdbb3787d140f76c1cfc3ef8a994d8d4a4d Author: jonross <jonross@chromium.org> Date: Fri Mar 10 19:54:22 2017 Revert Change ServiceManagerConnectionImpl to run service request handlers on the IO thread Revert: https://codereview.chromium.org/2729733003/ As this is currently crashing on all mash builds, preventing development. TBR=rockot@chromium.org, jochen@chromium.org, sammc@chromium.org BUG= 700155 , 654988 Review-Url: https://codereview.chromium.org/2742523005 Cr-Commit-Position: refs/heads/master@{#456140} [modify] https://crrev.com/3c309fdbb3787d140f76c1cfc3ef8a994d8d4a4d/chrome/browser/chrome_content_browser_client.cc [modify] https://crrev.com/3c309fdbb3787d140f76c1cfc3ef8a994d8d4a4d/content/browser/browser_context.cc [modify] https://crrev.com/3c309fdbb3787d140f76c1cfc3ef8a994d8d4a4d/content/browser/service_manager/service_manager_context.cc [modify] https://crrev.com/3c309fdbb3787d140f76c1cfc3ef8a994d8d4a4d/content/common/service_manager/service_manager_connection_impl.cc [modify] https://crrev.com/3c309fdbb3787d140f76c1cfc3ef8a994d8d4a4d/content/common/service_manager/service_manager_connection_impl.h [delete] https://crrev.com/a7964169b3c21145980b845d68ff112c8169cd3f/content/common/service_manager/service_manager_connection_impl_unittest.cc [modify] https://crrev.com/3c309fdbb3787d140f76c1cfc3ef8a994d8d4a4d/content/test/BUILD.gn
,
Mar 10 2017
I'm closing this with the change having be reverted. The issue is that there is a race inherent to the startup of the chrome and ash services. wm_shell attempts to connect to preferences chrome instantiates the preferences service. The change delayed the creation of the service handler until later on the io_thread. Leading to a race. I'll follow up on issue 654988 which tracks the preferences updates.
,
May 30 2017
,
Aug 1 2017
,
Jan 22 2018
,
Feb 26 2018
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by roc...@chromium.org
, Mar 9 2017