Bug 138098 - http/tests/cookies/third-party-cookie-relaxing.html is flaky on bots
Summary: http/tests/cookies/third-party-cookie-relaxing.html is flaky on bots
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified OS X 10.9
: P2 Normal
Assignee: Alexey Proskuryakov
Depends on:
Reported: 2014-10-27 11:27 PDT by Stephanie Lewis
Modified: 2014-10-28 09:44 PDT (History)
4 users (show)

See Also:

proposed fix (5.97 KB, patch)
2014-10-27 14:13 PDT, Alexey Proskuryakov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Alexey Proskuryakov 2014-10-27 12:16:00 PDT
As far as I can tell, updated expectations have not been landed yet.

This is kind of a bad test to skip, as we don't have much coverage. Looking into what's going on now.

I can reliably reproduce by running an arbitrary test repeatedly in one terminal window, and this test in another window:

run-webkit-tests -f --child-processes=7 --repeat=10000 css3/selectors3/html/css3-modsel-68.html

run-webkit-tests http/tests/cookies/third-party-cookie-relaxing.html --no-retry --no-show
Comment 2 Stephanie Lewis 2014-10-27 12:17:45 PDT
Updated Expectations in http://trac.webkit.org/projects/webkit/changeset/175223
Comment 3 Alexey Proskuryakov 2014-10-27 12:22:54 PDT
This is caused by this line in resetWebPreferencesToConsistentValues():

[WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain];

This test temporarily sets a different cookie accept policy, which gets overridden when another DRT process executes this line, so we have a race.

Separate instances of DumpRenderTree are supposed to use separate cookie stores, so they should not be able to affect one another. The question is what changed in Yosemite that this is no longer true.
Comment 4 Alexey Proskuryakov 2014-10-27 14:07:33 PDT
Looks like our parallel test processes used to always share cookie storages, but cookie accept policy wasn't read from the storage before Yosemite.
Comment 5 Alexey Proskuryakov 2014-10-27 14:13:58 PDT
Created attachment 240506 [details]
proposed fix
Comment 6 WebKit Commit Bot 2014-10-27 14:59:50 PDT
Comment on attachment 240506 [details]
proposed fix

Clearing flags on attachment: 240506

Committed r175232: <http://trac.webkit.org/changeset/175232>
Comment 7 WebKit Commit Bot 2014-10-27 14:59:52 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Csaba Osztrogonác 2014-10-28 01:21:06 PDT
(In reply to comment #6)
> Comment on attachment 240506 [details]
> proposed fix
> Clearing flags on attachment: 240506
> Committed r175232: <http://trac.webkit.org/changeset/175232>

It broke the build on Apple Windows bots:

  1>..\platform\network\cf\NetworkStorageSessionCFNet.cpp(57): error C3861: 'getpid': identifier not found
     1>Done Building Project "C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\WebCore.vcxproj\WebCore.vcxproj" (Build target(s)) -- FAILED.

Comment 9 Alexey Proskuryakov 2014-10-28 09:44:32 PDT
Should be fixed in <http://trac.webkit.org/r175254>.