WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
158902
js/dom/global-constructors-attributes.html is flaky: ResourceTiming runtime feature leaks between tests
https://bugs.webkit.org/show_bug.cgi?id=158902
Summary
js/dom/global-constructors-attributes.html is flaky: ResourceTiming runtime f...
Alexey Proskuryakov
Reported
2016-06-17 22:50:18 PDT
In my local test run, js/dom/global-constructors-attributes.html failed because PerformanceEntry and PerformanceResourceTiming were unexpectedly enabled. Looks like nothing resets runtime enabled properties after they are enabled via Internals. This should be done in Internals::resetToConsistentState().
Attachments
Patch
(1.46 KB, patch)
2016-06-18 00:21 PDT
,
Yoav Weiss
no flags
Details
Formatted Diff
Diff
Patch
(1.46 KB, patch)
2016-06-18 00:54 PDT
,
Yoav Weiss
no flags
Details
Formatted Diff
Diff
Patch
(6.19 KB, patch)
2016-06-30 07:05 PDT
,
Yoav Weiss
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews107 for mac-yosemite-wk2
(1.09 MB, application/zip)
2016-06-30 07:37 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews122 for ios-simulator-wk2
(621.81 KB, application/zip)
2016-06-30 08:12 PDT
,
Build Bot
no flags
Details
Patch
(9.72 KB, patch)
2016-07-06 07:05 PDT
,
Yoav Weiss
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews106 for mac-yosemite-wk2
(1.07 MB, application/zip)
2016-07-06 08:16 PDT
,
Build Bot
no flags
Details
Patch
(10.15 KB, patch)
2016-07-06 09:58 PDT
,
Yoav Weiss
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews102 for mac-yosemite
(878.22 KB, application/zip)
2016-07-06 10:45 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews105 for mac-yosemite-wk2
(882.70 KB, application/zip)
2016-07-06 10:49 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews113 for mac-yosemite
(1.50 MB, application/zip)
2016-07-06 11:00 PDT
,
Build Bot
no flags
Details
Patch
(9.79 KB, patch)
2016-07-06 11:57 PDT
,
Yoav Weiss
no flags
Details
Formatted Diff
Diff
Patch
(6.23 KB, patch)
2016-07-06 13:53 PDT
,
Yoav Weiss
no flags
Details
Formatted Diff
Diff
Patch
(11.45 KB, patch)
2016-07-08 05:54 PDT
,
Yoav Weiss
no flags
Details
Formatted Diff
Diff
Patch
(6.23 KB, patch)
2016-07-11 01:06 PDT
,
Yoav Weiss
no flags
Details
Formatted Diff
Diff
Show Obsolete
(8)
View All
Add attachment
proposed patch, testcase, etc.
Yoav Weiss
Comment 1
2016-06-17 22:53:02 PDT
Thanks for reporting. I'll work on a patch and hope to upload it shortly
Yoav Weiss
Comment 2
2016-06-18 00:21:08 PDT
Created
attachment 281609
[details]
Patch
WebKit Commit Bot
Comment 3
2016-06-18 00:22:38 PDT
Attachment 281609
[details]
did not pass style-queue: ERROR: Source/WebCore/ChangeLog:8: Line contains tab character. [whitespace/tab] [5] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yoav Weiss
Comment 4
2016-06-18 00:54:43 PDT
Created
attachment 281611
[details]
Patch
Alex Christensen
Comment 5
2016-06-18 21:51:33 PDT
Do we not have this problem with other runtime enabled features?
Alexey Proskuryakov
Comment 6
2016-06-18 23:15:18 PDT
Comment on
attachment 281611
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=281611&action=review
> Source/WebCore/ChangeLog:8 > + Make sure that the ResourceTiming runtime flag is turned off between tests.
As Alex noted, this presumably happens with other runtime enabled features too.
> Source/WebCore/testing/Internals.cpp:418 > + RuntimeEnabledFeatures::sharedFeatures().setResourceTimingEnabled(false);
My thinking was that we need to record original values before changing them. A hardcoded false could get out of sync with a changed default.
Alexey Proskuryakov
Comment 7
2016-06-21 12:01:38 PDT
Yoav, do you expect to have a fix soon?
Yoav Weiss
Comment 8
2016-06-22 14:14:59 PDT
Apologies. I'm currently at a conference, so it'll probably be a few days before I can work on this. To make sure that I understand the proposed solution, do you think I should add a method to RuntimeEnabledFeatures that resets all the flags to their initial state?
Alexey Proskuryakov
Comment 9
2016-06-22 14:27:27 PDT
Yes, and one thing that is important is to actually use initial state without hardcoding it again - we shouldn't have a second copy of initial state values for every feature here.
Yoav Weiss
Comment 10
2016-06-30 07:05:46 PDT
Created
attachment 282437
[details]
Patch
Yoav Weiss
Comment 11
2016-06-30 07:09:58 PDT
Added a reset() func as discussed and called it from internals. PTAL?
Build Bot
Comment 12
2016-06-30 07:37:35 PDT
Comment on
attachment 282437
[details]
Patch
Attachment 282437
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/1600630
Number of test failures exceeded the failure limit.
Build Bot
Comment 13
2016-06-30 07:37:41 PDT
Created
attachment 282440
[details]
Archive of layout-test-results from ews107 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Build Bot
Comment 14
2016-06-30 08:12:47 PDT
Comment on
attachment 282437
[details]
Patch
Attachment 282437
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/1600727
Number of test failures exceeded the failure limit.
Build Bot
Comment 15
2016-06-30 08:12:52 PDT
Created
attachment 282443
[details]
Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.4
Alex Christensen
Comment 16
2016-06-30 10:58:21 PDT
Comment on
attachment 282437
[details]
Patch Not this initial state. This makes all the tests fail. The initial state that DumpRenderTree and WebKitTestRunner set.
Yoav Weiss
Comment 17
2016-07-01 02:20:15 PDT
(In reply to
comment #16
)
> Comment on
attachment 282437
[details]
> Patch > > Not this initial state. This makes all the tests fail. The initial state > that DumpRenderTree and WebKitTestRunner set.
I'm not familiar with that state and where it is set. Could you point me in the right direction?
Alex Christensen
Comment 18
2016-07-05 12:28:16 PDT
resetWebPreferencesToConsistentValues in Mac and Win DumpRenderTree InjectedBundle::beginTesting in WebKitTestRunner
Yoav Weiss
Comment 19
2016-07-06 07:05:31 PDT
Created
attachment 282891
[details]
Patch
Build Bot
Comment 20
2016-07-06 08:16:53 PDT
Comment on
attachment 282891
[details]
Patch
Attachment 282891
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/1635972
Number of test failures exceeded the failure limit.
Build Bot
Comment 21
2016-07-06 08:16:58 PDT
Created
attachment 282897
[details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Yoav Weiss
Comment 22
2016-07-06 09:58:35 PDT
Created
attachment 282905
[details]
Patch
Yoav Weiss
Comment 23
2016-07-06 10:16:25 PDT
Current patch changes the defaults for some of the runtime enabled features, as that seems to be the cause for the test failures, but that's obviously not the right solution. I'm just testing it to see if this is the only reason for the bot failures.
Build Bot
Comment 24
2016-07-06 10:45:51 PDT
Comment on
attachment 282905
[details]
Patch
Attachment 282905
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/1636559
New failing tests: platform/mac/fast/text/trailing-word-parse.html fast/text/trailing-word.html js/dom/global-constructors-attributes.html
Build Bot
Comment 25
2016-07-06 10:45:56 PDT
Created
attachment 282907
[details]
Archive of layout-test-results from ews102 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 26
2016-07-06 10:49:19 PDT
Comment on
attachment 282905
[details]
Patch
Attachment 282905
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/1636565
New failing tests: platform/mac/fast/text/trailing-word-parse.html fast/dom/navigator-detached-no-crash.html fast/text/trailing-word.html js/dom/global-constructors-attributes.html
Build Bot
Comment 27
2016-07-06 10:49:24 PDT
Created
attachment 282908
[details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Build Bot
Comment 28
2016-07-06 11:00:17 PDT
Comment on
attachment 282905
[details]
Patch
Attachment 282905
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/1636584
New failing tests: platform/mac/fast/text/trailing-word-parse.html fast/text/trailing-word.html js/dom/global-constructors-attributes.html
Build Bot
Comment 29
2016-07-06 11:00:22 PDT
Created
attachment 282910
[details]
Archive of layout-test-results from ews113 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-yosemite Platform: Mac OS X 10.10.5
Yoav Weiss
Comment 30
2016-07-06 11:57:44 PDT
Created
attachment 282918
[details]
Patch
Yoav Weiss
Comment 31
2016-07-06 12:12:13 PDT
Seems like IndexedDB gets enabled to true in the mac port (as well as the WebView), so I had to turn it to true in order for the related tests to pass. I wonder what's the best course of action here. Reseting it to false breaks the tests, and at the same time, AFAICT setting it to true will change its state in other ports (including iossim)
Yoav Weiss
Comment 32
2016-07-06 13:53:13 PDT
Created
attachment 282941
[details]
Patch
Benjamin Poulain
Comment 33
2016-07-06 22:06:10 PDT
Comment on
attachment 282941
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=282941&action=review
Check this before landing:
> Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp:67 > - , m_isIndexedDBEnabled(false) > + m_isIndexedDBEnabled = true;
You are changing this default. Is is intended?
Yoav Weiss
Comment 34
2016-07-06 22:51:22 PDT
(In reply to
comment #33
)
> Comment on
attachment 282941
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=282941&action=review
> > Check this before landing: > > > Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp:67 > > - , m_isIndexedDBEnabled(false) > > + m_isIndexedDBEnabled = true; > > You are changing this default. Is is intended?
It is intended, but I'm not 100% sure this is the right thing to do. See
https://bugs.webkit.org/show_bug.cgi?id=158902#c31
The default gets overridden to true in the mac and win WebViews as well as the WK2 port, and there are various tests that rely on it. But, other ports don't necessarily turn it on, so changing the default would change their behavior. So, I'm not sure what's the best course of action here
Alexey Proskuryakov
Comment 35
2016-07-07 10:02:52 PDT
Would it be feasible to record the original value of the setting when it's overridden using RuntimeEnabledFeatures?
Yoav Weiss
Comment 36
2016-07-07 12:35:52 PDT
(In reply to
comment #35
)
> Would it be feasible to record the original value of the setting when it's > overridden using RuntimeEnabledFeatures?
The current flow, unless I change the default value for IndexedDB, is: * RuntimeEnabledFeatures initializes IndexedDB to false * WebView/WebKit2 overrides that to true when initialized * If we reset back to defaults between tests, we override the overrides and bring it back to false. Do you propose that we'd create a special "set and keep it set across resets" setter for the various flags in RuntimeEnabledFeatures?
Alexey Proskuryakov
Comment 37
2016-07-07 13:50:10 PDT
My idea is that the first time a RuntimeEnabledFeature setter is called, we call WebCore to get the current state of it, remember that, and always reset back to that state between tests. There are a few essentially equivalent variations here. For example, we could get and remember WebCore's idea of feature state for all RuntimeEnabledFeatures at once the first time one of the setters is called.
Yoav Weiss
Comment 38
2016-07-08 05:54:28 PDT
Created
attachment 283141
[details]
Patch
Yoav Weiss
Comment 39
2016-07-08 06:00:19 PDT
I've changed the approach to: * Freeze the current feature set after it's changed in WebProcess/WebView. * Restore the features to that frozen set between tests. It seems to be working and doesn't contain IndexedDB specific logic. It's a pretty radical change from the previous approach, so I think a new review is required. ap and or benjamin - PTAL?
Benjamin Poulain
Comment 40
2016-07-08 14:54:00 PDT
(In reply to
comment #34
)
> (In reply to
comment #33
) > > Comment on
attachment 282941
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=282941&action=review
> > > > Check this before landing: > > > > > Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp:67 > > > - , m_isIndexedDBEnabled(false) > > > + m_isIndexedDBEnabled = true; > > > > You are changing this default. Is is intended? > > It is intended, but I'm not 100% sure this is the right thing to do. See >
https://bugs.webkit.org/show_bug.cgi?id=158902#c31
> > The default gets overridden to true in the mac and win WebViews as well as > the WK2 port, and there are various tests that rely on it. But, other ports > don't necessarily turn it on, so changing the default would change their > behavior. So, I'm not sure what's the best course of action here
I prefer your previous approach. My previous r+ still holds. For testing, we should have a common environment for all ports. If Mac and Win already enabled it by default, it sounds like the right thing to do is to enable it everywhere. IndexedDB is an important feature anyway. It is beneficial for GTK and EFL to support it ASAP. I would prefer if you land the previous patch with common features and a reset(). If that breaks the universe, we roll back and discuss what to do about GTK/EFL.
Yoav Weiss
Comment 41
2016-07-11 01:06:06 PDT
Created
attachment 283305
[details]
Patch
Yoav Weiss
Comment 42
2016-07-11 01:07:16 PDT
Brought back previous approach. I'll land it this PST afternoon if no objections arise.
Benjamin Poulain
Comment 43
2016-07-11 01:19:44 PDT
Comment on
attachment 283305
[details]
Patch Go for it. Thanks Yoav.
WebKit Commit Bot
Comment 44
2016-07-12 02:05:35 PDT
Comment on
attachment 283305
[details]
Patch Clearing flags on attachment: 283305 Committed
r203110
: <
http://trac.webkit.org/changeset/203110
>
WebKit Commit Bot
Comment 45
2016-07-12 02:05:43 PDT
All reviewed patches have been landed. Closing bug.
Brady Eidson
Comment 46
2016-08-19 14:00:08 PDT
This change makes it impossible to set features that are enabled by the WK2 web process init parameters. WebPage.cpp primes the RuntimeEnabledFeatures, but then upon creation of the Internals object they are reset to initial values.
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