RESOLVED FIXED 235353
[meta] Perform media networking operation off the main thread
https://bugs.webkit.org/show_bug.cgi?id=235353
Summary [meta] Perform media networking operation off the main thread
Jean-Yves Avenard [:jya]
Reported 2022-01-19 04:09:49 PST
When playing multiple CRABS videos we can end up with a deadlock between the main thread and the CoreMedia player. Currently data coming via PlatformMediaResourceLoader/PlatformMediaResourceClient comes on the main thread. When we have a sync call from the content process to the GPU Process to query status of the CoreMedia player this last one could be waiting for data to arrive on the main process. As the data will never come with the main thread blocked ; we end up in a deadlock. This can be checked with this page: https://webkit.apple.com/demos/bin/video/many-video-elements.html Steps to reproduce: 1. Load <https://webkit.apple.com/demos/bin/video/many-video-elements.html> in Safari 2. Tap the “50” button to create 50 media elements 3. Playback will stall with < 50 elements successfully created By moving the networking operations off the main thread, we could avoid a deadlock.
Attachments
WIP1 (8.76 KB, patch)
2022-01-19 04:21 PST, Jean-Yves Avenard [:jya]
no flags
WIP2 (59.05 KB, patch)
2022-01-20 06:01 PST, Jean-Yves Avenard [:jya]
ews-feeder: commit-queue-
WIP3 (85.73 KB, patch)
2022-01-24 06:46 PST, Jean-Yves Avenard [:jya]
ews-feeder: commit-queue-
WIP3 (85.91 KB, patch)
2022-01-24 07:22 PST, Jean-Yves Avenard [:jya]
ews-feeder: commit-queue-
WIP4 (93.85 KB, patch)
2022-01-25 00:30 PST, Jean-Yves Avenard [:jya]
ews-feeder: commit-queue-
WIP4 (94.59 KB, patch)
2022-01-25 06:17 PST, Jean-Yves Avenard [:jya]
ews-feeder: commit-queue-
WIP6 (95.34 KB, patch)
2022-01-30 20:13 PST, Jean-Yves Avenard [:jya]
ews-feeder: commit-queue-
WIP6 (92.65 KB, patch)
2022-01-31 00:07 PST, Jean-Yves Avenard [:jya]
ews-feeder: commit-queue-
Jean-Yves Avenard [:jya]
Comment 1 2022-01-19 04:10:13 PST
Jean-Yves Avenard [:jya]
Comment 2 2022-01-19 04:21:28 PST
Jean-Yves Avenard [:jya]
Comment 3 2022-01-20 06:01:04 PST
Jean-Yves Avenard [:jya]
Comment 4 2022-01-24 06:46:12 PST
Jean-Yves Avenard [:jya]
Comment 5 2022-01-24 07:22:35 PST
Jean-Yves Avenard [:jya]
Comment 6 2022-01-25 00:30:40 PST
Jean-Yves Avenard [:jya]
Comment 7 2022-01-25 06:17:33 PST
Jean-Yves Avenard [:jya]
Comment 8 2022-01-30 20:13:53 PST
Created attachment 450374 [details] WIP6 Fix crashes related to use of AtomString in ResourceResponse
Jean-Yves Avenard [:jya]
Comment 9 2022-01-31 00:07:20 PST
Created attachment 450386 [details] WIP6 Fix crashes when GPU->WebContent connection is closed
Jean-Yves Avenard [:jya]
Comment 10 2022-05-18 05:22:56 PDT
EWS
Comment 11 2022-05-28 06:27:31 PDT
Committed r294999 (251097@main): <https://commits.webkit.org/251097@main> Reviewed commits have been landed. Closing PR #719 and removing active labels.
Ryan Haddad
Comment 12 2022-05-31 16:36:30 PDT
Jean-Yves Avenard [:jya]
Comment 13 2024-01-24 02:29:07 PST
EWS
Comment 14 2024-01-30 19:33:04 PST
Committed 273804@main (75bfd79c190e): <https://commits.webkit.org/273804@main> Reviewed commits have been landed. Closing PR #23156 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.