WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
226454
XMLHttpRequest Safari Networking Process Growing Memory Usage and Crash with Internal Error
https://bugs.webkit.org/show_bug.cgi?id=226454
Summary
XMLHttpRequest Safari Networking Process Growing Memory Usage and Crash with ...
OpenSpeedTest.com
Reported
2021-05-30 23:50:13 PDT
I am debugging OpenSpeedTest an Ajax based network performance estimation tool. Which is maxing Multiple XHR requests to the server to benchmark user connection speed. I noticed HUGE memory Leake in Safari and i saw growing memory up to 100+Gb in Safari Networking Process after some time the repeated XHR requested retuned an error and stopped. I also noticed if we give 100Ms time before making new request Networking Process Growing Memory get resolved. Another most important issue i found is Performance difference in Normal Windows vs Private window without installing any Extensions the difference is huge. In Private window the Networking Process Growing Memory issue is not there. I tested this on Intel Mac and M1 Mac. Latest Stable and technology preview Safari. Why Networking Process Growing Memory if we make a new request every-time? Why Huge Performance difference in Private mode vs Normal windows?
Attachments
Screenshot at 121 seconds of running the script
(274.79 KB, image/png)
2021-05-30 23:58 PDT
,
OpenSpeedTest.com
no flags
Details
100Gb Memory usage ss after 277 seconds
(643.35 KB, image/png)
2021-05-31 00:01 PDT
,
OpenSpeedTest.com
no flags
Details
Requests error after 350 seconds Network process exited after 110+Gb of memory usage
(1.19 MB, image/png)
2021-05-31 00:02 PDT
,
OpenSpeedTest.com
no flags
Details
Safari Private Window vs Normal Window Performance Difference.
(6.88 MB, video/mp4)
2021-05-31 00:12 PDT
,
OpenSpeedTest.com
no flags
Details
Fetch and XHR implementation, Run it on M1 MacMini 10GbE or any Client and Server with 10GbE
(33.85 KB, application/zip)
2021-06-30 21:07 PDT
,
OpenSpeedTest.com
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
OpenSpeedTest.com
Comment 1
2021-05-30 23:58:35 PDT
Created
attachment 430176
[details]
Screenshot at 121 seconds of running the script Screenshot at 121 seconds of running the script
OpenSpeedTest.com
Comment 2
2021-05-31 00:01:30 PDT
Created
attachment 430177
[details]
100Gb Memory usage ss after 277 seconds 100Gb Memory usage screen after 277 seconds
OpenSpeedTest.com
Comment 3
2021-05-31 00:02:50 PDT
Created
attachment 430178
[details]
Requests error after 350 seconds Network process exited after 110+Gb of memory usage Requests error after 350 seconds Network process exited after 110+Gb of memory usage
OpenSpeedTest.com
Comment 4
2021-05-31 00:12:15 PDT
Created
attachment 430180
[details]
Safari Private Window vs Normal Window Performance Difference. Safari Private Window vs Normal Window Performance Difference. In this video i am showing private windows on the right and normal windows on the left. The first running number is the speed in Mbps that is 4000Mbps. As you can see from the video Private windows is Always 20% Faster than Normal Windows. Consistently getting 1000Mbps more on the private window. Why is that? I have not installed any extensions.
Chris Dumez
Comment 5
2021-06-01 18:14:54 PDT
Maybe HTTP disk cache-related if it doesn't happen in private browsing?
Chris Dumez
Comment 6
2021-06-02 08:51:37 PDT
I am having trouble reproducing on openspeedtest.com. I see some memory growth but not in the GBs.
OpenSpeedTest.com
Comment 7
2021-06-02 10:09:01 PDT
Steps to reproduce the problem: 1.Install OpenSpeedTest Docker 2.Make sure you have 10GbE Networking 3.Run the test to see the Massive Memory Growth. You can change the download and upload test run time inside the docker image index.html file. currently it's 12 seconds. if you are using a 10GbE network you can quickly see the growth. I have written a script that run continuously and crash itself after 350 seconds. i can share it here if you like to test. thanks
Radar WebKit Bug Importer
Comment 8
2021-06-06 23:51:18 PDT
<
rdar://problem/78936212
>
Alex Christensen
Comment 9
2021-06-21 12:24:15 PDT
Sharing that script here would be quite helpful.
OpenSpeedTest.com
Comment 10
2021-06-30 21:07:40 PDT
Created
attachment 432656
[details]
Fetch and XHR implementation, Run it on M1 MacMini 10GbE or any Client and Server with 10GbE Fetch and XHR implementation, Run it on M1 MacMini 10GbE or any Client and Server with 10GbE. Up to 1 Gbps you many not see Memory issues and perf. diff. between Normal window and Private window. So use 10GbE networking on both client and server.
OpenSpeedTest.com
Comment 11
2021-06-30 21:37:15 PDT
Make sure, you disable Gzip from Server Side.
OpenSpeedTest.com
Comment 12
2021-07-04 21:44:21 PDT
xhr.setRequestHeader("Cache-Control", "no-cache, no-store, max-age=0"); Resolved this memory leak. And Now Everything working fine.
OpenSpeedTest.com
Comment 13
2021-07-12 18:23:46 PDT
Updated docker image with Server side cache header
https://hub.docker.com/r/openspeedtest/latest
How can i close this bug report? In my test safari is the fastest browser. Thank you!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug