Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High RAM usage with short videos #138

Open
goat865 opened this issue Feb 25, 2024 · 18 comments
Open

High RAM usage with short videos #138

goat865 opened this issue Feb 25, 2024 · 18 comments
Labels
bug Something isn't working

Comments

@goat865
Copy link

goat865 commented Feb 25, 2024

Describe the bug
When Media Controls is enabled, the RAM usage of gnome-shell goes up as I'm scrolling through YouTube shorts, TikTok or whatever, while another source of media is opened as well. This behavior no longer occurs when I restart my PC and do the same with the extension disabled.

To Reproduce

  1. Enable the extension
  2. Open any source of media (in my case Spotify)
  3. Go on a site that has short videos
  4. Start scrolling

Expected behavior
Memory usage should stay around the same, or at least not go that high.

Screenshots
Screenshot from 2024-02-25 13-57-02 - Normal RAM usage
Screenshot from 2024-02-25 14-00-04 - RAM usage after scrolling for about 2 minutes

Environment:

  • Distro: Fedora 39
  • GNOME version 45.4
  • Extension Version 2.0.0

Edit: Still an issue in July on Fedora 40.

@goat865 goat865 added the bug Something isn't working label Feb 25, 2024
@sakithb
Copy link
Owner

sakithb commented Feb 29, 2024

Can you see if the same happens when using another browser for watching short videos.

@goat865
Copy link
Author

goat865 commented Feb 29, 2024

I just did a test with Firefox, Brave and Chromium, and it seems to be an issue with chromium based browsers only.

@sakithb
Copy link
Owner

sakithb commented Mar 1, 2024

That's interesting, might be related to the broken chromium mpris implementation. I'll have to check it out.
Does the extension behave correctly with chromium browsers? Like does the extension keep showing the video as playing even after you close the tab?

@goat865
Copy link
Author

goat865 commented Mar 1, 2024

Well, in this scenario if I close the tab it's going to show Spotify.

@sakithb
Copy link
Owner

sakithb commented Mar 10, 2024

Did this happen again or are you able to recreate this issue?

@goat865
Copy link
Author

goat865 commented Mar 22, 2024

Yes, I'm still able to reproduce it.

@Spurlos
Copy link

Spurlos commented Mar 26, 2024

There is definitely a memory leak somewhere, as I had my gnome-shell killed due to OOM.
It seems that the more you seek\play\skip the more memory is leaking. I know that it's hard to chase memory leaks, but it seems that some objects are being created in the background without any destruction once they are used and useless.

In my case i had a day long session with some lengthy youtube videos (2-3 hours stream recordings), Spotify music (a few dozen of songs) and when i started to play a video in instagram, it immediately froze.

Here are some related logs just before the crash.

Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58ea1e4790 StBoxLayout:insensitive ("Лови момент")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58e8811510 StLabel:insensitive ("Лови момент")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58ea9ea820 StBoxLayout:insensitive ("КИССКОЛД / Крестики Нолики")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a59007f19f0 StLabel:insensitive ("КИССКОЛД / Крестики Нолики")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58e879e190 StBoxLayout:insensitive ("Лови момент")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58e97d3df0 StLabel:insensitive ("Лови момент")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a57434a5710 StBoxLayout:insensitive ("КИССКОЛД / Крестики Нолики")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58e996ad90 StLabel:insensitive ("КИССКОЛД / Крестики Нолики")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58e9f40600 StBoxLayout:insensitive ("Лови момент")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58ea8955c0 StLabel:insensitive ("Лови момент")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a579f50ba50 StBoxLayout:insensitive ("КИССКОЛД / Крестики Нолики")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58e9cc9d10 StLabel:insensitive ("КИССКОЛД / Крестики Нолики")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58ea0849c0 StBoxLayout:insensitive ("Лови момент")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a5693ca5d80 StLabel:insensitive ("Лови момент")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a5900db85a0 StBoxLayout:insensitive ("КИССКОЛД / Крестики Нолики")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a5721fb4410 StLabel:insensitive ("КИССКОЛД / Крестики Нолики")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a57367128c0 StBoxLayout:insensitive ("Лови момент")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58a91bc6e0 StLabel:insensitive ("Лови момент")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a589579a720 StBoxLayout:insensitive ("КИССКОЛД / Крестики Нолики")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58e88c9b90 StLabel:insensitive ("КИССКОЛД / Крестики Нолики")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a581ec9fb80 StBoxLayout:insensitive ("Лови момент")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58ea966500 StLabel:insensitive ("Лови момент")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58e83242d0 StBoxLayout:insensitive ("КИССКОЛД / Крестики Нолики")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58e8734100 StLabel:insensitive ("КИССКОЛД / Крестики Нолики")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a57bc80ab20 StBoxLayout:insensitive ("Лови момент")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a5895770f40 StLabel:insensitive ("Лови момент")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58ea8aa540 StBoxLayout:insensitive ("КИССКОЛД / Крестики Нолики")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58e971fc70 StLabel:insensitive ("КИССКОЛД / Крестики Нолики")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a5742d3b320 StBoxLayout:insensitive ("Лови момент")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58ea811f70 StLabel:insensitive ("Лови момент")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a56a15b0cd0 StBoxLayout:insensitive ("КИССКОЛД / Крестики Нолики")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58a0060830 StLabel:insensitive ("КИССКОЛД / Крестики Нолики")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58e8c17b00 StBoxLayout:insensitive ("Instagram")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a556c5f6ac0 StLabel:insensitive ("Instagram")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58e95d9170 StBoxLayout:insensitive ("Unknown artist")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58e9f96a60 StLabel:insensitive ("Unknown artist")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a589fe8e9c0 StBoxLayout:insensitive ("Instagram")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58e8c738b0 StLabel:insensitive ("Instagram")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a56fe307f30 StBoxLayout:insensitive ("Unknown artist")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58e962aab0 StLabel:insensitive ("Unknown artist")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a581ec69720 StBoxLayout:insensitive ("Instagram")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a584f096680 StLabel:insensitive ("Instagram")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a57ebe7f970 StBoxLayout:insensitive ("Unknown artist")] which is not in the stage.
Mar 26 04:07:28 spurlos-ThinkPad-T16-Gen-2 gnome-shell[62337]: st_widget_get_theme_node called on the widget [0x5a58a0091f70 StLabel:insensitive ("Unknown artist")] which is not in the stage.
Mar 26 04:09:24 spurlos-ThinkPad-T16-Gen-2 kernel: Out of memory: Killed process 62337 (gnome-shell) total-vm:22951616kB, anon-rss:9005892kB, file-rss:640kB, shmem-rss:10284kB, UID:1000 pgtables:35856kB oom_score_adj:100

