Closed fbruetting closed 5 years ago
Are there any pertinent log messages?
an object is created and not correctly freed afterwards
Gjs uses garbage collection. Objects are not manually freed for the most part. I have little to no control over memory management, sounds like an upstream bug?
In lg
there are no errors, should I look elsewhere? And this isn’t the case in any other extension.
You can search the systemd logs for "mediaplayer" it should log any errors.
And this isn’t the case in any other extension.
I'm not doubting you but I can't reproduce the issue on either Fedora 26 or Ubuntu 17.10. When Fedora 27 is released in a few days(hopefully?) I'll install 27 and test against it. Fedora is my choice of distros normally, although I've been running Ubuntu 17.10 since it's release so I can test against GNOME 3.26 on a "stable" version of a distro.
@fbruetting Testing on Fedora 27 with Pithos as the media player, since I'm also a Pithos developer and it implements all of the MPRIS interfaces. I can't reproduce the leak and there are no errors in the logs.
What's your hardware config and what player?
XPS 15 9550 (or what do you mean with “hardware config”?) and Lollypop/Flatpak. Is there a log file somewhere, or is it just the lg
log?
XPS 15 9550 and Lollypop/Flatpak
NVIDIA Graphics? If so NVIDIA binary driver or Nouveau?
Is there a log file somewhere, or is it just the lg log?
Like I said before, any errors will show up in the systemd logs. You can look at the systemd logs with logs(the actual name of the program)
Dual graphics, made no customization, so I expect nouveau to be installed, but not used. And I looked in Logs, but found nothing.
Dual graphics, made no customization, so I expect nouveau to be installed, but not used. And I looked in Logs, but found nothing.
There have been a lot of bugs over the years about memory leaks with hybrid graphics and NVIDIA graphics on GNOME Shell. Also have you tried different players?
I just deactivated MPE, all the rest stays the same and the memory leaking disappeared. I don’t know how this should be related to the graphics driver?
I just deactivated MPE, all the rest stays the same and the memory leaking disappeared. I don’t know how this should be related to the graphics driver?
I don't know? I don't know any more than you do at this point. i'm just trying to cover all the stops.
Do you use some special widget or modified it, or something like this? This wasn’t the case since about 3 till 4 weeks ago (so maybe since I upgraded to F27b). Have you changed something in this timespan? Otherwise, this could be GTK-related. I opnened up a bug report there before triaging, since gnome-shell was eating all my memory (https://bugzilla.gnome.org/show_bug.cgi?id=789893).
I also experienced this bug. After a few songs gnome-shell was using ~200MB more RAM. I disabled MPE and now the memory usage is normal. Gnome still doesn't like my system, random crashes and reboots. I am using a NVIDIA graphics card with nouveau driver on Fedora 27.
Extensions are really the Wild West. There is no API, no docs or even guidelines to speak of, and no separation as far as they run in the same thread as the rest of the shell. They are basically monkey batches/hacks. It's nearly impossible to debug them if they don't throw any errors especially for memory related issues like this, because like I've said they are written(along with most of the shell) in Gjs, an interpreted language. As such memory management is handled by garbage collection.
*monkey patches
when I get some time I dig into the extension and do some googling to see what kind of memory debugging I can do. I certainly don't like memory leaks and I will do my best to fix it if I can.
I have noticed that I can cause GNOME Shell to eat memory(with the extension disabled and uninstalled, in fact no extensions installed) by just clicking back and forth between 2 open apps, say a terminal and the system monitor. Each click is good for about a 0.1MB increase in memory consumption on my system. I've never really paid much attention to this in the past but it looks like GNOME Shell is leaking memory elsewhere also...
Ok, good to know. Could you file a bug report for this?
But still, somehow with MPE Shell reaches several gigabytes in a few hours, which is quite another dimension. And yeah, Rust 4TW!
But still, somehow with MPE Shell reaches several gigabytes in a few hours, which is quite another dimension
I think they might be symptoms of the same leak(s). See: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1672297
Look at all the leak fixes in the pipe for 3.26.3: https://git.gnome.org/browse/mutter/log/?h=gnome-3-26&qt=grep&q=leak
I got 3.26.2 just the day before yesterday… is there already a date, when 3.26.3 arrives in F27?
I got 3.26.2 just the day before yesterday… is there already a date, when 3.26.3 arrives in F27?
No idea. But those leaks in the underlying GNOME Shell widgets would explain the leaks. You were right in a way. It appears that the shell widgets aren't clearing refs to clutter objects correctly. Nothing I can do about that.
hello, :) if I understood this correctly, the problem is the gnome-shell .. memory increases (you can also produce well by playing with the panel) and then does not sink anymore .. until the RAM is exhausted and the computer freezed .. I can also reproduce ... BUT ONLY if I have the mediaplayer extension active .. as soon as I uninstall the extension (and restart gnome-shell) the memory works correct ...as long as the extension is installed (and once started) the memory does not fall off.. The problem started (I guess) with the version 60.. Debian Gnome 3.26.2
I'm having the same Issue on Genom shell on ubuntu 17.10 this extension used nearly 5GB ram.
if I understood this correctly, the problem is the gnome-shell
I think it's more than likely a problem with the Gjs bindings. As I've said before extensions are written in JavaScript and they utilize the Gjs bindings. As JavaScript is a garbage collected language I do not control memory allocation or de-allocation. See https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) memory leaks should be nearly impossible to create if the binding are done correctly, but apparently they are not.
Since approximately two to three weeks, MPE is leaking significant memory, so that my system runs out of RAM and programs cannot be started anymore. gnome-shell then consumes several gigabytes of memory, seems like at every song change, an object is created and not correctly freed afterwards (I assume the album images to be the main part). I tested with all other shell extensions deactivated over the last week and could triage it to MPE.
Fedora 27b Gnome 3.26 MPE current