Bug 1583300 - gnome-software memory use keeps increasing
Summary: gnome-software memory use keeps increasing
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-software
Version: 28
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-28 16:25 UTC by Guy Streeter
Modified: 2019-05-28 23:46 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-28 23:46:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
pidstat showing gnome-software memory increasing (3.11 KB, text/plain)
2018-07-27 14:19 UTC, Guy Streeter
no flags Details

Description Guy Streeter 2018-05-28 16:25:01 UTC
Description of problem:

The gnome-software process keeps using more and more memory


Version-Release number of selected component (if applicable):

gnome-software-3.28.2-1.fc28.x86_64

How reproducible:

Always

Steps to Reproduce:
1. boot the system and log in.

Actual results:

Memory used by gnome-software keeps increasing, and never reduces.

Expected results:

gnome-software should not use all my memory.

Additional info:

Here is gnome-software using 2/3 of my memory while idle:

$ pidstat -p $(pgrep gnome-software) -rhu --human 300
Linux 4.16.11-300.fc28.x86_64 (guy) 	05/28/2018 	_x86_64_	(8 CPU)

# Time        UID       PID    %usr %system  %guest   %wait    %CPU   CPU  minflt/s  majflt/s     VSZ     RSS   %MEM  Command
10:12:27 AM  1001      2085    0.0%    0.0%    0.0%    0.0%    0.0%     5      0.00      0.00    7.3G    5.2G  67.1%  gnome-software

# Time        UID       PID    %usr %system  %guest   %wait    %CPU   CPU  minflt/s  majflt/s     VSZ     RSS   %MEM  Command
10:17:27 AM  1001      2085    0.1%    0.0%    0.0%    0.0%    0.1%     5      0.06      0.08    7.3G    5.2G  66.9%  gnome-software
 
# Time        UID       PID    %usr %system  %guest   %wait    %CPU   CPU  minflt/s  majflt/s     VSZ     RSS   %MEM  Command
10:22:27 AM  1001      2085    0.0%    0.0%    0.0%    0.0%    0.0%     2      0.00      0.00    7.3G    5.0G  64.7%  gnome-software

# Time        UID       PID    %usr %system  %guest   %wait    %CPU   CPU  minflt/s  majflt/s     VSZ     RSS   %MEM  Command
10:27:27 AM  1001      2085    0.0%    0.0%    0.0%    0.0%    0.0%     2      0.00      0.00    7.3G    5.0G  64.7%  gnome-software

# Time        UID       PID    %usr %system  %guest   %wait    %CPU   CPU  minflt/s  majflt/s     VSZ     RSS   %MEM  Command
10:32:27 AM  1001      2085    0.0%    0.0%    0.0%    0.0%    0.0%     5      0.03      0.01    7.3G    5.0G  64.7%  gnome-software

# Time        UID       PID    %usr %system  %guest   %wait    %CPU   CPU  minflt/s  majflt/s     VSZ     RSS   %MEM  Command
10:37:27 AM  1001      2085    0.0%    0.0%    0.0%    0.0%    0.0%     5      0.00      0.00    7.3G    5.0G  64.7%  gnome-software

# Time        UID       PID    %usr %system  %guest   %wait    %CPU   CPU  minflt/s  majflt/s     VSZ     RSS   %MEM  Command
10:42:27 AM  1001      2085    0.0%    0.0%    0.0%    0.0%    0.0%     5      0.00      0.00    7.3G    5.0G  64.7%  gnome-software

Comment 1 Guy Streeter 2018-07-27 14:19:45 UTC
Created attachment 1471128 [details]
pidstat showing gnome-software memory increasing

This shows gnome-software memory increasing constantly. This happens every day or two. If I don't notice and kill it, it uses all my RAM and swap and my system becomes unresponsive.

Comment 2 yulinux 2018-08-27 08:37:14 UTC
I have this problem every day. Can I help finding the root cause of the problem?

Comment 3 stuart_ledwich 2018-09-17 09:28:42 UTC
I also have the same problem, gnome-software is currently using 11GB memory and keeps showing extremely high CPU usage, recently upgraded to F28 so will post more info as I find it.

Comment 4 stuart_ledwich 2018-09-17 09:45:13 UTC
I have removed gnome-software for now which has totally resolved my problem in terms of high CPU and high memory resource consumption which has made all the desktop much more responsive until we have some way of resolving the problem and I reinstall.
fyi

sudo dnf remove gnome-software

I will continue to check for updates using sudo dnf update

