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

Issue 876906 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: ----



Sign in to add a comment

Make sure MultiDevice preferences are only registered once

Project Member Reported by khorimoto@chromium.org, Aug 22

Issue description

We got a bug report from ortuno@ that his debug build crashed on a DCHECK() when using multi-device features.

Specifically, the DCHECK() was failing because some multi-device preferences were being registered multiple times. The specific instance that he mentioned was that the CryptAuth-related preferences were being registered twice since ChromeCryptAuthServiceFactory::RegisterProfilePrefs() can be called twice when the flag is on.

We are moving several sets of preferences from outside the DeviceSync and MultiDeviceSetup services to inside of them. We should audit these preferences to make sure they are always being registered when needed but that they are never registered twice.
 
Cc: azeemarshad@chromium.org
+azeemarshad to CC; Azeem just ran into this as well.

Note that the failure only occurs on debug builds, so for now, just run on a release build without DCHECK()s. That being said, we still need to fix this so that it runs cleanly with DCHECK()s enabled, so keeping this as a P1 M-70 blocker.
Cc: nohle@chromium.org
Owner: nohle@chromium.org
Status: Assigned (was: Available)
Assigning to Josh, who will work on it while I'm OOO next week.

Josh, here are the preferences we need to look into:
  *CryptAuth: https://cs.chromium.org/chromium/src/components/cryptauth/pref_names.cc
  *MultiDevice: https://cs.chromium.org/chromium/src/chromeos/services/multidevice_setup/public/cpp/prefs.cc

To fix this, you'll need to build with DCHECK()s enabled by adding "dcheck_always_on = true" to your gn args. So, if you're on testing on an Eve, you'd want to run "gn args out_eve/Release" to access the arguments, then you add the aforementioned line, then save the file and rebuild Chrome.

Then, run through all combinations of these flags on/off: "Instant Tethering", "Enables the MultiDevice API", "Enable unified MultiDevice settings", "Enable unified MultiDevice setup". When the flags are enabled, use the available features and ensure that they work.

When you first try some of these out, you will experience crashes (that's the bug you need to fix). To determine the source of the crash, you can use GDB (see GDB section of go/howdoicros). The correct solution is to make sure that the flags are only registered in one spot depending on which flags are enabled. While I'm out, Ryan can help you through any edge cases you hit.
Here is one way to reproduce the crash:

1) Disable all flags mentioned above--"Instant Tethering", "Enable the MultiDevice API", "Enable unified MultiDevice settings", "Enable unified MultiDevice setup" in chrome://flags--and restart.
2) Then, enable all flags and restart.

I was SSH'd into the chromebook and read the logs at /home/chronos/user/log/chrome as the chromebook was restarting but before the crash (and subsequent restart):

