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

Issue 663547 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

"SingleClientSessionsSyncTest.CookieJarMismatch" is flaky

Project Member Reported by chromium...@appspot.gserviceaccount.com, Nov 8 2016

Issue description

"SingleClientSessionsSyncTest.CookieJarMismatch" is flaky.

This issue was created automatically by the chromium-try-flakes app. Please find the right owner to fix the respective test/step and assign this issue to them. If the step/test is infrastructure-related, please add Infra-Troopers label and change issue status to Untriaged. When done, please remove the issue from Sheriff Bug Queue by removing the Sheriff-Chromium label.

We have detected 5 recent flakes. List of all flakes can be found at https://chromium-try-flakes.appspot.com/all_flake_occurrences?key=ahVzfmNocm9taXVtLXRyeS1mbGFrZXNyOQsSBUZsYWtlIi5TaW5nbGVDbGllbnRTZXNzaW9uc1N5bmNUZXN0LkNvb2tpZUphck1pc21hdGNoDA.

Flaky tests should be disabled within 30 minutes unless culprit CL is found and reverted. Please see more details here: https://sites.google.com/a/chromium.org/dev/developers/tree-sheriffs/sheriffing-bug-queues#triaging-auto-filed-flakiness-bugs

This flaky test/step was previously tracked in  issue 603794 .
 
Cc: zea@chromium.org s...@chromium.org
Components: Services>Sync
e.g. https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/328057/steps/sync_integration_tests%20%28with%20patch%29%20on%20Windows-7-SP1/logs/SingleClientSessionsSyncTest.CookieJarMismatch
"""
[ RUN      ] SingleClientSessionsSyncTest.CookieJarMismatch
[4248:2964:1108/150931:INFO:media_foundation_video_encode_accelerator_win.cc(290)] Windows versions earlier than 8 are not supported.
[4428:4504:1108/150931:ERROR:child_account_info_fetcher_impl.cc(144)] ChildAccountInfoFetcherImpl::OnGetUserInfoSuccess: GetUserInfo response didn't include allServices field.
[4428:3524:1108/150931:WARNING:server_connection_manager.cc(269)] ServerConnectionManager forcing SYNC_AUTH_ERROR
[4428:3524:1108/150931:WARNING:syncer_proto_util.cc(338)] Error posting from syncer: Response Code (bogus on error): -1 Content-Length (bogus on error): -1 Server Status: SYNC_AUTH_ERROR
[4428:3524:1108/150931:WARNING:sync_encryption_handler_impl.cc(971)] Nigori had empty encryption keybag.
[4428:3524:1108/150931:WARNING:sync_encryption_handler_impl.cc(971)] Nigori had empty encryption keybag.
[4428:3524:1108/150931:WARNING:sync_encryption_handler_impl.cc(347)] Ignoring new implicit passphrase. Keystore migration already performed.
e:\c\win\src\chromerowser\sync	est\integration\single_client_sessions_sync_test.cc(170): error: Value of: message.commit().config_params().cookie_jar_mismatch()
  Actual: false
Expected: true
[4428:4504:1108/150934:WARNING:url_request_context_getter.cc(43)] URLRequestContextGetter leaking due to no owning thread.
[4428:4504:1108/150934:WARNING:url_request_context_getter.cc(43)] URLRequestContextGetter leaking due to no owning thread.
[4428:4504:1108/150934:WARNING:url_request_context_getter.cc(43)] URLRequestContextGetter leaking due to no owning thread.
[  FAILED  ] SingleClientSessionsSyncTest.CookieJarMismatch, where TypeParam =  and GetParam() =  (3084 ms)
"""
Owner: scheib@chromium.org
Status: Started (was: Untriaged)
https://codereview.chromium.org/2489513004/

Comment 3 by zea@chromium.org, Nov 9 2016

Cc: pnoland@chromium.org
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 9 2016

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

commit d89c55240ff7c736536efb3d419a904f7fdab0f2
Author: scheib <scheib@chromium.org>
Date: Wed Nov 09 03:15:49 2016

Disable SingleClientSessionsSyncTest.CookieJarMismatch

Test is flaky on try job runs, as detected by chromium-try-flakes app
and reported on the issue.

BUG= 663547 
TBR=stanisc@chromium.org,zea@chromium.org,skym@chromium.org

