[Webkit-unassigned] [Bug 239635] MediaRecorder causes Network process crashed in about 10 minutes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 1 23:51:45 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=239635

--- Comment #8 from youenn fablet <youennf at gmail.com> ---
Looking at the crash log, I can see the device is on memory pressure just before networking process crashes:
2022-05-02 10:40:01.784768+0900 0x4F050E   Default   0x0                  10384  com.apple.WebKit.Networking: (JavaScriptCore) [com.apple.WebKit:MemoryPressure] Memory pressure relief: Total: res = 28508160/28508160/0, res+swap = 880560104/880560104/0
2022-05-02 10:40:01.784769+0900 0x4F050E   Default   0x0                  10384  com.apple.WebKit.Networking: (JavaScriptCore) [com.apple.WebKit:MemoryPressure] Received memory pressure event 32 vm pressure 1

My understanding is that the networking process has a lot of blobs.
To trigger the download, the web app creates a new blob concatenating all blobs into one blob. This double the memory size used for blobs.
This probably triggers the crash.

While we can try to optimise the case of handling a lot of large blobs internally, I can see some workarounds:
- Use https://fs.spec.whatwg.org/ to store the data on disk instead of in memory. When triggering download, use the corresponding File object.
- Use service worker to feed blob data progressively as the download through ReadableStream.
First option is probably the preferred option.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220502/98e119ea/attachment.htm>


More information about the webkit-unassigned mailing list