[22486:22486:0904/143108.135591:INFO:secure_channel_initializer.cc(64)] SecureChannelInitializer::SecureChannelInitializer(): Fetching Bluetooth adapter. All requests received before the adapter is fetched will be queued.
[22486:22486:0904/143108.135710:INFO:secure_channel_service.cc(38)] SecureChannelService::OnBindInterface() for interface chromeos.secure_channel.mojom.SecureChannel.
[22486:22486:0904/143108.135985:INFO:device_sync_service.cc(30)] DeviceSyncService::OnStart()
[22486:22486:0904/143108.136017:INFO:device_sync_impl.cc(120)] DeviceSyncImpl: Initializing.
[22486:22486:0904/143108.136069:INFO:device_sync_impl.cc(292)] DeviceSyncImpl: Connecting to pref service.
[22486:22486:0904/143108.138337:INFO:device_sync_service.cc(46)] DeviceSyncService::OnBindInterface() from interface chromeos.device_sync.mojom.DeviceSync.
[22486:22486:0904/143108.144011:VERBOSE1:arc_audio_bridge.cc(110)] HEADPHONE 0 MICROPHONE 0
[22486:22486:0904/143108.144218:VERBOSE1:arc_audio_bridge.cc(139)] Send switch state 0
[22486:22486:0904/143108.189758:INFO:multidevice_setup_service.cc(47)] MultiDeviceSetupService::OnStart()
[22486:22486:0904/143108.190074:INFO:multidevice_setup_service.cc(57)] MultiDeviceSetupService::OnBindInterface() from interface chromeos.multidevice_setup.mojom.MultiDeviceSetup.
[22486:22486:0904/143108.500586:INFO:secure_channel_initializer.cc(119)] SecureChannelInitializer::OnBluetoothAdapterReceived(): Bluetooth adapter has been fetched. Passing all queued requests to the service.
[22486:22486:0904/143108.500883:WARNING:device_sync_impl.cc(160)] DeviceSyncImpl::GetLocalDeviceMetadata() invoked before initialization was complete. Cannot return local device metadata.
[22486:22486:0904/143108.503820:WARNING:device_sync_impl.cc(174)] DeviceSyncImpl::GetSyncedDevices() invoked before initialization was complete. Cannot return devices.
[22486:22486:0904/143108.582146:ERROR:content_gpu_interface_provider.cc(83)] Not implemented reached in virtual void ash::ContentGpuInterfaceProvider::RegisterOzoneGpuInterfaces(service_manager::BinderRegistry *)
[22486:22486:0904/143108.684603:WARNING:shelf_button.cc(381)] An icon of size 32x32is being scaled up and will look blurry.
[22486:22486:0904/143108.883106:INFO:device_sync_client_impl.cc(196)] Tried to get local device metadata before service was fully initialized; waiting for enrollment to complete before continuing.
[22486:22486:0904/143108.883203:INFO:device_sync_client_impl.cc(169)] Tried to fetch synced devices before service was fully initialized; waiting for sync to complete before continuing.
[22486:22486:0904/143108.952274:INFO:multidevice_setup_service.cc(57)] MultiDeviceSetupService::OnBindInterface() from interface chromeos.multidevice_setup.mojom.MultiDeviceSetup.
[22486:22486:0904/143108.977358:FATAL:shared_pref_registry.cc(71)] Check failed: inserted. Multiple services claimed ownership of pref "cryptauth.enrollment.user_private_key"
#0 0x5bf1b5e4971c <unknown>
#1 0x5bf1b5da714b <unknown>
#2 0x5bf1b441221d <unknown>
#3 0x5bf1b440f7bf <unknown>
#4 0x5bf1b37a6d59 <unknown>
#5 0x5bf1b440f466 <unknown>
#6 0x5bf1b5ecec2d <unknown>
#7 0x5bf1b5ee14f6 <unknown>
#8 0x5bf1b5ed01b2 <unknown>
#9 0x5bf1b5ed62dc <unknown>
#10 0x5bf1b5ed5690 <unknown>
#11 0x5bf1b5ee14f6 <unknown>
#12 0x5bf1b5ecc80b <unknown>
#13 0x5bf1b5ecd2c4 <unknown>
#14 0x5bf1b5ecd126 <unknown>
#15 0x5bf1b34565f4 <unknown>
#16 0x5bf1b5eee623 <unknown>
#17 0x5bf1b5eeeb9e <unknown>
#18 0x5bf1b5e6e16b <unknown>
#19 0x5bf1b5db074e <unknown>
#20 0x5bf1b5db0b52 <unknown>
#21 0x5bf1b5e69f49 <unknown>
#22 0x5bf1b5db0221 <unknown>
#23 0x5bf1b5dd95e6 <unknown>
#24 0x5bf1b59855fa <unknown>
#25 0x5bf1b39cabf4 <unknown>
#26 0x5bf1b39cdc13 <unknown>
#27 0x5bf1b39c6926 <unknown>
#28 0x5bf1b5972e2b <unknown>
#29 0x5bf1b597a9f9 <unknown>
#30 0x5bf1b5971011 <unknown>
#31 0x5bf1b293a83f <unknown>
#32 0x7904a9be2736 __libc_start_main
#33 0x5bf1b293a669 <unknown>

It appears that a crash only occurs when "Enables the MultiDevice API" is toggle from disabled to enabled regardless of the state change of other flags. When toggling only that flag from disabled to enabled, the logs read:

[30680:30680:0904/152901.087787:INFO:easy_unlock_service_regular.cc(156)] DeviceSyncClient is not ready yet, delaying UseLoadedRemoteDevices().
[30680:30680:0904/152901.134601:VERBOSE1:component_updater_service.cc(90)] CrxUpdateService starting up. First update attempt will take place in 360 seconds. Next update attempt will take place in 18000 seconds.
[30680:30680:0904/152901.135127:ERROR:component_extension_ime_manager_impl.cc(140)] IME extension file path does not exist: /usr/share/chromeos-assets/input_methods/xkb
[30680:30680:0904/152901.464661:INFO:secure_channel_service.cc(25)] SecureChannelService::OnStart()
[30680:30680:0904/152901.464736:INFO:secure_channel_initializer.cc(64)] SecureChannelInitializer::SecureChannelInitializer(): Fetching Bluetooth adapter. All requests received before the adapter is fetched will be queued.
[30680:30680:0904/152901.464914:INFO:secure_channel_service.cc(38)] SecureChannelService::OnBindInterface() for interface chromeos.secure_channel.mojom.SecureChannel.
[30680:30680:0904/152901.465380:INFO:device_sync_service.cc(30)] DeviceSyncService::OnStart()
[30680:30680:0904/152901.465435:INFO:device_sync_impl.cc(120)] DeviceSyncImpl: Initializing.
[30680:30680:0904/152901.465487:INFO:device_sync_impl.cc(292)] DeviceSyncImpl: Connecting to pref service.
[30680:30680:0904/152901.466752:INFO:device_sync_service.cc(46)] DeviceSyncService::OnBindInterface() from interface chromeos.device_sync.mojom.DeviceSync.
[30680:30680:0904/152901.502729:VERBOSE1:connection_holder.h(390)] Instance arc.mojom.IntentHelperInstance not available.
[30680:30680:0904/152901.581160:VERBOSE1:arc_audio_bridge.cc(110)] HEADPHONE 0 MICROPHONE 0
[30680:30680:0904/152901.581228:VERBOSE1:arc_audio_bridge.cc(139)] Send switch state 0
[30680:30680:0904/152901.792285:INFO:secure_channel_initializer.cc(119)] SecureChannelInitializer::OnBluetoothAdapterReceived(): Bluetooth adapter has been fetched. Passing all queued requests to the service.
[30680:30680:0904/152901.799451:WARNING:device_sync_impl.cc(160)] DeviceSyncImpl::GetLocalDeviceMetadata() invoked before initialization was complete. Cannot return local device metadata.
[30680:30680:0904/152901.799577:WARNING:device_sync_impl.cc(174)] DeviceSyncImpl::GetSyncedDevices() invoked before initialization was complete. Cannot return devices.
[30680:30680:0904/152901.903957:ERROR:content_gpu_interface_provider.cc(83)] Not implemented reached in virtual void ash::ContentGpuInterfaceProvider::RegisterOzoneGpuInterfaces(service_manager::BinderRegistry *)
[30680:30680:0904/152902.065888:WARNING:shelf_button.cc(381)] An icon of size 32x32is being scaled up and will look blurry.
[30680:30680:0904/152902.142568:INFO:device_sync_client_impl.cc(196)] Tried to get local device metadata before service was fully initialized; waiting for enrollment to complete before continuing.
[30680:30680:0904/152902.142662:INFO:device_sync_client_impl.cc(169)] Tried to fetch synced devices before service was fully initialized; waiting for sync to complete before continuing.
[30680:30680:0904/152902.269537:FATAL:shared_pref_registry.cc(71)] Check failed: inserted. Multiple services claimed ownership of pref "cryptauth.enrollment.user_private_key"
#0 0x588f7ac1371c <unknown>
#1 0x588f7ab7114b <unknown>
#2 0x588f791dc21d <unknown>
#3 0x588f791d97bf <unknown>
#4 0x588f78570d59 <unknown>
#5 0x588f791d9466 <unknown>
#6 0x588f7ac98c2d <unknown>
#7 0x588f7acab4f6 <unknown>
#8 0x588f7ac9a1b2 <unknown>
#9 0x588f7aca02dc <unknown>
#10 0x588f7ac9f690 <unknown>
#11 0x588f7acab4f6 <unknown>
#12 0x588f7ac9680b <unknown>
#13 0x588f7ac972c4 <unknown>
#14 0x588f7ac97126 <unknown>
#15 0x588f782205f4 <unknown>
#16 0x588f7acb8623 <unknown>
#17 0x588f7acb8b9e <unknown>
#18 0x588f7ac3816b <unknown>
#19 0x588f7ab7a74e <unknown>
#20 0x588f7ab7ab52 <unknown>
#21 0x588f7ac33f49 <unknown>
#22 0x588f7ab7a221 <unknown>
#23 0x588f7aba35e6 <unknown>
#24 0x588f7a74f5fa <unknown>
#25 0x588f78794bf4 <unknown>
#26 0x588f78797c13 <unknown>
#27 0x588f78790926 <unknown>
#28 0x588f7a73ce2b <unknown>
#29 0x588f7a7449f9 <unknown>
#30 0x588f7a73b011 <unknown>
#31 0x588f7770483f <unknown>
#32 0x7b789ea62736 __libc_start_main
#33 0x588f77704669 <unknown>

