New issue
Advanced search Search tips

Issue 879968 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 4
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

account_tracker_service.cc(574)] Check failed: GetMigrationState() == MIGRATION_ NOT_STARTED (2 vs. 0)

Project Member Reported by alancutter@chromium.org, Sep 3

Issue description

Chrome Version: 68676363b65f39923295e980c8ebbbfe217764ef
OS: Linux Chrome OS

What steps will reproduce the problem?
(1) Have this ~/.config/chromium profile: https://drive.google.com/open?id=1ZOxU0KWGJg-OOjVnGhZnx_2R7shv19Ob
(2) Open Chrome OS Linux build

What is the expected result?

Chrome OS opens

What happens instead?

[29287:29287:0903/151400.218900:FATAL:account_tracker_service.cc(574)] Check failed: GetMigrationState() == MIGRATION_
NOT_STARTED (2 vs. 0)
#0 0x7f70e446adac base::debug::StackTrace::StackTrace()
#1 0x7f70e43a061b logging::LogMessage::~LogMessage()
#2 0x5584761609f4 AccountTrackerService::LoadFromPrefs()
#3 0x55847615fcf9 AccountTrackerService::Initialize()
#4 0x558475c363c4 AccountTrackerServiceFactory::BuildServiceInstanceFor()
#5 0x7f70de7f7415 BrowserContextKeyedServiceFactory::BuildServiceInstanceFor()
#6 0x7f70df421f85 KeyedServiceFactory::GetServiceForContext()
#7 0x558475c38b5a ProfileOAuth2TokenServiceFactory::BuildServiceInstanceFor()
#8 0x7f70de7f7415 BrowserContextKeyedServiceFactory::BuildServiceInstanceFor()
#9 0x7f70df421f85 KeyedServiceFactory::GetServiceForContext()
#10 0x558475c3894e ProfileOAuth2TokenServiceFactory::GetForProfile()
#11 0x558475c382d1 GaiaCookieManagerServiceFactory::BuildServiceInstanceFor()
#12 0x7f70de7f7415 BrowserContextKeyedServiceFactory::BuildServiceInstanceFor()
#13 0x7f70df421f85 KeyedServiceFactory::GetServiceForContext()
#14 0x558475c35d1b AccountInvestigatorFactory::BuildServiceInstanceFor()
#15 0x7f70de7f7415 BrowserContextKeyedServiceFactory::BuildServiceInstanceFor()
#16 0x7f70df421f85 KeyedServiceFactory::GetServiceForContext()
#17 0x7f70df4210d9 DependencyManager::CreateContextServices()
#18 0x7f70de7f6782 BrowserContextDependencyManager::DoCreateBrowserContextServices()
#19 0x558475de1a34 ProfileImpl::OnLocaleReady()
#20 0x558475ddec9a ProfileImpl::OnPrefsLoaded()
#21 0x558475dde9bd ProfileImpl::ProfileImpl()
#22 0x558475ddc6cb Profile::CreateProfile()
#23 0x558475c22825 ProfileManager::CreateProfileHelper()
#24 0x558475c1c6e8 ProfileManager::CreateAndInitializeProfile()
#25 0x558475c1c42c ProfileManager::GetProfile()
#26 0x558475c1c368 ProfileManager::CreateInitialProfile()
#27 0x558475b41b3f ChromeBrowserMainParts::PreMainMessageLoopRunImpl()
#28 0x558475b410ba ChromeBrowserMainParts::PreMainMessageLoopRun()
#29 0x5584756d9318 chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun()
#30 0x7f70e1452371 content::BrowserMainLoop::PreMainMessageLoopRun()
#31 0x7f70e19239d5 content::StartupTaskRunner::RunAllTasksNow()
#32 0x7f70e1450aae content::BrowserMainLoop::CreateStartupTasks()
#33 0x7f70e1454c73 content::BrowserMainRunnerImpl::Initialize()
#34 0x7f70e144e642 content::BrowserMain()
#35 0x7f70e1ec850f content::ContentMainRunnerImpl::Run()
#36 0x7f70e472a005 service_manager::Main()
#37 0x7f70e1ec69a4 content::ContentMain()
#38 0x558474f2cc83 ChromeMain
#39 0x7f70d55952b1 __libc_start_main
#40 0x558474f2cafa _start

 
Labels: FoundIn-71
Cc: droger@chromium.org msarda@chromium.org
Status: Started (was: Untriaged)
Hum, downloading the profile and looking in the preferences, I see:

{
  "account_id_migration_state":2,
  "account_info":[{
    "account_id":"stub-user@example.com",
    "email":"stub-user@example.com",
    "full_name":"",
    "gaia":"stub-user@example.com",  
    "given_name":"",
    "hd":"",
    "is_child_account":false,
    "is_under_advanced_protection":false,
    "locale":"",
    "picture_url":""}],
  ...

Grepping for "stub-user@example.com", this is a user id that should only be used by tests. This is also the email used by FixedAccountManager for the account with id kStubUserId. The comment for kStubUserId reads:

  // Stub Gaia user id. For tests and CrOS on Linux dev build only.
  USER_MANAGER_EXPORT extern const char kStubUserId[];

So, I think that it may be possible to share a profile between Linux and CrOS on Linux dev build. In that case, when running the Linux build the migration will be marked as MIGRATION_DONE, and then when loading the profile under CrOS on Linux, the DCHECK will fire.

If this is the case, then the DCHECK should probably be removed and changed to SetMigrationState(MIGRATION_NOT_STARTED) so that CrOS code on Linux does not use code path that are not used by CrOS on real hardware.
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 3

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

commit 95a5632f65689e2923928a539ea8db2a8830b418
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Mon Sep 03 15:24:24 2018

Fix sharing preference between Linux and ChromeOS on Linux

Build of ChromeOS running on Linux may share preference with
the Linux build of Chrome. Ensure that the migration state is
set to MIGRATION_NOT_STARTED on ChromeOS.

Bug:  879968 
Change-Id: Ifff879198a51555c6a88c5c2a5712160745c64f6
Reviewed-on: https://chromium-review.googlesource.com/1202103
Reviewed-by: David Roger <droger@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588400}
[modify] https://crrev.com/95a5632f65689e2923928a539ea8db2a8830b418/components/signin/core/browser/account_tracker_service.cc

Ty for the fast turnaround.
Status: Fixed (was: Started)

Sign in to add a comment