Bug 174415 - [GStreamer] Review WebKitWebSource after r219252.
Summary: [GStreamer] Review WebKitWebSource after r219252.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Charlie Turner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-12 01:32 PDT by Charlie Turner
Modified: 2017-07-26 13:08 PDT (History)
6 users (show)

See Also:


Attachments
Patch (12.47 KB, patch)
2017-07-14 11:03 PDT, Charlie Turner
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews122 for ios-simulator-wk2 (994.83 KB, application/zip)
2017-07-14 19:35 PDT, Build Bot
no flags Details
Patch (20.06 KB, patch)
2017-07-17 04:47 PDT, Charlie Turner
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-elcapitan (1.26 MB, application/zip)
2017-07-17 06:07 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews126 for ios-simulator-wk2 (953.88 KB, application/zip)
2017-07-17 07:15 PDT, Build Bot
no flags Details
Patch (27.32 KB, patch)
2017-07-17 08:51 PDT, Charlie Turner
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews124 for ios-simulator-wk2 (951.58 KB, application/zip)
2017-07-17 10:18 PDT, Build Bot
no flags Details
Patch (27.37 KB, patch)
2017-07-26 11:52 PDT, Charlie Turner
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Turner 2017-07-12 01:32:36 PDT
r219252 removed WebKitWebSource (WKWS) from being auto-plugged inside the GStreamer pipeline and hence used outside the main thread. There's a significant amount of code in WKWS that is now dead which handled this scenario of running multi-threaded. In particular ResourceHandleStreamingClient isn't used anymore, and there's various code paths conditioned on whether we're in the main thread or not that can be reviewed and probably removed.
Comment 1 Charlie Turner 2017-07-14 11:03:52 PDT
Created attachment 315450 [details]
Patch

Must confess the history of multi-threading WKWS is quite confusing, this seems like a minimally decent change which doesn't regress any tests or manual checks I have. All of the locking is redundant now as well, and it seems a little heavy-handed anyway. I would like to just remove it all as well, but perhaps someone with more context can comment about it.
Comment 2 Build Bot 2017-07-14 19:35:29 PDT
Comment on attachment 315450 [details]
Patch

Attachment 315450 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/4122852

New failing tests:
imported/w3c/IndexedDB-private-browsing/idbfactory_open12.html
Comment 3 Build Bot 2017-07-14 19:35:30 PDT
Created attachment 315523 [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.12.5
Comment 4 Carlos Garcia Campos 2017-07-17 00:12:37 PDT
Comment on attachment 315450 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=315450&action=review

> Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:-129
> -};

You can remove StreamingClient too, it was there only to handle both clients the same way, but now, we only have one.
Comment 5 Charlie Turner 2017-07-17 04:47:31 PDT
Created attachment 315656 [details]
Patch

Carlos, do you think we should leave the locking in? It's basically pointless at this stage, aside from as a guide for the future, and I suppose it might have people question how this module is used multi-threaded if they're not familiar with history.
Comment 6 Carlos Garcia Campos 2017-07-17 05:20:30 PDT
I don't know, I have no idea how threading works in GST, if you say it's useless, then let's remove it.
Comment 7 Build Bot 2017-07-17 06:07:07 PDT
Comment on attachment 315656 [details]
Patch

Attachment 315656 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/4135328

New failing tests:
storage/websql/database-lock-after-reload.html
Comment 8 Build Bot 2017-07-17 06:07:08 PDT
Created attachment 315659 [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
Comment 9 Charlie Turner 2017-07-17 06:18:36 PDT
> I don't know, I have no idea how threading works in GST, if you say it's useless, then let's remove it.

They're needed to some extent if we are spawned multiple times in the pipeline. Maybe we'll be moving in that direction in the future (netcode going through network process). In that case obviously they are needed.

May as well leave them there I suppose, they're not causing any noticeable issues. It's more of a directional question than a technical one.
Comment 10 Build Bot 2017-07-17 07:15:55 PDT
Comment on attachment 315656 [details]
Patch

Attachment 315656 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/4135559

New failing tests:
http/tests/cache/disk-cache/speculative-validation/cacheable-redirect.html
Comment 11 Build Bot 2017-07-17 07:15:56 PDT
Created attachment 315662 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.5
Comment 12 Michael Catanzaro 2017-07-17 07:18:26 PDT
No, if the code is not currently needed, then it should be removed. If the code needs to be threadsafe again in the future, it should be resurrected then. We don't keep useless code around in WebKit unless we have imminent plans to use it in the future!
Comment 13 Michael Catanzaro 2017-07-17 07:19:39 PDT
In particular, WebKitWebSrc is already a source of nightmare bugs... simplifying it as much as possible seems desirable.
Comment 14 Charlie Turner 2017-07-17 08:51:22 PDT
Created attachment 315666 [details]
Patch

OK; agreed. Removes the locking code as well.
Comment 15 Michael Catanzaro 2017-07-17 08:53:39 PDT
Comment on attachment 315666 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=315666&action=review

> Source/WebCore/ChangeLog:13
> +        Also remove the locking code. It's not needed now, and what existed
> +        was heavy-handed and missed several cases it was supposed to protect

Ah, so it never worked properly anyway. All the more reason to remove it!
Comment 16 Build Bot 2017-07-17 10:18:56 PDT
Comment on attachment 315666 [details]
Patch

Attachment 315666 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/4136177

New failing tests:
http/tests/cache/disk-cache/speculative-validation/cacheable-redirect.html
Comment 17 Build Bot 2017-07-17 10:18:57 PDT
Created attachment 315674 [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.12.5
Comment 18 Charlie Turner 2017-07-17 10:20:51 PDT
> Ah, so it never worked properly anyway. All the more reason to remove it!

Well.. Define worked :) -- I was just mentioning that if this code were to be resurrected, there were some places where a lock should have been taken and it wasn't. In the cases I found it was more recent code, and as the locking stood before this patch, it's easy to forget you're in a critical region. So would need a very careful review of all these places.
Comment 19 Charlie Turner 2017-07-25 09:53:49 PDT
This will probably need a rebase before commit-queue, but just wondering if there's any review objections?
Comment 20 Michael Catanzaro 2017-07-25 10:00:40 PDT
You already got r+ from Carlos, so this is good to go. Just rebase the patch, copy his name into the reviewed by line in the ChangeLog, and reupload using 'webkit-patch --no-review --request-commit'.

You could have alternatively grabbed the patch using 'webkit-patch apply-from-bug' so that it would come with Carlos's name already there in the reviewed by line, and you wouldn't have to do that manually.
Comment 21 Michael Catanzaro 2017-07-25 10:01:51 PDT
What I mean is: try not to set r? after you already have r+, unless you've made really substantial changes and want another review.
Comment 22 Charlie Turner 2017-07-26 11:52:17 PDT
Created attachment 316461 [details]
Patch
Comment 23 WebKit Commit Bot 2017-07-26 13:08:35 PDT
Comment on attachment 316461 [details]
Patch

Clearing flags on attachment: 316461

Committed r219959: <http://trac.webkit.org/changeset/219959>
Comment 24 WebKit Commit Bot 2017-07-26 13:08:36 PDT
All reviewed patches have been landed.  Closing bug.