On another note, when the flag "Enable unified MultiDevice setup" is enabled, we don't crash but get the error message:

[...:ERROR:service_manager_connection_impl.cc(317)] Can't create service multidevice_setup. No handler found.
Status: Started (was: Assigned)
Labels: -Pri-1 Pri-2
Downgrading priority because this really doesn't need to be merged to M70 at all if you can't run a debug build on M70 anyway.
Here are the stack traces of the duplicate calls to register "cryptauth.enrollment.user_private_key", for instance:

-------------------------------------------------------
First call to CryptAuthEnrollmentManager::RegisterPrefs
-------------------------------------------------------

Thread 1 "chrome" hit Breakpoint 1, cryptauth::CryptAuthEnrollmentManager::RegisterPrefs(PrefRegistrySimple*) ()
    at ../../components/cryptauth/cryptauth_enrollment_manager.cc:22
22      ../../components/cryptauth/cryptauth_enrollment_manager.cc: No such file or directory.
(gdb) bt
#0  cryptauth::CryptAuthEnrollmentManager::RegisterPrefs(PrefRegistrySimple*) ()
    at ../../components/cryptauth/cryptauth_enrollment_manager.cc:22
#1  0x00005d1e8fcc1b8e in KeyedServiceBaseFactory::RegisterPrefsIfNecessaryForContext(base::SupportsUserData*, user_prefs::PrefRegistrySyncable*) () at ../../components/keyed_service/core/keyed_service_base_factory.cc:68
#2  0x00005d1e8fcc363e in DependencyManager::RegisterPrefsForServices(base::SupportsUserData*, user_prefs::PrefRegistrySyncable*) ()
    at ../../components/keyed_service/core/dependency_manager.cc:48
#3  0x00005d1e901e5b3e in BrowserContextDependencyManager::RegisterProfilePrefsForServices(content::BrowserContext*, user_prefs::PrefRegistrySyncable*) () at ../../components/keyed_service/content/browser_context_dependency_manager.cc:27
#4  0x00005d1e8df86592 in ProfileImpl::ProfileImpl(base::FilePath const&, Profile::Delegate*, Profile::CreateMode, scoped_refptr<base::SequencedTaskRunner>) () at ../../chrome/browser/profiles/profile_impl.cc:528
#5  0x00005d1e8df845f7 in Profile::CreateProfile(base::FilePath const&, Profile::Delegate*, Profile::CreateMode) ()
    at ../../chrome/browser/profiles/profile_impl.cc:348
#6  0x00005d1e8ddab1c6 in ProfileManager::CreateProfileAsync(base::FilePath const&, base::RepeatingCallback<void (Profile*, Profile::CreateStatus)> const&, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) ()
    at ../../chrome/browser/profiles/profile_manager.cc:579
#7  0x00005d1e8cc4ed70 in chromeos::UserSessionManager::PrepareProfile() ()
    at ../../chrome/browser/chromeos/login/session/user_session_manager.cc:1132
