Very high memory usage (4GB) on YouTube
Categories
(Core :: Performance, defect)
Tracking
()
People
(Reporter: alex, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(6 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0
Steps to reproduce:
- Leave a scheduled youtube stream open or simply watch the stream and/or send a message in the chat
- Wait
Actual results:
Memory usage increases greatly and the browser/youtube become less responsive and live streams freeze until the youtube tabs are unloaded and restored
A couple links to my profiles when I experienced the issue or something resembling it:
https://share.firefox.dev/40tHFzI
https://share.firefox.dev/4jopt3b
Expected results:
Memory usage and site responsiveness should have remained stable and the stream should not have experienced a freeze
I uploaded another profile because it happened on my other computer shortly after posting this. Watching a stream, froze, noticed in about:processes it shot up to using several gigabytes of memory while frozen
Comment 2•11 days ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Performance' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 3•9 days ago
|
||
This bug was moved into the Performance component.
:alex, could you make sure the following information is on this bug?
✅ For slowness or high CPU usage, capture a profile with http://profiler.firefox.com/, upload it and share the link here.- For memory usage issues, capture a memory dump from
about:memory
and attach it to this bug. - Troubleshooting information: Go to
about:support
, click "Copy raw data to clipboard", paste it into a file, save it, and attach the file here.
If the requested information is already in the bug, please confirm it is recent.
Thank you.
Comment 4•9 days ago
|
||
OS: Windows 11 / Microsoft Windows [Version 10.0.26100.2894]
Useragent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0
Log recording: https://share.firefox.dev/4hIxluI
Notes: Clicking links to other videos within the youtube.com domain do not full page-load. The URL on the address line changes, but the content fails to load/change within the window, and the loading bar does not completely traverse from left-to-right. Reloading (CTRL+R) the page allows the URL/page to subsequently load completely. Clicking on non-media links within the youtube.com domain otherwise work fine. Opening media links into new tabs or new windows works fine. It's only problematic when it's a same-window rendering of a clicked lick.
(In reply to BugBot [:suhaib / :marco/ :calixte] from comment #3)
This bug was moved into the Performance component.
:alex, could you make sure the following information is on this bug?
✅ For slowness or high CPU usage, capture a profile with http://profiler.firefox.com/, upload it and share the link here.- For memory usage issues, capture a memory dump from
about:memory
and attach it to this bug.- Troubleshooting information: Go to
about:support
, click "Copy raw data to clipboard", paste it into a file, save it, and attach the file here.If the requested information is already in the bug, please confirm it is recent.
Thank you.
The files have been attached now that is has happened to me again while watching a live stream on youtube.
Comment 10•7 days ago
|
||
Kagami, please check Alex and Micheal's logs. Many users are still complaining about performance issues with YouTube.
Comment 11•7 days ago
|
||
I don't see any ghost windows from the memory report, so it's at least not directly related to bug 1939295. Can you follow the guide https://bugzilla.mozilla.org/show_bug.cgi?id=1939295#c3 and send CC logs? Thanks!
Updated•7 days ago
|
Comment 12•7 days ago
|
||
https://share.firefox.dev/40tHFzI: In this log, there are very long CC pauses
https://share.firefox.dev/4jopt3b: In this log, the process is spending a ton of time in the GC
https://share.firefox.dev/3WIYxkJ: In this log, the process is spending a ton of time in the GC
https://share.firefox.dev/4hIxluI: In this log, the big pauses look like they are running JS associated with a WebExtension "Video DownloadHelper".
Can you reproduce the issue without addons enabled? I see a bunch of addons related to YouTube in the memory report, in addition to the profile spending time in Video DownloadHelper.
The memory report shows a ton of memory in a single window, so there's some kind of leak.
(In reply to Kagami Rosylight [:saschanaz] (they/them) from comment #11)
I don't see any ghost windows from the memory report, so it's at least not directly related to bug 1939295. Can you follow the guide https://bugzilla.mozilla.org/show_bug.cgi?id=1939295#c3 and send CC logs? Thanks!
Let's not do that for now. I'm not sure how useful it will be for now.
Reporter | ||
Comment 13•7 days ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #12)
https://share.firefox.dev/40tHFzI: In this log, there are very long CC pauses
https://share.firefox.dev/4jopt3b: In this log, the process is spending a ton of time in the GC
https://share.firefox.dev/3WIYxkJ: In this log, the process is spending a ton of time in the GC
https://share.firefox.dev/4hIxluI: In this log, the big pauses look like they are running JS associated with a WebExtension "Video DownloadHelper".Can you reproduce the issue without addons enabled? I see a bunch of addons related to YouTube in the memory report, in addition to the profile spending time in Video DownloadHelper.
The memory report shows a ton of memory in a single window, so there's some kind of leak.
(In reply to Kagami Rosylight [:saschanaz] (they/them) from comment #11)
I don't see any ghost windows from the memory report, so it's at least not directly related to bug 1939295. Can you follow the guide https://bugzilla.mozilla.org/show_bug.cgi?id=1939295#c3 and send CC logs? Thanks!
Let's not do that for now. I'm not sure how useful it will be for now.
I'm running my browser in troubleshooting mode right now and I have seen the memory usage rise up to 3gb so far.
Reporter | ||
Comment 14•7 days ago
|
||
Reporter | ||
Comment 15•7 days ago
|
||
Reporter | ||
Comment 16•7 days ago
|
||
I'm using two separate machines In troubleshooting mode without addons disabled, and I'm seeing memory in about:processes continue to rise into the 4gb and higher range on both, so I uploaded the profile and the previously requested files again under those conditions.
I've seen it shoot quickly up to 6gb in the past well, and the stream freezes at that point.
Reporter | ||
Comment 17•7 days ago
|
||
Here's the profile from the second machine as well. Prior to the point of recording I received a warning from firefox saying the stream page was slowing down my browser.
Comment 18•7 days ago
|
||
Thanks for checking that.
- Are these all "live" streams on YouTube?
- Do they all have active chats going?
- Do you have the YouTube tab in the foreground so the video is fully visible, or maybe it is in a background tab or a minimized window (we've had problems with the latter before)?
Comment 19•7 days ago
|
||
Also, how long does it typically take to end up using that much memory? Like, under a minute, 10 minutes, an hour, multiple hours, etc?
Reporter | ||
Comment 20•7 days ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #18)
Thanks for checking that.
- Are these all "live" streams on YouTube?
- Do they all have active chats going?
- Do you have the YouTube tab in the foreground so the video is fully visible, or maybe it is in a background tab or a minimized window (we've had problems with the latter before)?
- They are not always "live". Sometimes they are just scheduled, with people waiting for the streamer to arrive at a later time.
- The chat is available with users occasionally sending messages.
- I've experienced the issue with the tab in the foreground and visible, though I may be active in another smaller firefox window at the same time. I have also experienced the issue while having the tab in the background while watching a video in another tab.
(In reply to Andrew McCreight [:mccr8] from comment #19)
Also, how long does it typically take to end up using that much memory? Like, under a minute, 10 minutes, an hour, multiple hours, etc?
I've seen it happen within a few minutes. Right now during testing, it was less than an hour.
However, I've also had situations where I did not notice any performance issues for several hours.
Reporter | ||
Comment 21•7 days ago
|
||
Actually, I sent a message in the chat roughly when I started testing so I can figure out how long it took this time based on the time I saved the link to my profile and the time I started testing.
It appears it took 23 minutes.
Comment 22•6 days ago
|
||
I'm experiencing what seems to be the same issue on Manjaro (KDE Plasma, Wayland), happens both on Firefox 134 and persists in 135. As advised on the Reddit thread, I captured my media performance profile, available at the following link:
Note that I don't experience the performance loss and 100% CPU use during playback: It occurs whenever a Youtube tab loads including the main page. After about 30 seconds of opening a tab everything returns to normal, memory usage does increase over time.
Description
•