Review-Url: https://codereview.chromium.org/2489513004
Cr-Commit-Position: refs/heads/master@{#430840}

[modify] https://crrev.com/d89c55240ff7c736536efb3d419a904f7fdab0f2/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc

Labels: -Sheriff-Chromium
I'm removing the Sheriff-Chromium label from this since the test has been disabled and it looks like we're not seeing any more failures at the moment.
Owner: ----
Status: Untriaged (was: Started)

Comment 7 by s...@chromium.org, Nov 9 2016

Owner: s...@chromium.org
Status: Assigned (was: Untriaged)

Comment 8 by s...@chromium.org, Nov 9 2016

Judging by the comment https://cs.chromium.org/chromium/src/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc?l=166 it seems this test case relies on behavior of how the signing flow it uses works.

I was suspicious of https://codereview.chromium.org/2478173003/ , but appears to have landed at 2016-11-08 20:41:35 UTC, and the first flake we saw is at 2016-11-08 20:08:09 UTC, ~30 minutes earlier. And this is the test's end time, not when it updated source files.

I cannot seem to find anything preceding this by a few hours that looks suspicious.

Also interesting to note, that this flaking seems to be happening exclusively on windows.

Comment 9 by s...@chromium.org, Nov 10 2016

Left this test case looping on my Linux machine over night and no failures. It seems like the sync backend initilaizes, then we sign in. This causes a (maybe real, not sure) list accounts to gaia, and we get back basically junk data that looks like:

["gaia.l.a.r",[]]

This parses to no accounts in the cookie jar. ProfileSyncService::OnGaiaAccountsInCookieUpdated is called, accounts is empty, and so cookie_jar_mismatch stays true and we don't fail at single_client_sessions_sync_test.cc(170).

Sprinkling sleeps all over CookieJarMismatch, at least on Linux, doesn't seem to have any affect.

My windows machine is currently blocked on bit9 and all my trybot attempts have had Windows specific compile failures. Hope to have a repro on Windows soon.

Comment 10 by zea@chromium.org, Nov 10 2016

FYI sync integration tests don't talk to real servers. Also, we should always sign in before initializing the sync backend.

That said, it does sound like there's some sort of race condition with our integration with ListAccounts. Grepping for "gaia.l.a.rs" shows that fake_gaia.cc usees it for it's ListAccounts response format.

Comment 11 by s...@chromium.org, Nov 10 2016

I too searched for that string and found https://cs.chromium.org/chromium/src/google_apis/gaia/fake_gaia.cc?q=%22gaia.l%22&sq=package:chromium&l=68&dr=C , but the bizarre thing was that I could modify that file to have a different list accounts response, but when I ran the integration test, I got the old value. Maybe this file is not re-compiled correctly, I'm really not sure yet. Still trying to understand all the [fake] url fetching logic, and where exactly the intercepting happens.

Comment 12 by s...@chromium.org, Nov 14 2016

Labels: -Pri-1 Pri-2
Downgrading to priority 2. This appears to me a timing issue with how the tests sign in, which doesn't reflect real usage. I still intend to fix this test soon, but I intend to work on a few other things first this week, so updating this bug to reflect that.

Comment 13 by s...@chromium.org, Nov 22 2016

Status: Started (was: Assigned)
I've been unable to reproduce the original flake, even on Windows. It's unclear if this problem is still oustanding. However, I found a different reason that could cause this test to flake, and a fix is in CL. I'm going to re-enable this case and see what happens on the bots.
Project Member

Comment 14 by bugdroid1@chromium.org, Nov 22 2016

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

commit e1f491522b22424a488d6255ec1f066b0af45f8c
Author: skym <skym@chromium.org>
Date: Tue Nov 22 23:47:17 2016

[Sync] Updated CookieJarMismatch to handle multiple sync cycles during
OpenTabAndGetLocalWindows.

CookieJarMismatch occasionally failed because two sync cycles would happen for
the upper or lower logic block, and then the histogram checks would fail. It is
a little bit unclear if the two sync cycles were a result of the implementation
of OpenTabAndGetLocalWindows(), or the extra TriggerSyncForModelTypes()
afterwards. Regardless, we now check the histograms in a manner that is
resilient to multiple sync cycles that duplicate the histogram emissions.

BUG= 663547 

Review-Url: https://codereview.chromium.org/2522663005
Cr-Commit-Position: refs/heads/master@{#434024}

[modify] https://crrev.com/e1f491522b22424a488d6255ec1f066b0af45f8c/chrome/browser/sync/test/integration/sessions_helper.h
[modify] https://crrev.com/e1f491522b22424a488d6255ec1f066b0af45f8c/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc

Comment 15 by s...@chromium.org, Nov 29 2016

Status: Fixed (was: Started)
Doesn't look like SingleClientSessionsSyncTest.CookieJarMismatch has flaked since I re-enabled it 6 days ago. Resolving.

Sign in to add a comment