#8  0x00005d1e8aff1cc4 in base::internal::Invoker<base::internal::BindState<base::internal::IgnoreResultHelper<ui::EventDispatchDetails (aura::WindowEventDispatcher::*)()>, base::WeakPtr<aura::WindowEventDispatcher> >, void ()>::RunOnce(base::internal::BindStateBase*) ()
    at ../../base/bind_internal.h:516
#9  0x00005d1e8ca253dc in arc::UpdateArcFileSystemCompatibilityPrefIfNeeded(AccountId const&, base::FilePath const&, base::OnceCallback<void ()>) () at ../../base/callback.h:99
#10 0x00005d1e8cc4a892 in chromeos::UserSessionManager::UpdateArcFileSystemCompatibilityAndPrepareProfile() ()
    at ../../chrome/browser/chromeos/login/session/user_session_manager.cc:1120
#11 0x00005d1e8aff1cc4 in base::internal::Invoker<base::internal::BindState<base::internal::IgnoreResultHelper<ui::EventDispatchDetails (aura::WindowEventDispatcher::*)()>, base::WeakPtr<aura::WindowEventDispatcher> >, void ()>::RunOnce(base::internal::BindStateBase*) ()
    at ../../base/bind_internal.h:516
#12 0x00005d1e8cc4a7b4 in chromeos::UserSessionManager::InitDemoSessionIfNeeded(base::OnceCallback<void ()>) () at ../../base/callback.h:99
#13 0x00005d1e8cc4a5b5 in chromeos::UserSessionManager::StartSession(chromeos::UserContext const&, chromeos::UserSessionManager::StartSessionType, bool, bool, chromeos::UserSessionManagerDelegate*) () at ../../chrome/browser/chromeos/login/session/user_session_manager.cc:597
#14 0x00005d1e8cc0bc57 in chromeos::ExistingUserController::OnAuthSuccess(chromeos::UserContext const&) ()
    at ../../chrome/browser/chromeos/login/existing_user_controller.cc:949
#15 0x00005d1e8ec17ae1 in chromeos::LoginPerformer::OnAuthSuccess(chromeos::UserContext const&) ()
    at ../../chromeos/login/auth/login_performer.cc:92
#16 0x00005d1e8ec0ec55 in chromeos::CryptohomeAuthenticator::OnAuthSuccess() () at ../../chromeos/login/auth/cryptohome_authenticator.cc:709
#17 0x00005d1e8aff952b in base::internal::Invoker<base::internal::BindState<base::internal::IgnoreResultHelper<bool (content::PlatformNotificationContextImpl::*)()>, scoped_refptr<content::PlatformNotificationContextImpl> >, void ()>::Run(base::internal::BindStateBase*) ()
    at ../../base/bind_internal.h:516
#18 0x00005d1e8e1a139b in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) () at ../../base/callback.h:99
#19 0x00005d1e8e0e343e in base::MessageLoop::RunTask(base::PendingTask*) () at ../../base/message_loop/message_loop.cc:434
#20 0x00005d1e8e0e3842 in base::MessageLoop::DoWork() () at ../../base/message_loop/message_loop.cc:445
#21 0x00005d1e8e19d049 in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) ()
    at ../../base/message_loop/message_pump_libevent.cc:210
#22 0x00005d1e8e0e2f11 in base::MessageLoop::Run(bool) () at ../../base/message_loop/message_loop.cc:386
#23 0x00005d1e8e10c2d6 in base::RunLoop::Run() () at ../../base/run_loop.cc:102
#24 0x00005d1e8dcc2baa in ChromeBrowserMainParts::MainMessageLoopRun(int*) () at ../../chrome/browser/chrome_browser_main.cc:2078
#25 0x00005d1e8bd01654 in content::BrowserMainLoop::RunMainMessageLoopParts() () at ../../content/browser/browser_main_loop.cc:1039
#26 0x00005d1e8bd04673 in content::BrowserMainRunnerImpl::Run() () at ../../content/browser/browser_main_runner_impl.cc:161
#27 0x00005d1e8bcfd386 in content::BrowserMain(content::MainFunctionParams const&) () at ../../content/browser/browser_main.cc:47
#28 0x00005d1e8dcb03db in content::ContentMainRunnerImpl::Run(bool) () at ../../content/app/content_main_runner_impl.cc:537
#29 0x00005d1e8dcb7fa9 in service_manager::Main(service_manager::MainParams const&) ()
    at ../../services/service_manager/embedder/main.cc:472
