Bug 188163

Summary: [GTK][WPE] Fetch tests assert in SubresourceLoader::didReceiveResponse()
Product: WebKit Reporter: Zan Dobersek <zan>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, dbates, ews-watchlist, fred.wang, japhet, rbuis, webkit-bug-importer
Priority: P2 Keywords: InRadar, LayoutTestFailure
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=221239
Attachments:
Description Flags
Patch
none
Patch none

Description Zan Dobersek 2018-07-30 04:17:48 PDT
The following tests assert in SubresourceLoader::didReceiveResponse() when built in debug mode:

- http/tests/fetch/caching-with-different-options.html
- http/tests/fetch/redirectmode-and-preload.html
- 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-mode-worker.html
- imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.html

Might be a libsoup-related issue.

Backtrace:

STDERR: ASSERTION FAILED: response.httpStatusCode() < 300 || response.httpStatusCode() >= 400 || response.httpStatusCode() == 304 || !response.httpHeaderField(HTTPHeaderName::Location)
STDERR: ../../Source/WebCore/loader/SubresourceLoader.cpp(325) : virtual void WebCore::SubresourceLoader::didReceiveResponse(const WebCore::ResourceResponse&, WTF::CompletionHandler<void()>&&)
STDERR: 1   0x7f78d7d1c975 WTFCrash
STDERR: 2   0x7f78d5aa32cc WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&, WTF::CompletionHandler<void ()>&&)
STDERR: 3   0x7f78d3ec02e4 WebKit::WebResourceLoader::didReceiveResponse(WebCore::ResourceResponse const&, bool)
STDERR: 4   0x7f78d41037f0 void IPC::callMemberFunctionImpl<WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::ResourceResponse const&, bool), std::tuple<WebCore::ResourceResponse, bool>, 0ul, 1ul>(WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::ResourceResponse const&, bool), std::tuple<WebCore::ResourceResponse, bool>&&, std::integer_sequence<unsigned long, 0ul, 1ul>)
STDERR: 5   0x7f78d41031d0 void IPC::callMemberFunction<WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::ResourceResponse const&, bool), std::tuple<WebCore::ResourceResponse, bool>, std::integer_sequence<unsigned long, 0ul, 1ul> >(std::tuple<WebCore::ResourceResponse, bool>&&, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::ResourceResponse const&, bool))
STDERR: 6   0x7f78d41028b5 void IPC::handleMessage<Messages::WebResourceLoader::DidReceiveResponse, WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::ResourceResponse const&, bool)>(IPC::Decoder&, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::ResourceResponse const&, bool))
STDERR: 7   0x7f78d41021b2 WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&, IPC::Decoder&)
STDERR: 8   0x7f78d3ea1702 WebKit::NetworkProcessConnection::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
STDERR: 9   0x7f78d3a69fe7 IPC::Connection::dispatchMessage(IPC::Decoder&)
STDERR: 10  0x7f78d3a6a150 IPC::Connection::dispatchMessage(std::unique_ptr<IPC::Decoder, std::default_delete<IPC::Decoder> >)
STDERR: 11  0x7f78d3a6a616 IPC::Connection::dispatchOneIncomingMessage()
STDERR: 12  0x7f78d3a69e4a
STDERR: 13  0x7f78d3a70b74
STDERR: 14  0x7f78d3927e90 WTF::Function<void ()>::operator()() const
STDERR: 15  0x7f78d7d4f764 WTF::RunLoop::performWork()
STDERR: 16  0x7f78d7d9c370
STDERR: 17  0x7f78d7d9c394
STDERR: 18  0x7f78d7d9c310
STDERR: 19  0x7f78d7d9c33f
STDERR: 20  0x7f78c54417aa g_main_context_dispatch
STDERR: 21  0x7f78c5441b38
STDERR: 22  0x7f78c5441e52 g_main_loop_run
STDERR: 23  0x7f78d7d9c84d WTF::RunLoop::run()
STDERR: 24  0x7f78d42ba4ab int WebKit::ChildProcessMain<WebKit::WebProcess, WebKit::WebProcessMain>(int, char**)
STDERR: 25  0x7f78d42ba143 WebProcessMainUnix
STDERR: 26  0x556c4466fd9b main
STDERR: 27  0x7f78c44c72e1 __libc_start_main
STDERR: 28  0x556c4466fc1a _start
STDERR: LEAK: 8 WebPageProxy
Comment 1 Rob Buis 2018-08-03 09:04:22 PDT
Created attachment 346494 [details]
Patch
Comment 2 Rob Buis 2018-08-03 11:39:03 PDT
Note that this ASSERT will not be hit for Mac port but should affect all other ports.
Comment 3 Frédéric Wang (:fredw) 2018-08-03 12:02:51 PDT
Comment on attachment 346494 [details]
Patch

Do we need to update some TestExpectations files or can we land this?
Comment 4 Rob Buis 2018-08-03 12:14:07 PDT
Created attachment 346514 [details]
Patch
Comment 5 Rob Buis 2018-08-03 12:14:43 PDT
(In reply to Frédéric Wang (:fredw) from comment #3)
> Comment on attachment 346494 [details]
> Patch
> 
> Do we need to update some TestExpectations files or can we land this?

Good idea, let's see how WPE is turning out now.
Comment 6 Frédéric Wang (:fredw) 2018-08-03 12:21:43 PDT
Comment on attachment 346514 [details]
Patch

The person landing that patch will have to watch the WPE bots.
Comment 7 WebKit Commit Bot 2018-08-05 23:43:58 PDT
Comment on attachment 346514 [details]
Patch

Clearing flags on attachment: 346514

Committed r234587: <https://trac.webkit.org/changeset/234587>
Comment 8 WebKit Commit Bot 2018-08-05 23:44:00 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2018-08-05 23:44:26 PDT
<rdar://problem/42959112>