New issue
Advanced search Search tips

Issue 666759 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

ProfileHelper::GetProfileByUserUnsafe being called too early from CastConfigDelegateMediaRouter

Project Member Reported by emaxx@chromium.org, Nov 18 2016

Issue description

When running a local chromeos=1 ToT build, the following log error appears after logging into a Public Session:

[ERROR:profile_helper.cc(316)] ProfileHelper::GetProfileByUserUnsafe is called when |user|'s profile is not created. It probably means
 that something is wrong with a calling code. Please report in http://crbug.com/361528 if you see this message.

Adding stack trace dumping reveals the following stack trace:
#0 0x7f090215d8ce base::debug::StackTrace::StackTrace()
#1 0x7f090420b7c2 chromeos::ProfileHelper::GetProfileByUserUnsafe()
#2 0x7f0904ec1a79 ProfileManager::GetPrimaryUserProfile()
#3 0x7f09082138ee (anonymous namespace)::GetMediaRouter()
#4 0x7f0908213f10 CastConfigDelegateMediaRouter::devices()
#5 0x7f0908213f9f CastConfigDelegateMediaRouter::RequestDeviceRefresh()
#6 0x7f0908214814 CastConfigDelegateMediaRouter::Observe()
#7 0x7f08fc24e350 content::NotificationServiceImpl::Notify()
#8 0x7f0903fc0c22 chromeos::UserSessionManager::FinalizePrepareProfile()
#9 0x7f0903fc074d chromeos::UserSessionManager::UserProfileInitialized()
#10 0x7f0903fbfe14 chromeos::UserSessionManager::OnProfileCreated()
#11 0x7f0903fca1d4 _ZN4base8internal13FunctorTraitsIMN8chromeos18UserSessionManagerEFvRKNS2_11UserContextEbP7ProfileNS7_12CreateStatusEEvE6InvokeIRKNS_7WeakPt
rIS3_EEJS6_RKbS8_S9_EEEvSB_OT_DpOT0_
#12 0x7f0903fca092 _ZN4base8internal12InvokeHelperILb1EvE8MakeItSoIRKMN8chromeos18UserSessionManagerEFvRKNS4_11UserContextEbP7ProfileNS9_12CreateStatusEERKNS_
7WeakPtrIS5_EEJS8_RKbSA_SB_EEEvOT_OT0_DpOT1_
#13 0x7f0903fc9fbe _ZN4base8internal7InvokerINS0_9BindStateIMN8chromeos18UserSessionManagerEFvRKNS3_11UserContextEbP7ProfileNS8_12CreateStatusEEJNS_7WeakPtrIS
4_EES5_bEEEFvS9_SA_EE7RunImplIRKSC_RKSt5tupleIJSE_S5_bEEJLm0ELm1ELm2EEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EEEEOS9_OSA_
#14 0x7f0903fc9e6e _ZN4base8internal7InvokerINS0_9BindStateIMN8chromeos18UserSessionManagerEFvRKNS3_11UserContextEbP7ProfileNS8_12CreateStatusEEJNS_7WeakPtrIS
4_EES5_bEEEFvS9_SA_EE3RunEPNS0_13BindStateBaseEOS9_OSA_
#15 0x7f0903490afa base::internal::RunMixin<>::Run()
#16 0x7f0904ec7e3c ProfileManager::RunCallbacks()
#17 0x7f0904ec7d3f ProfileManager::OnProfileCreated()
#18 0x7f090549600a ProfileImpl::DoFinalInit()
#19 0x7f0905497d7f ProfileImpl::OnLocaleReady()
#20 0x7f09031c0e65 _ZN4base8internal13FunctorTraitsIMN18OAuth2TokenService7FetcherEFvvEvE6InvokeIPS3_JEEEvS5_OT_DpOT0_
#21 0x7f09031c0d81 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMN18OAuth2TokenService7FetcherEFvvEJPS5_EEEvOT_DpOT0_
#22 0x7f090549c027 _ZN4base8internal7InvokerINS0_9BindStateIM11ProfileImplFvvEJNS0_17UnretainedWrapperIS3_EEEEEFvvEE7RunImplIRKS5_RKSt5tupleIJS7_EEJLm0EEEEvOT
_OT0_NS_13IndexSequenceIJXspT1_EEEE
#23 0x7f090549bf6c _ZN4base8internal7InvokerINS0_9BindStateIM11ProfileImplFvvEJNS0_17UnretainedWrapperIS3_EEEEEFvvEE3RunEPNS0_13BindStateBaseE
#24 0x7f09031e942b base::internal::RunMixin<>::Run()
#25 0x7f0903fc27c0 chromeos::UserSessionManager::RunCallbackOnLocaleLoaded()
#26 0x7f0903fd1297 _ZN4base8internal13FunctorTraitsIPFvRKNS_8CallbackIFvvELNS0_8CopyModeE1ELNS0_10RepeatModeE1EEEPN8chromeos18InputEventsBlockerERK[461/46667]
e_util20LanguageSwitchResultEEvE6InvokeIJS8_SB_SF_EEEvSH_DpOT_
#27 0x7f0903fd11f2 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKPFvRKNS_8CallbackIFvvELNS0_8CopyModeE1ELNS0_10RepeatModeE1EEEPN8chromeos18InputEventsBloc
kerERKNSB_11locale_util20LanguageSwitchResultEEJSA_SD_SH_EEEvOT_DpOT0_
#28 0x7f0903fd1188 _ZN4base8internal7InvokerINS0_9BindStateIPFvRKNS_8CallbackIFvvELNS0_8CopyModeE1ELNS0_10RepeatModeE1EEEPN8chromeos18InputEventsBlockerERKNSA
_11locale_util20LanguageSwitchResultEEJS7_NS0_12OwnedWrapperISB_EEEEEFvSG_EE7RunImplIRKSI_RKSt5tupleIJS7_SK_EEJLm0ELm1EEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EE
EESG_
#29 0x7f0903fd108c _ZN4base8internal7InvokerINS0_9BindStateIPFvRKNS_8CallbackIFvvELNS0_8CopyModeE1ELNS0_10RepeatModeE1EEEPN8chromeos18InputEventsBlockerERKNSA
_11locale_util20LanguageSwitchResultEEJS7_NS0_12OwnedWrapperISB_EEEEEFvSG_EE3RunEPNS0_13BindStateBaseESG_
#30 0x7f09031eeee6 base::internal::RunMixin<>::Run()
#31 0x7f0903cf29f3 chromeos::(anonymous namespace)::FinishSwitchLanguage()
#32 0x7f0903cf3ac7 _ZN4base8internal13FunctorTraitsIPFvSt10unique_ptrIN8chromeos12_GLOBAL__N_118SwitchLanguageDataESt14default_deleteIS5_EEEvE6InvokeIJS8_EEEv
SA_DpOT_
#33 0x7f0903cf3a08 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKPFvSt10unique_ptrIN8chromeos12_GLOBAL__N_118SwitchLanguageDataESt14default_deleteIS7_EEEJ
SA_EEEvOT_DpOT0_
#34 0x7f0903cf39b7 _ZN4base8internal7InvokerINS0_9BindStateIPFvSt10unique_ptrIN8chromeos12_GLOBAL__N_118SwitchLanguageDataESt14default_deleteIS6_EEEJNS0_13Pas
sedWrapperIS9_EEEEEFvvEE7RunImplIRKSB_RKSt5tupleIJSD_EEJLm0EEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
#35 0x7f0903cf38fc _ZN4base8internal7InvokerINS0_9BindStateIPFvSt10unique_ptrIN8chromeos12_GLOBAL__N_118SwitchLanguageDataESt14default_deleteIS6_EEEJNS0_13Pas
sedWrapperIS9_EEEEEFvvEE3RunEPNS0_13BindStateBaseE
#36 0x7f090212c15b base::internal::RunMixin<>::Run()
#37 0x7f090230f2df base::(anonymous namespace)::PostTaskAndReplyRelay::RunReplyAndSelfDestruct()
#38 0x7f090230f6f5 _ZN4base8internal13FunctorTraitsIMNS_12_GLOBAL__N_121PostTaskAndReplyRelayEFvvEvE6InvokeIPS3_JEEEvS5_OT_DpOT0_
#39 0x7f090230f5f1 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMNS_12_GLOBAL__N_121PostTaskAndReplyRelayEFvvEJPS5_EEEvOT_DpOT0_
#40 0x7f090230f597 _ZN4base8internal7InvokerINS0_9BindStateIMNS_12_GLOBAL__N_121PostTaskAndReplyRelayEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIRKS6_
RKSt5tupleIJS8_EEJLm0EEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
#41 0x7f090230f4dc _ZN4base8internal7InvokerINS0_9BindStateIMNS_12_GLOBAL__N_121PostTaskAndReplyRelayEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE3RunEPNS0_13Bi
ndStateBaseE
#42 0x7f0902162e71 _ZNO4base8internal8RunMixinINS_8CallbackIFvvELNS0_8CopyModeE0ELNS0_10RepeatModeE0EEEE3RunEv
#43 0x7f0902162864 base::debug::TaskAnnotator::RunTask()
#44 0x7f09021eb95f base::MessageLoop::RunTask()
#45 0x7f09021ebbc4 base::MessageLoop::DeferOrRunPendingTask()
#46 0x7f09021ebeae base::MessageLoop::DoWork()
#47 0x7f0902201526 base::MessagePumpGlib::Run()                                                                                                    #48 0x7f09021eb525 base::MessageLoop::RunHandler()
#49 0x7f0902288604 base::RunLoop::Run()
#50 0x7f0904cc1db7 ChromeBrowserMainParts::MainMessageLoopRun()
#51 0x7f08fbbf22b6 content::BrowserMainLoop::RunMainMessageLoopParts()
#52 0x7f08fbbfdb85 content::BrowserMainRunnerImpl::Run()
#53 0x7f08fbbec198 content::BrowserMain()
#54 0x7f08fd22c706 content::RunNamedProcessTypeMain()
#55 0x7f08fd22e935 content::ContentMainRunnerImpl::Run()
#56 0x7f08fd22bad2 content::ContentMain()
#57 0x7f0903161b51 ChromeMain
#58 0x7f0903161a72 main
#59 0x7f08ebdaff45 __libc_start_main
#60 0x7f0903161975 <unknown>


So this is getting called from the GetMediaRouter function, which is itself called by the CastConfigDelegateMediaRouter methods.


Jacob, assigning to you as, according to git blame, you seem to be actively working with the mentioned code (CastConfigDelegateMediaRouter et al.).
 
Status: Started (was: Untriaged)
Thanks, I'll take a look.
Labels: -Pri-2 M-56 Pri-1
Labels: -M-56
Status: Assigned (was: Started)

Sign in to add a comment