#30 0x00005d1e8dcae5c1 in content::ContentMain(content::ContentMainParams const&) () at ../../content/app/content_main.cc:19
#31 0x00005d1e8ac7211f in ChromeMain () at ../../chrome/app/chrome_main.cc:102
#32 0x00007d82e78f8736 in __libc_start_main (main=0x5d1e8ac72080 <main>, argc=33, argv=0x7ffcfa396268, init=<optimized out>,
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffcfa396258) at ../csu/libc-start.c:289
#33 0x00005d1e8ac71f49 in _start ()

--------------------------------------------------------
Second call to CryptAuthEnrollmentManager::RegisterPrefs
--------------------------------------------------------

Thread 1 "chrome" hit Breakpoint 1, cryptauth::CryptAuthEnrollmentManager::RegisterPrefs(PrefRegistrySimple*) ()
    at ../../components/cryptauth/cryptauth_enrollment_manager.cc:22
22      in ../../components/cryptauth/cryptauth_enrollment_manager.cc
(gdb) bt
#0  cryptauth::CryptAuthEnrollmentManager::RegisterPrefs(PrefRegistrySimple*) ()
    at ../../components/cryptauth/cryptauth_enrollment_manager.cc:22
#1  0x00005d1e9123aa1b in chromeos::device_sync::DeviceSyncImpl::ConnectToPrefStore() ()
    at ../../chromeos/services/device_sync/device_sync_impl.cc:39
#2  0x00005d1e912386f2 in chromeos::device_sync::DeviceSyncImpl::ProcessPrimaryAccountInfo(AccountInfo const&) ()
    at ../../chromeos/services/device_sync/device_sync_impl.cc:282
#3  0x00005d1e91238678 in chromeos::device_sync::DeviceSyncImpl::DeviceSyncImpl(identity::IdentityManager*, gcm::GCMDriver*, service_manager::Connector*, cryptauth::GcmDeviceInfoProvider const*, scoped_refptr<network::SharedURLLoaderFactory>, base::Clock*, std::__1::unique_ptr<chromeos::device_sync::DeviceSyncImpl::PrefConnectionDelegate, std::__1::default_delete<chromeos::device_sync::DeviceSyncImpl::PrefConnectionDelegate> >) () at ../../chromeos/services/device_sync/device_sync_impl.cc:121
#4  0x00005d1e91238241 in chromeos::device_sync::DeviceSyncImpl::Factory::BuildInstance(identity::IdentityManager*, gcm::GCMDriver*, service_manager::Connector*, cryptauth::GcmDeviceInfoProvider const*, scoped_refptr<network::SharedURLLoaderFactory>) ()
    at ../../chromeos/services/device_sync/device_sync_impl.cc:80
#5  0x00005d1e9123811c in chromeos::device_sync::DeviceSyncImpl::Factory::NewInstance(identity::IdentityManager*, gcm::GCMDriver*, service_manager::Connector*, cryptauth::GcmDeviceInfoProvider const*, scoped_refptr<network::SharedURLLoaderFactory>) ()
    at ../../chromeos/services/device_sync/device_sync_impl.cc:62
#6  0x00005d1e912369b1 in chromeos::device_sync::DeviceSyncService::OnStart() ()
    at ../../chromeos/services/device_sync/device_sync_service.cc:34
#7  0x00005d1e8eb78613 in service_manager::ServiceContext::OnStart(service_manager::Identity const&, base::OnceCallback<void (mojo::InterfaceRequest<service_manager::mojom::Connector>, mojo::AssociatedInterfaceRequest<service_manager::mojom::ServiceControl>)>) ()
    at ../../services/service_manager/public/cpp/service_context.cc:130
