WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
168351
[Resource Timing] Gather timing information with reliable responseEnd time
https://bugs.webkit.org/show_bug.cgi?id=168351
Summary
[Resource Timing] Gather timing information with reliable responseEnd time
Joseph Pecoraro
Reported
2017-02-14 19:34:22 PST
[Resource Timing] Gather timing information with reliable responseEnd time Currently: - WebContentProcess records pre-network times - NetworkProcess records network request times - WebContentProcess records responseEnd after receiving data from the NetworkProcess However because the double switch, the "responseEnd" recorded in the WebContentProcess doesn't line up with the other times and may end up before the last NetworkProcess time (responseStart). Ideally we just complete recording of network timestamps in the NetworkProcess. Suggested: - WebContentProcess records pre-network times - NetworkProcess records network request times + responseEnd This likely means moving NetworkLoadTiming off of ResourceResponse and instead sending it through a separate message, which is something we wanted to do anyways.
Attachments
[PATCH] For Bots
(107.11 KB, patch)
2017-02-16 22:22 PST
,
Joseph Pecoraro
buildbot
: commit-queue-
Details
Formatted Diff
Diff
[PATCH] For Bots
(106.91 KB, patch)
2017-02-16 22:46 PST
,
Joseph Pecoraro
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews100 for mac-elcapitan
(727.84 KB, application/zip)
2017-02-16 23:31 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews104 for mac-elcapitan-wk2
(843.66 KB, application/zip)
2017-02-16 23:33 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews121 for ios-simulator-wk2
(765.32 KB, application/zip)
2017-02-16 23:43 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews105 for mac-elcapitan-wk2
(843.17 KB, application/zip)
2017-02-16 23:59 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews124 for ios-simulator-wk2
(769.31 KB, application/zip)
2017-02-17 00:07 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews100 for mac-elcapitan
(863.48 KB, application/zip)
2017-02-17 02:26 PST
,
Build Bot
no flags
Details
[PATCH] For Bots
(110.68 KB, patch)
2017-02-17 14:03 PST
,
Joseph Pecoraro
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews105 for mac-elcapitan-wk2
(1.51 MB, application/zip)
2017-02-17 14:59 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews125 for ios-simulator-wk2
(753.83 KB, application/zip)
2017-02-17 15:11 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews100 for mac-elcapitan
(1.34 MB, application/zip)
2017-02-17 15:12 PST
,
Build Bot
no flags
Details
[PATCH] Proposed Fix
(133.50 KB, patch)
2017-02-17 19:21 PST
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
[PATCH] Proposed Fix
(133.71 KB, patch)
2017-02-17 19:39 PST
,
Joseph Pecoraro
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews125 for ios-simulator-wk2
(743.68 KB, application/zip)
2017-02-17 21:04 PST
,
Build Bot
no flags
Details
[PATCH] Proposed Fix
(146.12 KB, patch)
2017-02-20 15:22 PST
,
Joseph Pecoraro
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews106 for mac-elcapitan-wk2
(1015.76 KB, application/zip)
2017-02-20 16:28 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews125 for ios-simulator-wk2
(805.28 KB, application/zip)
2017-02-20 16:47 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews112 for mac-elcapitan
(1.69 MB, application/zip)
2017-02-20 16:49 PST
,
Build Bot
no flags
Details
[PATCH] For Bots
(207.70 KB, patch)
2017-02-20 22:15 PST
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
[PATCH] For Bots
(208.65 KB, patch)
2017-02-20 23:29 PST
,
Joseph Pecoraro
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews117 for mac-elcapitan
(1.72 MB, application/zip)
2017-02-21 00:39 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews102 for mac-elcapitan
(1.09 MB, application/zip)
2017-02-21 00:42 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews106 for mac-elcapitan-wk2
(1.29 MB, application/zip)
2017-02-21 00:47 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews121 for ios-simulator-wk2
(725.00 KB, application/zip)
2017-02-21 00:56 PST
,
Build Bot
no flags
Details
[PATCH] Proposed Fix
(196.46 KB, patch)
2017-02-21 13:31 PST
,
Joseph Pecoraro
achristensen
: review+
Details
Formatted Diff
Diff
Show Obsolete
(25)
View All
Add attachment
proposed patch, testcase, etc.
Joseph Pecoraro
Comment 1
2017-02-14 19:36:58 PST
This may therefore fix
bug 161170
.
Joseph Pecoraro
Comment 2
2017-02-14 21:49:14 PST
It is my understanding that on Cocoa platforms: -[NSURLSessionTaskDelegate URLSession:task:didFinishCollectingMetrics:] is always guaranteed to be received before: -[NSURLSessionTaskDelegate URLSession:task:didCompleteWithError] Moving to that, will allow Cocoa ports to: 1. Move off of SPI to API (NSURLSessionTaskTransactionMetrics) for network load times 2. Gain the "nextHopProtocol" value needed for Resource Timing Level 2 3. Have a reliable responseEnd timestamp relative to other network timestamps So that will be my goal for this radar. It is going to require a lot of plumbing.
Joseph Pecoraro
Comment 3
2017-02-16 11:28:05 PST
I believe this should fix
bug 161088
.
Joseph Pecoraro
Comment 4
2017-02-16 21:59:37 PST
I haven't quite figured out how I'm going to eliminate ResourceResponses's NetworkLoadTiming object. I'll have to how the ResourceHandle loading path works and ties into WebCore. It will need to be eliminated from many different places, and that task can be separate.
Joseph Pecoraro
Comment 5
2017-02-16 22:22:39 PST
Created
attachment 301883
[details]
[PATCH] For Bots
WebKit Commit Bot
Comment 6
2017-02-16 22:25:20 PST
Attachment 301883
[details]
did not pass style-queue: ERROR: Source/WebCore/platform/network/cocoa/NetworkLoadMetrics.mm:72: No space between ^ and block definition. [whitespace/brackets] [4] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:104: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:105: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:106: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:108: One space before end of line comments [whitespace/comments] [5] Total errors found: 5 in 53 files If any of these errors are false positives, please file a bug against check-webkit-style.
Joseph Pecoraro
Comment 7
2017-02-16 22:46:24 PST
Created
attachment 301885
[details]
[PATCH] For Bots
WebKit Commit Bot
Comment 8
2017-02-16 22:48:18 PST
Attachment 301885
[details]
did not pass style-queue: ERROR: Source/WebCore/platform/network/cocoa/NetworkLoadMetrics.mm:72: No space between ^ and block definition. [whitespace/brackets] [4] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:104: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:105: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:106: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:108: One space before end of line comments [whitespace/comments] [5] Total errors found: 5 in 53 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 9
2017-02-16 23:31:44 PST
Comment on
attachment 301883
[details]
[PATCH] For Bots
Attachment 301883
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/3141669
New failing tests: imported/w3c/web-platform-tests/resource-timing/test_resource_timing.html
Build Bot
Comment 10
2017-02-16 23:31:49 PST
Created
attachment 301889
[details]
Archive of layout-test-results from ews100 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 11
2017-02-16 23:33:43 PST
Comment on
attachment 301883
[details]
[PATCH] For Bots
Attachment 301883
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/3141670
New failing tests: imported/w3c/web-platform-tests/resource-timing/test_resource_timing.html
Build Bot
Comment 12
2017-02-16 23:33:47 PST
Created
attachment 301890
[details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 13
2017-02-16 23:43:42 PST
Comment on
attachment 301883
[details]
[PATCH] For Bots
Attachment 301883
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/3141674
New failing tests: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.html
Build Bot
Comment 14
2017-02-16 23:43:47 PST
Created
attachment 301892
[details]
Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 15
2017-02-16 23:59:14 PST
Comment on
attachment 301885
[details]
[PATCH] For Bots
Attachment 301885
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/3141770
New failing tests: imported/w3c/web-platform-tests/resource-timing/test_resource_timing.html
Build Bot
Comment 16
2017-02-16 23:59:20 PST
Created
attachment 301896
[details]
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 17
2017-02-17 00:07:52 PST
Comment on
attachment 301885
[details]
[PATCH] For Bots
Attachment 301885
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/3141766
New failing tests: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.html
Build Bot
Comment 18
2017-02-17 00:07:57 PST
Created
attachment 301897
[details]
Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 19
2017-02-17 02:26:32 PST
Comment on
attachment 301885
[details]
[PATCH] For Bots
Attachment 301885
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/3142257
New failing tests: imported/w3c/web-platform-tests/resource-timing/test_resource_timing.html
Build Bot
Comment 20
2017-02-17 02:26:36 PST
Created
attachment 301904
[details]
Archive of layout-test-results from ews100 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Joseph Pecoraro
Comment 21
2017-02-17 13:51:49 PST
Ahh yes. El Capitan won't have protocol information because: (1) It did not have the NSURLSessionTask didFinishCollectingMetrics delegate (2) It did not have protocol information in the SPI it uses to get timing data So I'll need platform specific results on El Capitan. I don't understand the fetch issues on iOS yet.
Joseph Pecoraro
Comment 22
2017-02-17 14:03:31 PST
Created
attachment 301984
[details]
[PATCH] For Bots
WebKit Commit Bot
Comment 23
2017-02-17 14:05:01 PST
Attachment 301984
[details]
did not pass style-queue: ERROR: Source/WebCore/platform/network/cocoa/NetworkLoadMetrics.mm:72: No space between ^ and block definition. [whitespace/brackets] [4] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:104: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:105: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:106: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:108: One space before end of line comments [whitespace/comments] [5] Total errors found: 5 in 54 files If any of these errors are false positives, please file a bug against check-webkit-style.
Joseph Pecoraro
Comment 24
2017-02-17 14:30:56 PST
Oh great, the test itself is flakey because if the resource is served from the cache it will not have a protocol. That sucks. I can mark it as flakey. Ideally we could address this upstream in web-platform-tests but instead I'll just add my own test for protocol name.
Build Bot
Comment 25
2017-02-17 14:59:40 PST
Comment on
attachment 301984
[details]
[PATCH] For Bots
Attachment 301984
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/3145325
New failing tests: imported/w3c/web-platform-tests/resource-timing/test_resource_timing.html
Build Bot
Comment 26
2017-02-17 14:59:46 PST
Created
attachment 301992
[details]
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 27
2017-02-17 15:11:22 PST
Comment on
attachment 301984
[details]
[PATCH] For Bots
Attachment 301984
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/3145352
New failing tests: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin.html imported/w3c/web-platform-tests/resource-timing/test_resource_timing.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.html
Build Bot
Comment 28
2017-02-17 15:11:27 PST
Created
attachment 301994
[details]
Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 29
2017-02-17 15:12:13 PST
Comment on
attachment 301984
[details]
[PATCH] For Bots
Attachment 301984
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/3145403
New failing tests: imported/w3c/web-platform-tests/resource-timing/test_resource_timing.html
Build Bot
Comment 30
2017-02-17 15:12:18 PST
Created
attachment 301995
[details]
Archive of layout-test-results from ews100 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Joseph Pecoraro
Comment 31
2017-02-17 19:21:54 PST
Created
attachment 302037
[details]
[PATCH] Proposed Fix Alrighty! I have a good feeling about this one.
Joseph Pecoraro
Comment 32
2017-02-17 19:39:53 PST
Created
attachment 302040
[details]
[PATCH] Proposed Fix
WebKit Commit Bot
Comment 33
2017-02-17 19:42:26 PST
Attachment 302040
[details]
did not pass style-queue: ERROR: Source/WebCore/platform/network/cocoa/NetworkLoadMetrics.mm:72: No space between ^ and block definition. [whitespace/brackets] [4] WARNING: Not running on native Windows. ERROR: LayoutTests/platform/win/TestExpectations:3787: Path does not exist. [test/expectations] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:104: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:105: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:106: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:108: One space before end of line comments [whitespace/comments] [5] ERROR: LayoutTests/platform/mac/TestExpectations:1539: Path does not exist. [test/expectations] [5] ERROR: LayoutTests/platform/gtk/TestExpectations:2812: Path does not exist. [test/expectations] [5] Total errors found: 8 in 67 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 34
2017-02-17 21:04:48 PST
Comment on
attachment 302040
[details]
[PATCH] Proposed Fix
Attachment 302040
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/3147158
New failing tests: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.html
Build Bot
Comment 35
2017-02-17 21:04:52 PST
Created
attachment 302045
[details]
Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Joseph Pecoraro
Comment 36
2017-02-17 21:53:32 PST
Comment on
attachment 302040
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=302040&action=review
> Source/WebKit2/NetworkProcess/soup/NetworkDataTaskSoup.h:143 > #if ENABLE(WEB_TIMING) > - double m_startTime { 0 }; > + WebCore::NetworkLoadMetrics m_networkLoadMetrics; > + MonotonicTime m_startTime; > #endif
Hmm, one possible issue with this change on GTK here is that I'm not setting the values on the ResourceResponse which was what it was doing before. That will probably break NavigationTiming. It should probably be setting those values / copying them over before sending didReceiveResponse.
Joseph Pecoraro
Comment 37
2017-02-17 22:33:40 PST
Hmm, on my local machine I see the following asserts in iOS Simulator running these tests: ASSERTION FAILED: response.httpStatusCode() < 300 || response.httpStatusCode() >= 400 || response.httpStatusCode() == 304 || !response.httpHeaderField(HTTPHeaderName::Location) /Users/pecoraro/Code/safari/OpenSource/Source/WebCore/loader/SubresourceLoader.cpp(286) : virtual void WebCore::SubresourceLoader::didReceiveResponse(const WebCore::ResourceResponse &) 1 0x11160ae1d WTFCrash 2 0x115da33ed WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&) 3 0x108df0635 WebKit::WebResourceLoader::didReceiveResponse(WebCore::ResourceResponse const&, bool) 4 0x108df5654 void IPC::callMemberFunctionImpl<WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::ResourceResponse const&, bool), std::__1::tuple<WebCore::ResourceResponse, bool>, 0ul, 1ul>(WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::ResourceResponse const&, bool), std::__1::tuple<WebCore::ResourceResponse, bool>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>) I don't see how my changes could have introduced this. Investigating.
Joseph Pecoraro
Comment 38
2017-02-17 22:59:29 PST
I see the following in the Simulator's Console: Feb 17 22:50:39 pecoraro com.apple.WebKit.Networking.Development[39610]: NSURLSessionTask finished with error - code: -1007 Feb 17 22:50:39 pecoraro com.apple.WebKit.WebContent.Development[39611]: >>> httpStatusCode() - 301 Feb 17 22:50:39 pecoraro com.apple.WebKit.WebContent.Development[39611]: >>> HTTPHeaderName::Location - ../resources/redirect.py?count=1&max_age=0&redirect_status=301&max_count=20&token=e36b436f-f1f5-447d-a2e1-023f92e87700&location=..%2Fresources%2Fredirect.py&count=17 Feb 17 22:50:39 pecoraro com.apple.WebKit.WebContent.Development[39611]: ASSERTION FAILED: response.httpStatusCode() < 300 || response.httpStatusCode() >= 400 || response.httpStatusCode() == 304 || !response.httpHeaderField(HTTPHeaderName::Location) It is super interesting that NSURLSessionTask had an error. So I wonder if that is related. I don't think this failure is related to my changes though. Others have apparently been skipping these tests due to crashes: $ find-expectations fetch/api/redirect | grep simulator LayoutTests/platform/ios-simulator-wk1/TestExpectations:1405:imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.html [ Crash Pass ] LayoutTests/platform/ios-simulator-wk1/TestExpectations:1874:imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.html [ Crash Pass ] But I'll continue to dig.
Joseph Pecoraro
Comment 39
2017-02-17 23:17:37 PST
https://developer.apple.com/reference/cfnetwork/cfnetworkerrors/kcfurlerrorhttptoomanyredirects?c_2
> kCFURLErrorHTTPTooManyRedirects = -1007
So for a test that is testing redirects, it seems this is not too unexpected. -- Is this happening without my change?
Joseph Pecoraro
Comment 40
2017-02-17 23:42:40 PST
> Is this happening without my change?
Wow. When I revert my change I'm no longer seeing the asserts. So it clearly must be related to my change. But I don't see how... Hmm
Joseph Pecoraro
Comment 41
2017-02-18 00:16:53 PST
So just having an empty delegate:
> - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didFinishCollectingMetrics:(NSURLSessionTaskMetrics *)metrics { }
Is enough to cause iOS to hit the ASSERT. This seems like something I may need to work around. Just the existence is changing CFNetwork's behavior somehow. I'll have to work out exactly what changes.
Joseph Pecoraro
Comment 42
2017-02-18 01:11:38 PST
Okay, merely adding this new delegate causes CFNetwork to change how it sends the delegates in this error case. * If didFinishCollectingMetrics does not exist we only get a didCompleteWithError. * If didFinishCollectingMetrics does exist, we get a didReceiveResponse, didFinishCollectingMetrics, and didCompleteWithError. I almost think the 2nd case is expected behavior, but I'm sure. I'll have to discuss this with others. It seems either way we will want to defend against this behavior since that is likely the case in Sierra.
Joseph Pecoraro
Comment 43
2017-02-20 15:22:20 PST
Created
attachment 302180
[details]
[PATCH] Proposed Fix
WebKit Commit Bot
Comment 44
2017-02-20 15:25:01 PST
Attachment 302180
[details]
did not pass style-queue: ERROR: Source/WebCore/platform/network/cocoa/NetworkLoadMetrics.mm:72: No space between ^ and block definition. [whitespace/brackets] [4] WARNING: Not running on native Windows. ERROR: LayoutTests/platform/win/TestExpectations:3787: Path does not exist. [test/expectations] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:104: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:105: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:106: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:108: One space before end of line comments [whitespace/comments] [5] ERROR: LayoutTests/platform/mac/TestExpectations:1539: Path does not exist. [test/expectations] [5] ERROR: LayoutTests/platform/gtk/TestExpectations:2828: Path does not exist. [test/expectations] [5] Total errors found: 8 in 72 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 45
2017-02-20 16:28:51 PST
Comment on
attachment 302180
[details]
[PATCH] Proposed Fix
Attachment 302180
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/3161781
New failing tests: imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-no-location.htm http/tests/cache/disk-cache/disk-cache-307-status-code.html
Build Bot
Comment 46
2017-02-20 16:28:56 PST
Created
attachment 302199
[details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 47
2017-02-20 16:47:06 PST
Comment on
attachment 302180
[details]
[PATCH] Proposed Fix
Attachment 302180
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/3161811
New failing tests: imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-no-location.htm http/tests/cache/disk-cache/disk-cache-307-status-code.html
Build Bot
Comment 48
2017-02-20 16:47:12 PST
Created
attachment 302202
[details]
Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 49
2017-02-20 16:49:48 PST
Comment on
attachment 302180
[details]
[PATCH] Proposed Fix
Attachment 302180
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/3161848
New failing tests: http/tests/navigation/redirect302-metaredirect.html imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-no-location.htm
Build Bot
Comment 50
2017-02-20 16:49:53 PST
Created
attachment 302204
[details]
Archive of layout-test-results from ews112 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Joseph Pecoraro
Comment 51
2017-02-20 16:57:25 PST
Comment on
attachment 302199
[details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 Alex and I talked about this. We're going to include the Timing information in didFinishLoading to cut down on the number of messages.
Joseph Pecoraro
Comment 52
2017-02-20 22:15:02 PST
Created
attachment 302224
[details]
[PATCH] For Bots
WebKit Commit Bot
Comment 53
2017-02-20 22:16:59 PST
Attachment 302224
[details]
did not pass style-queue: ERROR: LayoutTests/platform/mac/TestExpectations:1539: Path does not exist. [test/expectations] [5] ERROR: LayoutTests/platform/gtk/TestExpectations:2837: Path does not exist. [test/expectations] [5] ERROR: Source/WebCore/platform/network/cocoa/NetworkLoadMetrics.mm:72: No space between ^ and block definition. [whitespace/brackets] [4] WARNING: Not running on native Windows. ERROR: LayoutTests/platform/win/TestExpectations:3787: Path does not exist. [test/expectations] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:104: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:105: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:106: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:108: One space before end of line comments [whitespace/comments] [5] Total errors found: 8 in 109 files If any of these errors are false positives, please file a bug against check-webkit-style.
Joseph Pecoraro
Comment 54
2017-02-20 23:29:44 PST
Created
attachment 302236
[details]
[PATCH] For Bots This should fix the iOS Build, however already my failures are different from the bots so I'll need them to tell me why they are failing (different OS?)
WebKit Commit Bot
Comment 55
2017-02-20 23:31:55 PST
Attachment 302236
[details]
did not pass style-queue: ERROR: LayoutTests/platform/mac/TestExpectations:1539: Path does not exist. [test/expectations] [5] ERROR: LayoutTests/platform/gtk/TestExpectations:2837: Path does not exist. [test/expectations] [5] ERROR: Source/WebCore/platform/network/cocoa/NetworkLoadMetrics.mm:72: No space between ^ and block definition. [whitespace/brackets] [4] WARNING: Not running on native Windows. ERROR: LayoutTests/platform/win/TestExpectations:3787: Path does not exist. [test/expectations] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:104: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:105: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:106: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:108: One space before end of line comments [whitespace/comments] [5] Total errors found: 8 in 109 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 56
2017-02-21 00:39:24 PST
Comment on
attachment 302236
[details]
[PATCH] For Bots
Attachment 302236
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/3164131
New failing tests: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.html
Build Bot
Comment 57
2017-02-21 00:39:30 PST
Created
attachment 302243
[details]
Archive of layout-test-results from ews117 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 58
2017-02-21 00:42:22 PST
Comment on
attachment 302236
[details]
[PATCH] For Bots
Attachment 302236
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/3164156
New failing tests: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin-worker.html
Build Bot
Comment 59
2017-02-21 00:42:27 PST
Created
attachment 302244
[details]
Archive of layout-test-results from ews102 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 60
2017-02-21 00:47:52 PST
Comment on
attachment 302236
[details]
[PATCH] For Bots
Attachment 302236
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/3164178
New failing tests: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-worker.html imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.html
Build Bot
Comment 61
2017-02-21 00:47:57 PST
Created
attachment 302245
[details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 62
2017-02-21 00:56:22 PST
Comment on
attachment 302236
[details]
[PATCH] For Bots
Attachment 302236
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/3164200
New failing tests: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location-worker.html
Build Bot
Comment 63
2017-02-21 00:56:27 PST
Created
attachment 302246
[details]
Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Blaze Burg
Comment 64
2017-02-21 12:42:39 PST
Comment on
attachment 302236
[details]
[PATCH] For Bots View in context:
https://bugs.webkit.org/attachment.cgi?id=302236&action=review
> Source/WTF/ChangeLog:12 > +2017-02-17 Joseph Pecoraro <
pecoraro@apple.com
>
Double changelog.
Joseph Pecoraro
Comment 65
2017-02-21 13:31:11 PST
Created
attachment 302299
[details]
[PATCH] Proposed Fix
WebKit Commit Bot
Comment 66
2017-02-21 13:33:02 PST
Attachment 302299
[details]
did not pass style-queue: ERROR: LayoutTests/platform/mac/TestExpectations:1539: Path does not exist. [test/expectations] [5] ERROR: LayoutTests/platform/gtk/TestExpectations:2828: Path does not exist. [test/expectations] [5] ERROR: Source/WebCore/platform/network/cocoa/NetworkLoadMetrics.mm:72: No space between ^ and block definition. [whitespace/brackets] [4] WARNING: Not running on native Windows. ERROR: LayoutTests/platform/win/TestExpectations:3787: Path does not exist. [test/expectations] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:104: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:105: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:106: One space before end of line comments [whitespace/comments] [5] ERROR: Source/WebCore/platform/network/NetworkLoadMetrics.h:108: One space before end of line comments [whitespace/comments] [5] Total errors found: 8 in 104 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alex Christensen
Comment 67
2017-02-22 15:49:17 PST
Comment on
attachment 302299
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=302299&action=review
> LayoutTests/platform/ios-simulator/TestExpectations:2880 > +imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin-worker.html [ Failure ]
What do these failures look like? I think we should add platform expectations to see this and catch further regressions rather than just marking them as failing.
> Source/WebCore/loader/SubresourceLoader.cpp:288 > + // cases of too many redirects from CFNetwork (<
rdar://problem/30610988
>).
Is there a way we could find out if the didReceiveResponse was after a kCFURLErrorHTTPTooManyRedirects and ignore it to work around this?
> Source/WebCore/platform/network/NetworkLoadMetrics.hSource/WebCore/platform/network/NetworkLoadTiming.h:70 > + requestStart = Seconds(0);
I think it would be nicer if these used initializer lists. m_networkLoadMetrics = { }; would then be used instead of .reset().
> Source/WebCore/platform/network/NetworkLoadMetrics.hSource/WebCore/platform/network/NetworkLoadTiming.h:108 > + Seconds domainLookupStart; // -1 if no DNS. > + Seconds domainLookupEnd; // -1 if no DNS. > + Seconds connectStart; // -1 if reused connection. > + Seconds secureConnectionStart; // -1 if no secure connection. > + Seconds connectEnd; // -1 if reused connection.
Ideally these would be std::optional<Seconds> instead of the magic value of -1 if there is no value.
Joseph Pecoraro
Comment 68
2017-02-23 22:30:21 PST
Comment on
attachment 302299
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=302299&action=review
>> LayoutTests/platform/ios-simulator/TestExpectations:2880 >> +imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin-worker.html [ Failure ] > > What do these failures look like? I think we should add platform expectations to see this and catch further regressions rather than just marking them as failing.
A few PASS go to FAIL and expected rejections are not rejections. I spent a very long time trying to get results in the right place (once I add mac expectations then I need to re-add other port expectations, iOS, and mac-elcapitan). I think I should readdress this once CFNetwork looks at the radar. I think we'll need to address this at some point but it is already a weird case caused by too many redirects.
>> Source/WebCore/loader/SubresourceLoader.cpp:288 >> + // cases of too many redirects from CFNetwork (<
rdar://problem/30610988
>). > > Is there a way we could find out if the didReceiveResponse was after a kCFURLErrorHTTPTooManyRedirects and ignore it to work around this?
I looked for a way but did not find a way. This is really the first delegate we get and I didn't see a way to determine there is any at this point (it comes with the later delegate).
Joseph Pecoraro
Comment 69
2017-02-23 22:54:42 PST
<
https://trac.webkit.org/changeset/212944
>
Chris Dumez
Comment 70
2017-02-24 19:31:52 PST
I suspect this caused a lot of crashes on the bots: ASSERTION FAILED: networkLoadMetrics.isComplete() /Volumes/Data/WebKit/OpenSource/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp(152) : void WebKit::WebResourceLoader::didFinishResourceLoad(const WebCore::NetworkLoadMetrics &) 1 0x107e6af9d WTFCrash 2 0x1021548fc WebKit::WebResourceLoader::didFinishResourceLoad(WebCore::NetworkLoadMetrics const&) 3 0x1021595e6 void IPC::callMemberFunctionImpl<WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&), std::__1::tuple<WebCore::NetworkLoadMetrics>, 0ul>(WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&), std::__1::tuple<WebCore::NetworkLoadMetrics>&&, std::__1::integer_sequence<unsigned long, 0ul>) 4 0x102159458 void IPC::callMemberFunction<WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&), std::__1::tuple<WebCore::NetworkLoadMetrics>, std::__1::integer_sequence<unsigned long, 0ul> >(std::__1::tuple<WebCore::NetworkLoadMetrics>&&, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&)) 5 0x102158732 void IPC::handleMessage<Messages::WebResourceLoader::DidFinishResourceLoad, WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&)>(IPC::Decoder&, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&)) 6 0x102157e6c WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&, IPC::Decoder&) 7 0x1019bf709 WebKit::NetworkProcessConnection::didReceiveMessage(IPC::Connection&, IPC::Decoder&) 8 0x1017442e3 IPC::Connection::dispatchMessage(IPC::Decoder&) 9 0x1017399a8 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) 10 0x1017448e0 IPC::Connection::dispatchOneMessage() 11 0x10175d4fd IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14::operator()() 12 0x10175d459 WTF::Function<void ()>::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14>::call() 13 0x107e97a6e WTF::Function<void ()>::operator()() const 14 0x107eb3313 WTF::RunLoop::performWork() 15 0x107eb4b34 WTF::RunLoop::performWork(void*) 16 0x7fffab95a3c1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ 17 0x7fffab93b2cd __CFRunLoopDoSources0 18 0x7fffab93a7c6 __CFRunLoopRun 19 0x7fffab93a1c4 CFRunLoopRunSpecific 20 0x7fffaae9bebc RunCurrentEventLoopInMode 21 0x7fffaae9bcf1 ReceiveNextEventCommon 22 0x7fffaae9bb26 _BlockUntilNextEventMatchingListInModeWithFilter 23 0x7fffa9436e24 _DPSNextEvent 24 0x7fffa9bb285e -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] 25 0x7fffa942b7ab -[NSApplication run] 26 0x7fffa93f61de NSApplicationMain 27 0x7fffc130f8c7 _xpc_objc_main 28 0x7fffc130e2e4 xpc_main 29 0x10166c132 main 30 0x7fffc10b6235 start LEAK: 1 WebProcessPool
Chris Dumez
Comment 71
2017-02-24 19:33:48 PST
(In reply to
comment #69
)
> <
https://trac.webkit.org/changeset/212944
>
https://build.webkit.org/results/Apple%20Sierra%20Debug%20WK2%20(Tests)/r212945%20(2249)/results.html
Chris Dumez
Comment 72
2017-02-24 19:36:53 PST
Reverted
r212944
for reason: Caused a lot of failures on the debug bots Committed
r212989
: <
http://trac.webkit.org/changeset/212989
>
Chris Dumez
Comment 73
2017-02-24 19:51:47 PST
(In reply to
comment #72
)
> Reverted
r212944
for reason: > > Caused a lot of failures on the debug bots > > Committed
r212989
: <
http://trac.webkit.org/changeset/212989
>
Also see failures in release at
https://build.webkit.org/results/Apple%20Sierra%20Release%20WK1%20(Tests)/r212945%20(3950)/results.html
Joseph Pecoraro
Comment 74
2017-02-24 20:32:24 PST
Comment on
attachment 302299
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=302299&action=review
> Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp:153 > +#if USE(NETWORK_SESSION) > + ASSERT(networkLoadMetrics.isComplete()); > +#endif
This ASSERT is what was causing the crashes. It can just be removed. I used this to test the common code path was marking complete as expected. There are other code paths that can reach here that use empty metrics. It is fine to have empty metrics here (we may want to tweak their values later on though).
Joseph Pecoraro
Comment 75
2017-02-24 21:42:56 PST
> Also see failures in release at >
https://build.webkit.org/results/Apple%20Sierra%20Release%20WK1%20(Tests)/
>
r212945
%20(3950)/results.html
Ahh, yes these are WebKit1. That code path does not have the new code so this will need to be a Failure on WK1. Both fixes are simple so I'm going to Ireland this with the tiny changes. Thanks for the swift action to keep the bots green Chris!
Joseph Pecoraro
Comment 76
2017-02-24 21:45:19 PST
> I'm going to Ireland this with the tiny changes.
I'm going to *reland* this with...
Joseph Pecoraro
Comment 77
2017-02-24 21:57:42 PST
<
https://trac.webkit.org/changeset/212993
>
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