Comment 5 Truls Asheim 2018-10-08 13:38:53 UTC
I encountered this issue now as well for the first time. I upgraded to Fedora 29 beta a few days ago. The high memory usage of gnome-software was accompanied by consistently high CPU usage from pacakgekitd and occasional spikes in CPU usage by gnome-software as is also described in bug 1599528 

Here is an excerpt from top:

top - 14:05:21 up 4 days, 18:46,  1 user,  load average: 1,57, 1,75, 2,14
Tasks: 329 total,   1 running, 328 sleeping,   0 stopped,   0 zombie
%Cpu(s): 15,2 us,  7,0 sy,  2,9 ni, 64,9 id,  8,8 wa,  1,2 hi,  0,0 si,  0,0 st
MiB Mem :  15900,1 total,    167,6 free,  14152,6 used,   1579,9 buff/cache
MiB Swap:   8001,0 total,   2821,5 free,   5179,4 used.   1113,5 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 2579 root      20   0 1493068 426664  18700 S  81,0   2,6  75:04.10 packagekitd
 [..]
 7492 truls     20   0   10,1g   8,8g   9400 S   0,0  57,0  20:59.05 gnome-software
 [..]

Comment 6 Olle Liljenzin 2018-10-19 20:16:21 UTC
I see it on my laptop, but not on other machines I have. Possibly triggered by wake-up from suspend, but I don't know for sure.

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                
29031 olle      20   0 25.560g 0.014t    320 R  45.7 91.6   1:53.81 gnome-software                         
   81 root      20   0       0      0      0 S   9.3  0.0   0:34.82 kswapd0

gnome-software-3.28.2-2.fc28.x86_64

Comment 7 Guy Streeter 2018-10-19 22:58:40 UTC
Now that you mention it, it only happens on my laptop, not on my desktop or my server. They're all up to date on Fedora 28.

Comment 8 yulinux 2018-10-20 10:39:39 UTC
I my case two desktop systems are affected. In both there is a variety of repositories enabled and I did a distribution update from Fedora 27 to 28. I also did a few updates via dnf (no only via gnome-software). Maybe this is part of the problem?

Comment 9 Trey Tabner 2018-10-23 15:28:50 UTC
This bug nearly wiped me out today:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                                                        
 6365 trey      20   0 38.214g 0.023t      0 R  97.0 76.7 237:31.33 gnome-software

Comment 10 Olle Liljenzin 2018-11-14 10:47:00 UTC
Backtrace from gdb attached to the spinning process:
(gdb) bt
#0  0x00007f0c8573612e in mremap () at ../sysdeps/unix/syscall-template.S:78
#1  0x00007f0c856ba84d in mremap_chunk (p=p@entry=0x7efb362c8000, new_size=21438296064, new_size@entry=21438291968) at malloc.c:2861
#2  0x00007f0c856bf337 in __GI___libc_realloc (oldmem=0x7efb362c8010, bytes=bytes@entry=21438291952) at malloc.c:3185
#3  0x00007f0c8676c05e in g_realloc (mem=0x7efb362c8010, n_bytes=21438291952) at gmem.c:164
#4  0x00007f0c8673672a in g_ptr_array_maybe_expand (array=array@entry=0x5649f05391a0, len=len@entry=1) at garray.c:1180
#5  0x00007f0c86737bb6 in g_ptr_array_add (array=0x5649f05391a0, data=0x5649f051b540) at garray.c:1490
#6  0x00007f0c868dbad7 in as_app_add_suggest (app=app@entry=0x5649f1249570 [AsApp], suggest=<optimized out>) at ../libappstream-glib/as-app.c:3691
#7  0x00007f0c868e054e in as_app_subsume_private (app=0x5649f1249570 [AsApp], donor=0x5649f127e410 [AsApp], flags=272730423291) at ../libappstream-glib/as-app.c:4083
#8  0x00007f0c868ffc96 in as_store_from_root
    (store=0x5649ee6cc190 [AsStore], root=<optimized out>, scope=AS_APP_SCOPE_SYSTEM, icon_prefix=<optimized out>, source_filename=<optimized out>, arch=0x0, load_flags=0, error=0x7ffe477f9050)
    at ../libappstream-glib/as-store.c:1680
#9  0x00007f0c86900d8c in as_store_from_file_internal (store=0x5649ee6cc190 [AsStore], file=<optimized out>, scope=AS_APP_SCOPE_SYSTEM, arch=0x0, load_flags=0, watch_flags=0, cancellable=0x0, error=0x7ffe477f9050)
    at ../libappstream-glib/as-store.c:2041
#10 0x00007f0c869012ea in as_store_watch_source_added (store=0x5649ee6cc190 [AsStore], filename=<optimized out>) at ../libappstream-glib/as-store.c:1862
#11 0x00007f0c8690153b in as_store_watch_source_changed (filename=0x5649eef5d050 "/var/cache/app-info/xmls/fedora-nvidia.xml.gz", store=0x5649ee6cc190 [AsStore]) at ../libappstream-glib/as-store.c:1880
#12 0x00007f0c8690153b in as_store_monitor_changed_cb (monitor=<optimized out>, filename=0x5649eef5d050 "/var/cache/app-info/xmls/fedora-nvidia.xml.gz", store=0x5649ee6cc190 [AsStore])
    at ../libappstream-glib/as-store.c:1894
#16 0x00007f0c86864923 in <emit signal ??? on instance 0x5649ee647920 [AsMonitor]> (instance=instance@entry=0x5649ee647920, signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3447
    #13 0x00007f0c86847c9d in g_closure_invoke (closure=0x5649ee675dc0, return_value=0x0, n_param_values=2, param_values=0x7ffe477f9290, invocation_hint=0x7ffe477f9210) at gclosure.c:810
    #14 0x00007f0c8685b203 in signal_emit_unlocked_R
    (node=node@entry=0x5649ee655f70, detail=detail@entry=0, instance=instance@entry=0x5649ee647920, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7ffe477f9290) at gsignal.c:3635
    #15 0x00007f0c8686432a in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7ffe477f9470) at gsignal.c:3391
#17 0x00007f0c868ee854 in as_monitor_emit_changed (monitor=monitor@entry=0x5649ee647920 [AsMonitor], filename=<optimized out>) at ../libappstream-glib/as-monitor.c:240
#18 0x00007f0c868ef036 in as_monitor_process_pending (monitor=0x5649ee647920 [AsMonitor]) at ../libappstream-glib/as-monitor.c:259
#19 0x00007f0c868ef036 in as_monitor_process_pending_trigger_cb (user_data=user_data@entry=0x5649ee647920) at ../libappstream-glib/as-monitor.c:284
#20 0x00007f0c86766d31 in g_timeout_dispatch (source=0x5649ef46be70, callback=0x7f0c868eefb0 <as_monitor_process_pending_trigger_cb>, user_data=0x5649ee647920) at gmain.c:4667
#21 0x00007f0c8676626d in g_main_dispatch (context=0x5649ee45c700) at gmain.c:3182
#22 0x00007f0c8676626d in g_main_context_dispatch (context=context@entry=0x5649ee45c700) at gmain.c:3847
#23 0x00007f0c86766638 in g_main_context_iterate (context=context@entry=0x5649ee45c700, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3920
#24 0x00007f0c867666d0 in g_main_context_iteration (context=context@entry=0x5649ee45c700, may_block=may_block@entry=1) at gmain.c:3981
#25 0x00007f0c86615465 in g_application_run (application=0x5649ee42f130 [GsApplication], argc=argc@entry=2, argv=argv@entry=0x7ffe477f9838) at gapplication.c:2470
#26 0x00005649ec6bb1b2 in main (argc=2, argv=0x7ffe477f9838) at ../src/gs-main.c:53

Comment 11 Andre Costa 2018-11-28 10:53:02 UTC
This was happening on my F29 installation, keeping my load average *constantly* between 2.0-3.0. I ended up removing gnome-software and its dependencies (which include PackageKit) until this bug is marked as solved. If anyone needs more info, I will be happy to help.

Comment 12 Alex Willmy 2018-12-04 14:26:45 UTC
I have the same problem and noticed this only happens when gnome-software is downloading updates. I also reported the bug upstream here: 

https://gitlab.gnome.org/GNOME/gnome-software/issues/453

Instead of removing gnome-software I have disabled downloading updates with the following command in the terminal

gsettings set org.gnome.software download-updates false

I haven't had a memory issue since then.

Comment 13 Jonathan 2018-12-15 00:41:26 UTC
I'm now also having the same issue with latest Fedora 29 (fully updated). Gnome-software was using 8gb of memory!

Comment 14 mikey 2018-12-31 11:29:31 UTC
Same.

Fedora 28.


  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                             
 3107 ***       20   0 3590412 1.820g  12776 S  81.2 47.3   9:31.95 gnome-software