#8  0x00005d1e8eb81f18 in service_manager::mojom::ServiceStubDispatch::AcceptWithResponder(service_manager::mojom::Service*, mojo::Message*, std::__1::unique_ptr<mojo::MessageReceiverWithStatus, std::__1::default_delete<mojo::MessageReceiverWithStatus> >) ()
    at gen/services/service_manager/public/mojom/service.mojom.cc:505
#9  0x00005d1e8eb788f6 in service_manager::mojom::ServiceStub<mojo::RawPtrImplRefTraits<service_manager::mojom::Service> >::AcceptWithResponder(mojo::Message*, std::__1::unique_ptr<mojo::MessageReceiverWithStatus, std::__1::default_delete<mojo::MessageReceiverWithStatus> >) ()
    at gen/services/service_manager/public/mojom/service.mojom.h:174
#10 0x00005d1e8e2020ad in mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message*) ()
    at ../../mojo/public/cpp/bindings/lib/interface_endpoint_client.cc:398
#11 0x00005d1e8e214976 in mojo::FilterChain::Accept(mojo::Message*) () at ../../mojo/public/cpp/bindings/lib/filter_chain.cc:40
#12 0x00005d1e8e203632 in mojo::InterfaceEndpointClient::HandleIncomingMessage(mojo::Message*) ()
    at ../../mojo/public/cpp/bindings/lib/interface_endpoint_client.cc:306
#13 0x00005d1e8e20975c in mojo::internal::MultiplexRouter::ProcessIncomingMessage(mojo::internal::MultiplexRouter::MessageWrapper*, mojo::internal::MultiplexRouter::ClientCallBehavior, base::SequencedTaskRunner*) () at ../../mojo/public/cpp/bindings/lib/multiplex_router.cc:869
#14 0x00005d1e8e208b10 in mojo::internal::MultiplexRouter::Accept(mojo::Message*) ()
    at ../../mojo/public/cpp/bindings/lib/multiplex_router.cc:590
#15 0x00005d1e8e214976 in mojo::FilterChain::Accept(mojo::Message*) () at ../../mojo/public/cpp/bindings/lib/filter_chain.cc:40
#16 0x00005d1e8e1ffc8b in mojo::Connector::ReadSingleMessage(unsigned int*) () at ../../mojo/public/cpp/bindings/lib/connector.cc:457
#17 0x00005d1e8e200744 in mojo::Connector::ReadAllAvailableMessages() () at ../../mojo/public/cpp/bindings/lib/connector.cc:486
#18 0x00005d1e8e2005a6 in mojo::Connector::OnHandleReadyInternal(unsigned int) () at ../../mojo/public/cpp/bindings/lib/connector.cc:387
#19 0x00005d1e8b78d824 in mojo::SimpleWatcher::DiscardReadyState(base::RepeatingCallback<void (unsigned int)> const&, unsigned int, mojo::HandleSignalsState const&) () at ../../base/callback.h:129
#20 0x00005d1e8e221aa3 in mojo::SimpleWatcher::OnHandleReady(int, unsigned int, mojo::HandleSignalsState const&) ()
    at ../../base/callback.h:129
#21 0x00005d1e8e22201e in void base::internal::Invoker<base::internal::BindState<void (content::FrameInputHandlerImpl::*)(int, int, std::__1::vector<ui::ImeTextSpan, std::__1::allocator<ui::ImeTextSpan> > const&), base::WeakPtr<content::FrameInputHandlerImpl>, int, int, std::__1::vector<ui::ImeTextSpan, std::__1::allocator<ui::ImeTextSpan> > >, void ()>::RunImpl<void (content::FrameInputHandlerImpl::* const&)(int, int, std::__1::vector<ui::ImeTextSpan, std::__1::allocator<ui::ImeTextSpan> > const&), std::__1::tuple<base::WeakPtr<content::FrameInputHandlerImpl>, int, int, std::__1::vector<ui::ImeTextSpan, std::__1::allocator<ui::ImeTextSpan> > > const&, 0ul, 1ul, 2ul, 3ul>(void (content::FrameInputHandlerImpl::* const&)(int, int, std::__1::vector<ui::ImeTextSpan, std::__1::allocator<ui::ImeTextSpan> > const&), std::__1::tuple<base::WeakPtr<content::FrameInputHandlerImpl>, int, int, std::__1::vector<ui::ImeTextSpan, std::__1::allocator<ui::ImeTextSpan> > > const&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul>) () at ../../base/bind_internal.h:516
#22 0x00005d1e8e1a139b in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) () at ../../base/callback.h:99
#23 0x00005d1e8e0e343e in base::MessageLoop::RunTask(base::PendingTask*) () at ../../base/message_loop/message_loop.cc:434
#24 0x00005d1e8e0e3842 in base::MessageLoop::DoWork() () at ../../base/message_loop/message_loop.cc:445
#25 0x00005d1e8e19d049 in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) ()
    at ../../base/message_loop/message_pump_libevent.cc:210
