WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
140914
[Win] Unable to reliably run tests in parallel
https://bugs.webkit.org/show_bug.cgi?id=140914
Summary
[Win] Unable to reliably run tests in parallel
Brent Fulgham
Reported
2015-01-26 18:25:09 PST
Whenever I increase the number of shards on our Windows tests bots above one I encounter variation in test failures and results. There seems to be some kind of cross-talk between tests that prevent us from running more jobs in parallel. We need to fix this to improve our test throughput.
Attachments
Patch
(2.27 KB, patch)
2016-08-04 07:29 PDT
,
Per Arne Vollan
no flags
Details
Formatted Diff
Diff
Patch
(2.66 KB, patch)
2016-08-05 09:03 PDT
,
Per Arne Vollan
no flags
Details
Formatted Diff
Diff
Patch
(3.45 KB, patch)
2016-08-08 07:05 PDT
,
Per Arne Vollan
no flags
Details
Formatted Diff
Diff
Patch
(2.61 KB, patch)
2016-08-11 04:37 PDT
,
Per Arne Vollan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-01-26 18:25:31 PST
<
rdar://problem/19609178
>
Adam Roben (:aroben)
Comment 2
2015-02-23 06:40:04 PST
Could the different test executables be stomping on each other's preferences? A number of tests change particular preferences while they run.
Brent Fulgham
Comment 3
2015-02-23 20:42:18 PST
(In reply to
comment #2
)
> Could the different test executables be stomping on each other's > preferences? A number of tests change particular preferences while they run.
Definitely. However, I tried to account for this in "libraryPathForDumpRenderTree()", which is based on the Mac implementation. It looks for DUMPRENDERTREE_TEMP in the environment, and uses that as the basis for its local preference storage. This is supposed to be unique per running test instance. I guess the first thing to check is that this is unique for each running test shard. If they are not, that might explain the problem.
Brent Fulgham
Comment 4
2015-02-23 22:20:25 PST
(In reply to
comment #3
)
> (In reply to
comment #2
) > > Could the different test executables be stomping on each other's > > preferences? A number of tests change particular preferences while they run. > > Definitely. However, I tried to account for this in > "libraryPathForDumpRenderTree()", which is based on the Mac implementation. > It looks for DUMPRENDERTREE_TEMP in the environment, and uses that as the > basis for its local preference storage. This is supposed to be unique per > running test instance. > > I guess the first thing to check is that this is unique for each running > test shard. If they are not, that might explain the problem.
So I added a printf to the libraryPathForDumpRenderTree, and confirmed that each shard is getting its own temporary directory, which it uses to seed the following preferences: CFPreferencesSetAppValue(WebDatabaseDirectoryDefaultsKey, WebCore::pathByAppendingComponent(libraryPath, "Databases").createCFString().get(), kCFPreferencesCurrentApplication); CFPreferencesSetAppValue(WebStorageDirectoryDefaultsKey, WebCore::pathByAppendingComponent(libraryPath, "LocalStorage").createCFString().get(), kCFPreferencesCurrentApplication); CFPreferencesSetAppValue(WebKitLocalCacheDefaultsKey, WebCore::pathByAppendingComponent(libraryPath, "LocalCache").createCFString().get(), kCFPreferencesCurrentApplication); The question, is whether CFPreferencesSetAppValue is sticking these values in the exact same place, causing all the different shards to see the same values.
Adam Roben (:aroben)
Comment 5
2015-02-24 06:53:51 PST
(In reply to
comment #4
)
> The question, is whether CFPreferencesSetAppValue is sticking these values > in the exact same place, causing all the different shards to see the same > values.
I'm pretty sure it does. You'll probably also need to audit uses of localUserSpecificStorageDirectory() and roamingUserSpecificStorageDirectory().
Brent Fulgham
Comment 6
2015-02-24 20:22:06 PST
(In reply to
comment #5
)
> (In reply to
comment #4
) > > The question, is whether CFPreferencesSetAppValue is sticking these values > > in the exact same place, causing all the different shards to see the same > > values. > > I'm pretty sure it does. > > You'll probably also need to audit uses of > localUserSpecificStorageDirectory() and > roamingUserSpecificStorageDirectory().
After talking with a few people, I think it may NOT be possible to do this on Windows with CoreFoundation. The CFPreference store is going to end up being shared between the different processes.
Adam Roben (:aroben)
Comment 7
2015-02-25 06:18:43 PST
Maybe you could give each process a unique CFBundle name? That should give them separate preferences.
Per Arne Vollan
Comment 8
2016-08-04 07:29:35 PDT
Created
attachment 285319
[details]
Patch
Per Arne Vollan
Comment 9
2016-08-04 08:30:17 PDT
There might be additional issues we need to fix, but this patch fixes the failures I see when running the dom tests in parallel.
Brent Fulgham
Comment 10
2016-08-04 09:38:40 PDT
Comment on
attachment 285319
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=285319&action=review
Fantastic! r=me
> Tools/Scripts/webkitpy/common/system/path.py:58 > + path = re.sub('/cygdrive/c', 'c:', path)
I think this would be better if we could capture the drive letter and pass it to the substitution so that "/cygdrive/d' -> 'd:'. This would be fine to do as a follow-up to this change.
WebKit Commit Bot
Comment 11
2016-08-04 10:04:03 PDT
Comment on
attachment 285319
[details]
Patch Clearing flags on attachment: 285319 Committed
r204123
: <
http://trac.webkit.org/changeset/204123
>
WebKit Commit Bot
Comment 12
2016-08-04 10:04:07 PDT
All reviewed patches have been landed. Closing bug.
WebKit Commit Bot
Comment 13
2016-08-05 06:41:37 PDT
Re-opened since this is blocked by
bug 160597
Per Arne Vollan
Comment 14
2016-08-05 09:03:55 PDT
Created
attachment 285424
[details]
Patch
Brent Fulgham
Comment 15
2016-08-05 09:09:32 PDT
Comment on
attachment 285424
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=285424&action=review
Thanks for improving the change! I'm not sure what the cause of the timeout was that you fixed this time around, but these changes look good on their own merits. If the tests pass please land it.
> Tools/Scripts/webkitpy/common/system/path.py:67 > + fileSystemRoot = _CygPath.convert_using_singleton(match.group(1))
Is it possible that someone might run tools from one root (e.g., 'C:'), and also run separate tools from another root (e.g., 'D:') during the same tool run? I guess that's pretty unlikely.
Per Arne Vollan
Comment 16
2016-08-08 07:05:46 PDT
Created
attachment 285564
[details]
Patch
Per Arne Vollan
Comment 17
2016-08-08 07:21:16 PDT
(In reply to
comment #15
)
> Comment on
attachment 285424
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=285424&action=review
> > Thanks for improving the change! I'm not sure what the cause of the timeout > was that you fixed this time around, but these changes look good on their > own merits. If the tests pass please land it. > > > Tools/Scripts/webkitpy/common/system/path.py:67 > > + fileSystemRoot = _CygPath.convert_using_singleton(match.group(1)) > > Is it possible that someone might run tools from one root (e.g., 'C:'), and > also run separate tools from another root (e.g., 'D:') during the same tool > run? I guess that's pretty unlikely.
Thanks for reviewing :) I updated the patch to handle this case.
Per Arne Vollan
Comment 18
2016-08-11 04:37:44 PDT
Created
attachment 285826
[details]
Patch
Brent Fulgham
Comment 19
2016-08-11 09:54:29 PDT
Comment on
attachment 285826
[details]
Patch Excellent! r=me.
WebKit Commit Bot
Comment 20
2016-08-11 10:44:00 PDT
Comment on
attachment 285826
[details]
Patch Clearing flags on attachment: 285826 Committed
r204376
: <
http://trac.webkit.org/changeset/204376
>
WebKit Commit Bot
Comment 21
2016-08-11 10:44:05 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug