NightLightController Not Registering Preferences |
|||||
Issue descriptionWhen running the mash_browser_tests suite I am seeing errors that the NightLightController is trying to access a non-registered preference. MultiProfileFileManagerBrowserTest.BasicDownloads was reproducing this locally as well. [0511/133830.178558:FATAL:pref_service.cc(278)] Check failed: false. Trying to read an unregistered pref: prefs.night_light_prefs #0 0x0000028be19c base::debug::StackTrace::StackTrace() #1 0x0000028d79b1 logging::LogMessage::~LogMessage() #2 0x0000035cc6c9 PrefService::GetDictionary() #3 0x00000496c296 ash::NightLightController::InitFromUserPrefs() #4 0x00000494b04f ash::SessionController::SetUserSessionOrder() #5 0x000001c33919 ash::mojom::SessionControllerStubDispatch::Accept() #6 0x0000037511ac mojo::InterfaceEndpointClient::HandleValidatedMessage() #7 0x00000375ec66 mojo::FilterChain::Accept() #8 0x000003751fef mojo::InterfaceEndpointClient::HandleIncomingMessage() #9 0x000003756983 mojo::internal::MultiplexRouter::ProcessIncomingMessage() #10 0x0000037564ee mojo::internal::MultiplexRouter::Accept() #11 0x00000375ec66 mojo::FilterChain::Accept() #12 0x00000374fb10 mojo::Connector::ReadSingleMessage() #13 0x0000037500b6 mojo::Connector::ReadAllAvailableMessages() #14 0x00000374ff7f mojo::Connector::OnHandleReadyInternal() #15 0x00000375ff2b mojo::SimpleWatcher::OnHandleReady() #16 0x00000057706e _ZNO4base8CallbackIFvvELNS_8internal8CopyModeE1ELNS2_10RepeatModeE1EE3RunEv #17 0x0000029758b4 base::debug::TaskAnnotator::RunTask() #18 0x0000028e08c9 base::MessageLoop::RunTask() #19 0x0000028e0b4f base::MessageLoop::DeferOrRunPendingTask() #20 0x0000028e0f3d base::MessageLoop::DoWork() #21 0x0000028e3579 base::MessagePumpLibevent::Run() #22 0x0000028e0652 base::MessageLoop::RunHandler() #23 0x00000290be59 base::RunLoop::Run() #24 0x0000028b125d (anonymous namespace)::StartEmbeddedService() #25 0x0000028b19c0 _ZN4base8internal13FunctorTraitsIPFvN4mojo16InterfaceRequestIN15service_manager5mojom7ServiceEEEEvE6InvokeIJS7_EEEvS9_DpOT_ #26 0x000001557824 service_manager::RunStandaloneService() #27 0x0000028b0fbf RunMashBrowserTests() #28 0x0000028b0e5d main #29 0x7fae0c429f45 __libc_start_main #30 0x00000051ce8f <unknown> Received signal 6 #0 0x0000028be19c base::debug::StackTrace::StackTrace() #1 0x0000028bdd01 base::debug::(anonymous namespace)::StackDumpSignalHandler() #2 0x7fae0fb11330 <unknown> #3 0x7fae0c43ec37 gsignal #4 0x7fae0c442028 abort #5 0x0000028bc9f5 base::debug::BreakDebugger() #6 0x0000028d7d77 logging::LogMessage::~LogMessage() #7 0x0000035cc6c9 PrefService::GetDictionary() #8 0x00000496c296 ash::NightLightController::InitFromUserPrefs() #9 0x00000494b04f ash::SessionController::SetUserSessionOrder() #10 0x000001c33919 ash::mojom::SessionControllerStubDispatch::Accept() #11 0x0000037511ac mojo::InterfaceEndpointClient::HandleValidatedMessage() #12 0x00000375ec66 mojo::FilterChain::Accept() #13 0x000003751fef mojo::InterfaceEndpointClient::HandleIncomingMessage() #14 0x000003756983 mojo::internal::MultiplexRouter::ProcessIncomingMessage() #15 0x0000037564ee mojo::internal::MultiplexRouter::Accept() #16 0x00000375ec66 mojo::FilterChain::Accept() #17 0x00000374fb10 mojo::Connector::ReadSingleMessage() #18 0x0000037500b6 mojo::Connector::ReadAllAvailableMessages() #19 0x00000374ff7f mojo::Connector::OnHandleReadyInternal() #20 0x00000375ff2b mojo::SimpleWatcher::OnHandleReady() #21 0x00000057706e _ZNO4base8CallbackIFvvELNS_8internal8CopyModeE1ELNS2_10RepeatModeE1EE3RunEv #22 0x0000029758b4 base::debug::TaskAnnotator::RunTask() #23 0x0000028e08c9 base::MessageLoop::RunTask() #24 0x0000028e0b4f base::MessageLoop::DeferOrRunPendingTask() #25 0x0000028e0f3d base::MessageLoop::DoWork() #26 0x0000028e3579 base::MessagePumpLibevent::Run() #27 0x0000028e0652 base::MessageLoop::RunHandler() #28 0x00000290be59 base::RunLoop::Run() #29 0x0000028b125d (anonymous namespace)::StartEmbeddedService() #30 0x0000028b19c0 _ZN4base8internal13FunctorTraitsIPFvN4mojo16InterfaceRequestIN15service_manager5mojom7ServiceEEEEvE6InvokeIJS7_EEEvS9_DpOT_ #31 0x000001557824 service_manager::RunStandaloneService() #32 0x0000028b0fbf RunMashBrowserTests() #33 0x0000028b0e5d main #34 0x7fae0c429f45 __libc_start_main #35 0x00000051ce8f <unknown> r8: ffffb10d9e40a348 r9: ffffb10d9e40a338 r10: 0000000000000008 r11: 0000000000000202 r12: 00007fae0cce8940 r13: 00007ffe9e77e990 r14: 0000000000000081 r15: 00007ffe9e77e988 di: 000000000000223d si: 000000000000223d bp: 00007ffe9e77e4e0 bx: 00007ffe9e77e4f0 dx: 0000000000000006 ax: 0000000000000000 cx: ffffffffffffffff sp: 00007ffe9e77e3a8 ip: 00007fae0c43ec37 efl: 0000000000000202 cgf: 0000000000000033 erf: 0000000000000000 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000 [end of stack trace] Example log from trybot run: https://chromium-swarm.appspot.com/task?id=3612067c40c48e10&refresh=10&show_raw=1
,
May 12 2017
I would expect that the RegisterPrefs code is being ran. I have not looked into this to see if there is a race in the request of the preferences service vs the registering of prefs for the local state.
,
May 12 2017
+erg erg@, do you know whether mojo:preferences service would send down the registered prefs in chrome to ash? Or it just sent over the ones that is registered in ash when connecting to mojo:preferences? We might not have the wrong expectation of how preferences service works on mash. :p
,
May 12 2017
+sammac who knows more about the preference service than i do
,
May 14 2017
Each pref service client needs to register the prefs they want to use. For mash, this means the PrefRegistry passed to prefs::ConnectToPrefService() at https://cs.chromium.org/chromium/src/ash/shell.cc?type=cs&l=810&rcl=e4fae85260876af2c08495ccf33b6c3051db1730. Passing that PrefRegistry to Shell::RegisterPrefs() first should do what you need.
,
May 15 2017
,
May 15 2017
Re#5. Thanks. I will handle this.
,
May 16 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/606424bd7f6b579fdc99e1d230911b68147ecb31 commit 606424bd7f6b579fdc99e1d230911b68147ecb31 Author: afakhry <afakhry@chromium.org> Date: Tue May 16 17:08:16 2017 Regsiter Ash prefs in mash In classic ash, Chrome will invoke registering Ash prefs to the asctive user's pref service, but in mash, Ash (as a pref service client) must do that itself before connecting to the pref service. BUG= 721751 Review-Url: https://codereview.chromium.org/2879243003 Cr-Commit-Position: refs/heads/master@{#472137} [modify] https://crrev.com/606424bd7f6b579fdc99e1d230911b68147ecb31/ash/shell.cc
,
May 16 2017
,
Feb 26 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by afakhry@chromium.org
, May 12 2017