| Summary: | [GTK][WPE] Several http/tests/contentextensions tests crash at TestController::configureContentExtensionForTest() | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Carlos Alberto Lopez Perez <clopez> | ||||
| Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | aperez, bugs-noreply, cgambrell, dpino, jbedard, pnormand, thorton, zdobersek | ||||
| Priority: | P2 | ||||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=223835 https://bugs.webkit.org/show_bug.cgi?id=193622 |
||||||
| Attachments: |
|
||||||
|
Description
Carlos Alberto Lopez Perez
2021-03-30 16:29:38 PDT
Created attachment 424713 [details]
full crash log with threads
Seems like the 0 and the content length are the most likely culprits. Igalia folks, can you help diagnose this, since it doesn't seem to repro on the Apple ports? (In reply to Jonathan Bedard from comment #2) > Seems like the 0 and the content length are the most likely culprits. I tried this version of main-resource-redirect-blocked.py $ cat LayoutTests/http/tests/contentextensions/main-resource-redirect-blocked.py #!/usr/bin/env python3 import sys sys.stdout.write( 'Location: resources/main-resource-redirect-blocked-target.html\r\n' 'Status: 302\r\n' 'Content-Length: 0\r\n' 'Connection: close\r\n' 'Content-Type: text/html\r\n\r\n' ) Which gives this raw output $ printf 'GET /contentextensions/main-resource-redirect-blocked.py HTTP/1.1\r\nHost: localhost\r\n\r\n' | nc localhost 8000 HTTP/1.1 302 Found Date: Wed, 31 Mar 2021 01:07:18 GMT Server: Apache/2.4.38 (Debian) Connection: close Location: resources/main-resource-redirect-blocked-target.html Content-Length: 0 Content-Type: text/html This way it doesn't print the 0 at the end and it exits immediately like the PHP version. Also the output it gives is almost the same than the previous PHP version. Major difference is that it replies with an HTTP/1.1 header instead of HTTP/1.0 (I couldn't find how to change the HTTP version from the python cgi script) But is still crashing... I also tried modifying the PHP version to use HTTP/1.1 and it is working with that one, so it is not directly related to that. This is a bit weird.. :\ Further debugging this I see that the request to the Apache server is never done in the case of main-resource-redirect-blocked.py. WTR crashes before doing the request. However, If i rename main-resource-redirect-blocked.py to something else it works (I mean, the crash is gone) And it seems the crash is triggered by the file LayoutTests/http/tests/contentextensions/main-resource-redirect-blocked.py.json ... If I delete this file then the test stops crashing. Further debugging this I see WTR is trying to load this json file in the function TestController::configureContentExtensionForTest() From: https://trac.webkit.org/browser/webkit/trunk/Tools/WebKitTestRunner/TestController.cpp?rev=275046#L1427 1393 void TestController::configureContentExtensionForTest(const TestInvocation& test) 1394 { [....] 1425 1426 WKPageSetUserContentExtensionsEnabled(mainWebView()->page(), true); 1427 WKUserContentControllerAddUserContentFilter(userContentController(), context.filter.get()); 1428 } And it is crashing on the line 1427 because context.filter.get() is returning nullptr This code was added in r241283 |