Issue metadata
Sign in to add a comment
|
DCHECK fail on startup (ToT): AccountReconciler |
||||||||||||||||||||||
Issue descriptionChrome Version: r502998 OS: Linux Crash ID: N/A [18102:18102:0920/103659.623472:FATAL:account_reconcilor.cc(446)] Check failed: first_account.empty() || (std::find(chrome_accounts_.begin(), chrome_accounts_.end(), first_account) != chrome_accounts_.end()). #0 0x7faf27a7b787 base::debug::StackTrace::StackTrace() #1 0x7faf27aa2ad1 logging::LogMessage::~LogMessage() #2 0x003add11df59 <unknown> #3 0x003add11dc8a <unknown> #4 0x003add128e9e <unknown> #5 0x003adc6bc5c1 <unknown> #6 0x003adc6bc1be <unknown> #7 0x7faf268d1b4f net::URLFetcherCore::OnCompletedURLRequest() #8 0x7faf27a7bfd7 base::debug::TaskAnnotator::RunTask() #9 0x7faf27aacb20 base::internal::IncomingTaskQueue::RunTask() #10 0x7faf27aaefb7 base::MessageLoop::RunTask() #11 0x7faf27aaf71a base::MessageLoop::DoWork() #12 0x7faf27ab15e9 base::MessagePumpGlib::Run() #13 0x7faf27aaea5a base::MessageLoop::Run() #14 0x7faf27ae2a26 base::RunLoop::Run() #15 0x003adcd82c8e <unknown> #16 0x7faf24dbda82 content::BrowserMainLoop::RunMainMessageLoopParts() #17 0x7faf24dc08fb content::BrowserMainRunnerImpl::Run() #18 0x7faf24db8d68 content::BrowserMain() #19 0x7faf256857cf content::RunNamedProcessTypeMain() #20 0x7faf25686267 content::ContentMainRunnerImpl::Run() #21 0x7faf27fb7290 service_manager::Main() #22 0x7faf25684b92 content::ContentMain() #23 0x003adc67e27c <unknown> #24 0x7faf1af85f45 __libc_start_main #25 0x003adc67e0cf <unknown> Received signal 6 #0 0x7faf27a7b787 base::debug::StackTrace::StackTrace() #1 0x7faf27a7b25f base::debug::(anonymous namespace)::StackDumpSignalHandler() #2 0x7faf27c00330 <unknown> #3 0x7faf1af9ac37 gsignal #4 0x7faf1af9e028 abort #5 0x7faf27a79372 base::debug::BreakDebugger() #6 0x7faf27aa2fa4 logging::LogMessage::~LogMessage() #7 0x003add11df59 <unknown> #8 0x003add11dc8a <unknown> #9 0x003add128e9e <unknown> #10 0x003adc6bc5c1 <unknown> #11 0x003adc6bc1be <unknown> #12 0x7faf268d1b4f net::URLFetcherCore::OnCompletedURLRequest() #13 0x7faf27a7bfd7 base::debug::TaskAnnotator::RunTask() #14 0x7faf27aacb20 base::internal::IncomingTaskQueue::RunTask() #15 0x7faf27aaefb7 base::MessageLoop::RunTask() #16 0x7faf27aaf71a base::MessageLoop::DoWork() #17 0x7faf27ab15e9 base::MessagePumpGlib::Run() #18 0x7faf27aaea5a base::MessageLoop::Run() #19 0x7faf27ae2a26 base::RunLoop::Run() #20 0x003adcd82c8e <unknown> #21 0x7faf24dbda82 content::BrowserMainLoop::RunMainMessageLoopParts() #22 0x7faf24dc08fb content::BrowserMainRunnerImpl::Run() #23 0x7faf24db8d68 content::BrowserMain() #24 0x7faf256857cf content::RunNamedProcessTypeMain() #25 0x7faf25686267 content::ContentMainRunnerImpl::Run() #26 0x7faf27fb7290 service_manager::Main() #27 0x7faf25684b92 content::ContentMain() #28 0x003adc67e27c <unknown> #29 0x7faf1af85f45 __libc_start_main #30 0x003adc67e0cf <unknown> r8: ffffa27bf6a8bc40 r9: ffffa27bf6a8bc30 r10: 0000000000000008 r11: 0000000000000202 r12: 00007ffe29951728 r13: 00000000000000d1 r14: 00007ffe29951720 r15: 00007ffe29951718 di: 00000000000046b6 si: 00000000000046b6 bp: 00007ffe299511e0 bx: 00007ffe299511e0 dx: 0000000000000006 ax: 0000000000000000 cx: 00007faf1af9ac37 sp: 00007ffe29951038 ip: 00007faf1af9ac37 efl: 0000000000000202 cgf: 0000000000000033 erf: 0000000000000000 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000 [end of stack trace] Calling _exit(1). Core file will not be generated.
,
Sep 20 2017
Ah, the check fail is happening when I try to open the stub-user account that's created by tests (therefore, I'm not sure how this is passing browser tests). Background: When I run browser_tests locally (at least, I think it's browser_tests but... some tests for sure), it creates a new user in /usr/local/google/home/mgiuca/.config/chromium/test-user, and sets that user as the current user. When I later run Chromium normally, I'm signed in as test-user. (This user name is "stub-user@example.com" and probably has some fake GAIA credentials which is why it's hitting this check.) Eventually, I stopped bothering to switch back from stub-user and just started using stub-user as my main testing profile. This now crashes on startup. My other users don't. So, maybe this isn't a thing any more (perhaps stub-user is left over from an old time and isn't being created any more). Still, it's not good if an old user profile can cause a DCHECK on startup. I'll leave it to you to investigate, or WontFix, depending on how severe you think this is.
,
Sep 25 2017
#2 Correction: stub-user isn't created by browser_tests. It's created by running a Chrome OS build. So the steps to reproduce are: 1. Make a regular Linux build. 2. Make a build with target_os = "chromeos". 3. Run the Chrome OS build. This changes the currently selected user to stub-user@example.com. 4. Run the regular build. This crashes on startup. The work-around is to always run your Chrome OS build in a separate --user-data-dir so that it doesn't switch the currently selected user in your main data dir. But it's much easier if you regularly develop Chrome OS and Chrome to just always test using the stub-user profile. Now that is not possible. (Also if I ever use Chrome OS without --user-data-dir, as I have just done, I brick my user data dir unless I can go in and manually change the preference, and I can't find an easy way to do this. Also I can't share test data between the two accounts.)
,
Sep 25 2017
I will look into this. I'm not sure I understand all the steps (basically you're using a ChromeOS specific account on a linux client?), and for sure I've never done ChromeOS builds, but hopefully I will manage to fix this anyway.
,
Sep 25 2017
I'm doing a Chrome OS build on Linux which basically builds a "fake" version of Chrome OS for development and testing. It's a bit dodgy (i.e., it creates this strange user account) and it's not something users would normally see. But it's pretty much the normal way we do CrOS development so it's kind of an important developer use case. Yes, I am doing something a bit dodgy, using the account created for CrOS with my normal Linux Chromium build, but it's worked fine for 4 years up until the above CL. Commenting out the DCHECK makes it work fine as far as I can tell, so perhaps the DCHECK could be made a bit more generous or something.
,
Sep 25 2017
#4 to elaborate a bit on the steps to build Chrome OS:
1. Make a new out directory ("gn gen out/cros"). # call this whatever you like
2. cp out/Default/args.gn out/cros # copy across your normal args file.
3. gn args out/cros
4. Add to this file: target_os = "chromeos", and save.
5. Build the "chrome" target in that out directory, and then run out/cros/chrome.
Thanks for looking into it!
,
Sep 25 2017
I could repro the bug with these steps: - sign in to Chrome - quit Chrome - delete the token from the token_service table in the Web Data database - start Chrome
,
Sep 25 2017
CC msarda: it seems that when the token for the main account is missing, Chrome does not actually detect it.
,
Sep 25 2017
Looks likes this happens because FireRefreshTokensLoaded() is called before setting the INVALID_GAIA_CREDENTIALS error. In MutableProfileOAuth2TokenServiceDelegate::OnWebDataServiceRequestDone(): https://cs.chromium.org/chromium/src/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.cc?rcl=533744aa7772db7ede651fc9639d9598b3ee7420&l=342 I don't know if this is a bug or not, but this is clearly against the assumption that is made in the account reconcilor.
,
Sep 25 2017
Heads-up: Running try jobs on tentative fix: https://chromium-review.googlesource.com/c/chromium/src/+/681434
,
Sep 25 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0b9b8961b6c24ddc8ca6f733a586415b98db9e9e commit 0b9b8961b6c24ddc8ca6f733a586415b98db9e9e Author: David Roger <droger@chromium.org> Date: Mon Sep 25 12:28:04 2017 [signin] Call FireRefreshTokensLoaded after initializing the main token In MutableProfileOAuth2TokenServiceDelegate::OnWebDataServiceRequestDone FireRefreshTokensLoaded() was called before the token for the Sync account is fully initialized. In particular, when the token is missing, a placeholder token with a INVALID_GAIA_CREDENTIALS error is inserted in the token service as part of the loading flow. FireRefreshTokensLoaded() should be called after this is done. Failing to do this violates the assumption that the Sync account must have a (possibly invalid) token at all times. Bug: 766901 Change-Id: I9f30b7bf2feef3376fc8e30095a1ae9e041d73b1 Reviewed-on: https://chromium-review.googlesource.com/681434 Reviewed-by: Mihai Sardarescu <msarda@chromium.org> Commit-Queue: David Roger <droger@chromium.org> Cr-Commit-Position: refs/heads/master@{#504031} [modify] https://crrev.com/0b9b8961b6c24ddc8ca6f733a586415b98db9e9e/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.cc
,
Sep 25 2017
Please reopen if you can still repro.
,
Sep 26 2017
It's fixed for me! Thanks!
,
Sep 26 2017
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by mgiuca@chromium.org
, Sep 20 2017Owner: droger@chromium.org
Status: Assigned (was: Available)