#26 0x00005d1e8e0e2f11 in base::MessageLoop::Run(bool) () at ../../base/message_loop/message_loop.cc:386
#27 0x00005d1e8e10c2d6 in base::RunLoop::Run() () at ../../base/run_loop.cc:102
#28 0x00005d1e8dcc2baa in ChromeBrowserMainParts::MainMessageLoopRun(int*) () at ../../chrome/browser/chrome_browser_main.cc:2078
#29 0x00005d1e8bd01654 in content::BrowserMainLoop::RunMainMessageLoopParts() () at ../../content/browser/browser_main_loop.cc:1039
#30 0x00005d1e8bd04673 in content::BrowserMainRunnerImpl::Run() () at ../../content/browser/browser_main_runner_impl.cc:161
#31 0x00005d1e8bcfd386 in content::BrowserMain(content::MainFunctionParams const&) () at ../../content/browser/browser_main.cc:47
#32 0x00005d1e8dcb03db in content::ContentMainRunnerImpl::Run(bool) () at ../../content/app/content_main_runner_impl.cc:537
#33 0x00005d1e8dcb7fa9 in service_manager::Main(service_manager::MainParams const&) ()
    at ../../services/service_manager/embedder/main.cc:472
#34 0x00005d1e8dcae5c1 in content::ContentMain(content::ContentMainParams const&) () at ../../content/app/content_main.cc:19
#35 0x00005d1e8ac7211f in ChromeMain () at ../../chrome/app/chrome_main.cc:102
#36 0x00007d82e78f8736 in __libc_start_main (main=0x5d1e8ac72080 <main>, argc=33, argv=0x7ffcfa396268, init=<optimized out>,
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffcfa396258) at ../csu/libc-start.c:289
#37 0x00005d1e8ac71f49 in _start ()

Labels: -M-70 M-71
Project Member

Comment 9 by bugdroid1@chromium.org, Sep 13

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

commit f92d485c8ecb9e56c88b4e7473fae8ee88e96bfa
Author: Josh Nohle <nohle@google.com>
Date: Thu Sep 13 16:22:08 2018

[CrOS MultiDevice] Do not register preferences from ChromeCryptAuthServiceFactory if kMultiDeviceApi is true

When |chromeos::features::kMultiDeviceApi| is true,
ChromeCryptAuthServiceFactory and DeviceSyncService
attempt to register the same preferences. We prevent this
re-registration by immediately returning from
ChromeCryptAuthServiceFactory::RegisterProfilePrefs if
|chromeos::features::kMultiDeviceApi| is true.

Note: ChromeCryptAuthServiceFactory::RegisterProfilePrefs
will be invoked during profile creation if an instance of
ChromeCryptAuthServiceFactory exits.

Bug:  876906 
Change-Id: I0498b5eb14edfd86cbcb93593eb28bef825e1d0d
Tested: Manual test
Reviewed-on: https://chromium-review.googlesource.com/1222271
Reviewed-by: Ryan Hansberry <hansberry@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Josh Nohle <nohle@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591037}
[modify] https://crrev.com/f92d485c8ecb9e56c88b4e7473fae8ee88e96bfa/chrome/browser/chromeos/cryptauth/chrome_cryptauth_service_factory.cc

Status: Fixed (was: Started)

Sign in to add a comment