Summary: | REGRESSION(r270074): [WPE][GTK] Problems when creating SoupServer in WebKitTestServer::WebKitTestServer | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> | ||||
Component: | WebKitGTK | Assignee: | Michael Catanzaro <mcatanzaro> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | aboya, bugs-noreply, cgarcia, clopez, dpino, fred.wang, jan.brummer, lmoura, mcatanzaro, pgriffis | ||||
Priority: | P2 | ||||||
Version: | WebKit Nightly Build | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=220922 https://bugs.webkit.org/show_bug.cgi?id=220938 |
||||||
Bug Depends on: | |||||||
Bug Blocks: | 219995 | ||||||
Attachments: |
|
Description
Michael Catanzaro
2021-01-06 09:22:07 PST
The soup server impl is indeed very broken. I also don't understand how it can work in the bots and EWS. I'm not sure it's worth reverting the original commits or just fix current impl at this point. In any case we should make sure the bots are running the actual code and not an old version or whatever is going on. Michael's patch looks good, but it0's not enough: 1- We are assuming soup_server_get_uris() returns a list og objects, but SoupURI is not an object. That means we should use soup_uri_copy instead of g_object_ref when setting m_baseURI (or steal the uri somehow) and soup_uri_free instead of g_object_ref when freeing the list. 2- We are still calling soup_server_run_async() that should only be called from the old API. We can just omit it, it's not needed with the new API. Michael, could you submit a new patch with those things fixed, please? Diego, Lauro or Carlos, could any of you check why tests are running fine in the bots, please? Thanks! (In reply to Carlos Garcia Campos from comment #1) > Michael, could you submit a new patch with those things fixed, please? Sure. That indeed seems to be enough to fix WebKitTestServer for me locally. I guess we should probably not land this until we know what's happening with the bots, though. Created attachment 418046 [details]
Patch
Comment on attachment 418046 [details]
Patch
Looks like API tests EWS really hates this patch.
I think there are two issues. We are still using soup_server_get_port() which is also "old" api, and I think https server is somehow broken too. I don't have time to go further. We might need to revert r270074 and r270170. They were needed for bug #171934, but that's stalled anyway. (In reply to Carlos Garcia Campos from comment #1) > Diego, Lauro or Carlos, could any of you check why tests are running fine in > the bots, please? > > Thanks! I built libsoup gnome3-38 branch, it builds libsoup2.72.0 which corresponds to this commit: $ git log -1 2.72.0 commit ae1632c176c60b7fe832024c0a958f4079767c44 (tag: 2.72.0) Author: Patrick Griffis <pgriffis@igalia.com> Date: Sun Sep 13 15:53:40 2020 -0700 2.72.0 On the other hand, WebKitGTK, both with jhbuild or Flatpak SDK, links using libsoup2.71.0, which corresponds to this commit: $ git log -1 2.71.0 commit d7b8e46510e6a4d1dbcd38d3330e83c41086cc2f (tag: 2.71.0) Author: Patrick Griffis <pgriffis@igalia.com> Date: Tue Jul 7 15:23:44 2020 -0700 2.71.0 So I think this might be the reason why the tests are passing in the bots. To test the use case mentioned by Michael we would need to update the libsoup version in jhbuild modules and run the tests. The libsoup version shouldn't matter. We are mixing new and old API that is present in the minimum libsoup version and used unconditionally. We are also handling SoupURI as a GObject. That should make all the tests crash in the bots. std::bitset is also wrongly used. There are too many issues to fix here. I'm going to revert the commits and I'll work on removing deprecated libsoup api as part of the preparation for libsoup3 migration. Changes reverted in bug #220922. Closing. (In reply to Michael Catanzaro from comment #0) > Using libsoup (built from latest commit on gnome-3-38 branch), I notice that > WebKitTestServer crashes whenever it is constructed, which prevents running > API tests that use it. The error is: > > Failed to start HTTP server: Can’t create a TLS server without a TLS > certificate Also this error has been around for years, so it's not something that would have changed between libsoup 2.70 and libsoup 2.72. That suggests something is seriously wrong with the API test bots; it's as if they were running the code from before this change, rather than the current code. And yet the EWS in this bug *did* pick up my changes and turn red, so... I don't know. The adventure continues in bug #220922. Incredibly, the revert has broken all the tests that use WebKitTestServer. Sigh. (In reply to Michael Catanzaro from comment #11) > (In reply to Michael Catanzaro from comment #0) > > Using libsoup (built from latest commit on gnome-3-38 branch), I notice that > > WebKitTestServer crashes whenever it is constructed, which prevents running > > API tests that use it. The error is: > > > > Failed to start HTTP server: Can’t create a TLS server without a TLS > > certificate > > Also this error has been around for years, so it's not something that would > have changed between libsoup 2.70 and libsoup 2.72. That suggests something > is seriously wrong with the API test bots; it's as if they were running the > code from before this change, rather than the current code. > > And yet the EWS in this bug *did* pick up my changes and turn red, so... I > don't know. The API test runner has a bug where it doesn't report crashing test suites. https://bugs.webkit.org/show_bug.cgi?id=220863 |