journalctl -f /usr/bin/gnome-software
Dec 31 12:22:47 *** gnome-software[3107]: Only 8 apps for recent list, hiding
Dec 31 12:22:50 *** gnome-software[3107]: Failed to find one package for compiz-start.desktop, /usr/share/applications/compiz-start.desktop, [2]
Dec 31 12:23:00 *** gnome-software[3107]: Only 8 apps for recent list, hiding
Dec 31 12:23:11 *** gnome-software[3107]: Failed to find one package for compiz-start.desktop, /usr/share/applications/compiz-start.desktop, [2]
Dec 31 12:23:21 *** gnome-software[3107]: Only 8 apps for recent list, hiding
Dec 31 12:23:42 *** gnome-software[3107]: Only 8 apps for recent list, hiding
Dec 31 12:23:47 *** gnome-software[3107]: Failed to find one package for compiz-start.desktop, /usr/share/applications/compiz-start.desktop, [2]
Dec 31 12:23:57 *** gnome-software[3107]: Only 8 apps for recent list, hiding
Dec 31 12:24:02 *** gnome-software[3107]: Failed to find one package for compiz-start.desktop, /usr/share/applications/compiz-start.desktop, [2]
Dec 31 12:24:12 *** gnome-software[3107]: Only 8 apps for recent list, hiding

Comment 15 Radislav 2019-02-19 12:23:21 UTC
Same situation here. 

https://i.imgur.com/4iwXW45.png

Comment 16 pokorny.jan.94 2019-03-13 10:36:03 UTC
I am facing the same problem. After some while, the ram usage becomes too big, and the system becomes unresponsive. It is very unpleasant. Let me know if he can help with uncovering the cause.
gnome-software 3.30.6
john      8169  0.0 26.5 6726588 2136212 tty2  Sl+  bře12   1:09 /usr/bin/gnome-software --gapplication-service
Linux john-gem 4.20.13-200.fc29.x86_64 #1 SMP Wed Feb 27 19:42:55 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
bře 12 21:24:48 john-gem gnome-software[8169]: not GsPlugin error g-key-file-error-quark:1: Soubor klíče obsahuje „       https://www.franzoni.eu/keys/D401AB61.txt“, což není dvojice klíč-hodnota, skupina ani komentář
bře 12 21:24:48 john-gem gnome-software[8169]: not handling error failed for action refine: Soubor klíče obsahuje „       https://www.franzoni.eu/keys/D401AB61.txt“, což není dvojice klíč-hodnota, skupina ani komentář
bře 12 21:24:48 john-gem gnome-software[8169]: not GsPlugin error g-key-file-error-quark:1: Soubor klíče obsahuje „       https://www.franzoni.eu/keys/D401AB61.txt“, což není dvojice klíč-hodnota, skupina ani komentář
bře 12 21:24:48 john-gem gnome-software[8169]: not handling error failed for action refine: Soubor klíče obsahuje „       https://www.franzoni.eu/keys/D401AB61.txt“, což není dvojice klíč-hodnota, skupina ani komentář
bře 12 21:24:48 john-gem gnome-software[8169]: not GsPlugin error g-key-file-error-quark:1: Soubor klíče obsahuje „       https://www.franzoni.eu/keys/D401AB61.txt“, což není dvojice klíč-hodnota, skupina ani komentář
bře 12 21:24:48 john-gem gnome-software[8169]: not handling error failed for action refine: Soubor klíče obsahuje „       https://www.franzoni.eu/keys/D401AB61.txt“, což není dvojice klíč-hodnota, skupina ani komentář
bře 12 21:24:48 john-gem gnome-software[8169]: not GsPlugin error g-key-file-error-quark:1: Soubor klíče obsahuje „       https://www.franzoni.eu/keys/D401AB61.txt“, což není dvojice klíč-hodnota, skupina ani komentář
bře 12 21:24:48 john-gem gnome-software[8169]: not handling error failed for action refine: Soubor klíče obsahuje „       https://www.franzoni.eu/keys/D401AB61.txt“, což není dvojice klíč-hodnota, skupina ani komentář
bře 13 11:18:44 john-gem gnome-software[8169]: Only 6 apps for recent list, hiding
bře 13 11:18:45 john-gem gnome-software[8169]: Failed to find one package for vmware-workstation.desktop, /usr/share/applications/vmware-workstation.desktop, [0]

Comment 17 Ben Cotton 2019-05-02 19:16:53 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 18 Ben Cotton 2019-05-02 19:47:36 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 19 Ben Cotton 2019-05-28 23:46:44 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.