Memory leak found in GNOME Shell

GNOME Shell

Recently, some developers wrote that there is an annoying memory leak problem in the GNOME Shell, and this vulnerability is unlikely to be fixed in Ubuntu 18.04 LTS released next month.

Memory Leak in GNOME Shell 3.26

Many  Ubuntu users report that the GNOME Shell 3.26.2 used in Ubuntu 17.10 has a “hidden memory leak” that causes the GNOME Shell’s memory usage to increase every minute after running the shell animation (eg, open window, switch window Minimize to the Dock bar).

This is an unavoidable mistake because the normal use of the desktop will also cause the GNOME Shell to consume large amounts of memory within hours. And on systems with less memory, the impact of leaks will be more pronounced, as the system becomes more sluggish and slower.

This issue does not seem to be specific to Ubuntu, and there are similar bug reports on Gitlab. GNOME developers are trying to track down the exact cause.

The developer Georges Basile Stavracas Neto made some explorations on this issue and listed some of the triggers he found:

 

  • GNOME Shell consumes ~70MB right after starting up;
    • Jumps to ~95MB after opening the aggregate menu popup;
    • Jumps to ~250MB after loading the icon grid (with ~90 icons);

The bad news is that this problem still exists in GNOME Shell 3.28…

Although GNOME developers have released a “repair” program for this issue, according to users’ reports, this fix does not solve this problem.

From the comments of users’ reports, the memory increase problem still exists in the latest daily build of Ubuntu 18.04 LTS, which uses the newer version of GNOME Shell 3.28 by default.

Ubuntu 18.04 LTS is in the final stage of development. To integrate any patch or patch from GNOME before April 26, 2018, may not be enough in time.

Fixing memory leaks may be released as part of future GNOME 3.28, and Ubuntu developers can push fixes to users.

Solution

If you plan to use the GNOME Shell desktop in Ubuntu 18.04 LTS, you can forcibly restart the GNOME Shell every few hours to free up memory:

  1. Press Alt + F2
  2. Type the letter ‘r’
  3. Hit Enter/Return

Source: omgubuntu