REOPENED 272896
References to SharedArrayBuffer Retained Across Page Refresh
https://bugs.webkit.org/show_bug.cgi?id=272896
Summary References to SharedArrayBuffer Retained Across Page Refresh
Tyler Gross
Reported 2024-04-18 08:07:34 PDT
Created attachment 470987 [details] Heap showing two instances of retained SharedArrayBuffer Memory continues to grow when you refresh the page in both Safari and STP in Photoshop Web. When I inspect heap snapshots, it looks like the memory that's being retained is the actual SharedArrayBuffer from the previous instance of the app. Steps to Reproduce: 1. Open photoshop.adobe.com/ 2. Create a new document 3. Once the new document has loaded, open the JavaScript Allocations section under Timelines 4. Take a heap snapshot 5. Refresh the page 6. Wait for the document to load 7. Take another heap snapshot 8. Observe memory increase between snapshots 9. As the threshold of memory used nears 15GB, the app will eventually crash with "This webpage was reloaded because it was using significant memory" Heap snapshot.
Attachments
Heap showing two instances of retained SharedArrayBuffer (248.41 MB, application/json)
2024-04-18 08:07 PDT, Tyler Gross
no flags
Heap snapshot baseline, no refreshes (202.32 MB, application/json)
2024-04-18 08:11 PDT, Tyler Gross
no flags
Heap snapshop 1 refresh (283.54 MB, application/json)
2024-04-18 08:14 PDT, Tyler Gross
no flags
Radar WebKit Bug Importer
Comment 1 2024-04-18 08:10:05 PDT
Tyler Gross
Comment 2 2024-04-18 08:11:05 PDT
Created attachment 470988 [details] Heap snapshot baseline, no refreshes
Tyler Gross
Comment 3 2024-04-18 08:14:48 PDT
Created attachment 470989 [details] Heap snapshop 1 refresh
Alexey Proskuryakov
Comment 4 2024-04-22 09:16:22 PDT
Thank you for the report. Do you happen to have a reduced test case?
Tyler Gross
Comment 5 2024-04-29 14:08:29 PDT
A minimal repro can be found here: https://github.com/milky2028/safari-memory-leak
Erik Schneider
Comment 6 2024-05-15 15:04:57 PDT
Hi Alexey, Now that Tyler's provided a reduced test case, is this something that can be investigated? For context, this bug is the main blocker for unlocking support for Photoshop Web on Safari.
Yijia Huang
Comment 7 2024-05-31 13:50:48 PDT
EWS
Comment 8 2024-06-08 00:10:15 PDT
Committed 279852@main (1e4577ba8de4): <https://commits.webkit.org/279852@main> Reviewed commits have been landed. Closing PR #29363 and removing active labels.
Tyler Gross
Comment 9 2024-07-08 06:13:22 PDT
Tested in STP 198 and bug is not fixed with original reproduction example.
Tyler Gross
Comment 11 2024-10-11 11:07:20 PDT
This issue persists. We have a second minimal repro that demonstrates crashing after refreshing with the "significant memory" error. https://photoshop-web-no-ui.netlify.app/ Make sure to test in Safari 18.0.1 or later, as prior to that out of memory crashes will happen when the application starts.
Note You need to log in before you can comment on or make changes to this bug.