@GazimSoliev
Copy link

I have the same problem, my system crashed after memory overload

@Bllyashanka
Copy link

+, I have the same issue

@goat865
Copy link
Author

goat865 commented Jul 26, 2024

@sakithb Any updates on this one?

@ctrLd147
Copy link

ctrLd147 commented Aug 30, 2024

def a media controls issue, memory jumps up when switching video (<- edit: not sure if this is too important) whilst not when extension disabled, caught it eating a whopping 29 gb after good amount of time

@ChrisLauinger77
Copy link
Collaborator

ChrisLauinger77 commented Aug 30, 2024

def a media controls issue, memory jumps up when switching video (<- edit: not sure if this is too important) whilst not when extension disabled, caught it eating a whopping 29 gb after good amount of time

Seems not to affect everybody - I wonder If you have more then 1 screen. Some sideeffects seem to not happen on single screen setups (gone after 1 switched from 2 monitors to 1 dual wide)
And I suspect gnome-shell / mutter is the issue not the extension.
What version of gnome-shell is used would be intresting from everybody who is affected

@Spurlos
Copy link

Spurlos commented Aug 30, 2024

mutter (46.2-1ubuntu0.24.04.1)
gnome-shell (46.0-0ubuntu6~24.04.4)

Have dual monitor setup (laptop + external), mostly docked, but i think it also happens when use laptop on its own.

@ChrisLauinger77
Copy link
Collaborator

There should be some fixes in gnome-shell 46.4 / 47.

@ctrLd147
Copy link

mutter: 46.2-1ubuntu0.24.04.1
gnome-shell: 46.0-0ubuntu6~24.04.4

Dual monitor to pc, fairly stock system, only started using extensions a bit after the latest ubuntu lts released.

@goat865
Copy link
Author

goat865 commented Aug 31, 2024

Seems not to affect everybody - I wonder If you have more then 1 screen. Some sideeffects seem to not happen on single screen setups (gone after 1 switched from 2 monitors to 1 dual wide) And I suspect gnome-shell / mutter is the issue not the extension.

Technically I do have a dual monitor setup as well, however my secondary monitor is disabled in the settings (I wonder if that changes anything).

What version of gnome-shell is used would be intresting from everybody who is affected

mutter 46.4 & bash 5.2.26

@abtsousa
Copy link

abtsousa commented Sep 2, 2024

This is happening to me as well. Two-monitor setup on Wayland EndeavourOS, mutter 46.4, Gnome Shell 46.4, everytime a new song is loaded the ram usage for gnome-shell goes up by a few megabytes until eventually it is killed / crashes.

@4JX
Copy link

4JX commented Nov 15, 2024

vokoscreenNG-2024-11-15_23-55-14.mp4

Figured I'd post a video of it happening live since there wasn't one here already. My whole desktop slows down while performing the test with the extension on, so excuse the stuttery framerate.

I can reliably get it to increase by playing new videos on a browser, for example (exaggerated here with the tab closing). At the end I disable the extension and repeat the experiment, while the memory usage doesn't grow anymore.

This was done on a laptop connected to an external monitor, but I've shortly after unplugged the cable and still got memory to grow while using the internal display only.

In between the already discussed st_widget_get_theme_node logs there's also Spotify dumping core:

Nov 16 00:13:20 terra spotify.desktop[601769]: *** stack smashing detected ***: terminated
Nov 16 00:13:20 terra systemd-coredump[601785]: Process 601769 (.spotify-wrappe) of user 1000 terminated abnormally with signal 6/ABRT, processing...
...
Nov 16 00:13:20 terra systemd-coredump[601786]: [🡕] Process 601769 (.spotify-wrappe) of user 1000 dumped core.
                                                
                                                Module libpciaccess.so.0 without build-id.
                                                Module liblzma.so.5 without build-id.
                                                Module libncursesw.so.6 without build-id.
                                                Module libbrotlicommon.so.1 without build-id.

I usually use firefox as my browser, and haven't had any issues over there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants