! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
PM plugin leaks memory
Status:
RESOLVED: INVALID
Product:
Xfce4-power-manager
Component:
General

Comments

Description Mukundan Ragavan 2015-12-17 22:54:40 CET
This issue is probably related to bug#11538.

Downstream users (Fedora 22 and 23) seem to be experiencing memory leak with xfpm-1.5.2.

Downstream bug report - https://bugzilla.redhat.com/show_bug.cgi?id=1241899


Comment 1 from the bug report linked - 

While running xfce4 desktop -  this xfce4-power-manager gets quite noticeable after a while in memory-eater hit-parade.

Wit just couple short uptime:
  509180  45752  24144 S   0,0  1,2   0:01.87 xfce4-power-man

now  after few minutes:
  520096  48168  26168 S   0,0  1,2   0:01.95 xfce4-power-man

and growing continuously....

From plain --debug log:

TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:441] power_manager_button_update_device_icon_and_details(): entering f
or /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 20, upower_icon battery-full-charged-symbo
lic

Valgrind seemes to be pointing to some 'dbus' code:

162,189 (880 direct, 161,309 indirect) bytes in 22 blocks are definitely lost in loss record 11,280 of 11,281
   at 0x4C2BC50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x7F5A809: g_malloc (gmem.c:97)
   by 0x7F71ED2: g_slice_alloc (gslice.c:1007)
   by 0x7F906BD: g_variant_alloc (gvariant-core.c:476)
   by 0x7F906BD: g_variant_new_from_children (gvariant-core.c:565)
   by 0x7F8D3EB: g_variant_builder_end (gvariant.c:3612)
   by 0x77E4EE5: parse_value_from_blob (gdbusmessage.c:1817)
   by 0x77E6FBB: g_dbus_message_new_from_blob (gdbusmessage.c:2144)
   by 0x77F153C: _g_dbus_worker_do_read_cb (gdbusprivate.c:718)
   by 0x7791718: g_task_return_now (gtask.c:1106)
   by 0x7791758: complete_in_idle_cb (gtask.c:1120)
   by 0x7F54C19: g_main_dispatch (gmain.c:3122)
   by 0x7F54C19: g_main_context_dispatch (gmain.c:3737)
   by 0x7F54FAF: g_main_context_iterate.isra.29 (gmain.c:3808)
   by 0x7F552D1: g_main_loop_run (gmain.c:4002)
   by 0x77EF2E5: gdbus_shared_thread_func (gdbusprivate.c:246)
   by 0x7F7C4E4: g_thread_proxy (gthread.c:764)
   by 0x8CAA609: start_thread (pthread_create.c:333)
   by 0x8FC76BC: clone (clone.S:109)



Version-Release number of selected component (if applicable):
xfce4-power-manager-1.5.2-1.fc23.x86_64

How reproducible:


Steps to Reproduce:
1. just running xfce4 desktop
Comment 1 Eric Koegel editbugs 2015-12-21 17:44:13 CET
Note: Since the trace doesn't ever show any of the xfpm sources, this looks like it might be a bug in gdbus see: https://bugzilla.gnome.org/show_bug.cgi?id=758641
Comment 2 Mukundan Ragavan 2016-02-23 02:47:03 CET
Looks like some other users see this on Fedora 23 - 

Here is one output from downstream bug report - 

========================

FWIW, I also see this. Running Fedora 23 on a laptop with 16 GB memory, xfce-power-manager is killed at least once a day (if the laptop is on):
[tingo@localhost ~]$ sudo cat /var/log/messages* | grep "Out of memory"
Feb 22 12:56:37 localhost kernel: Out of memory: Kill process 3637 (panel-21-power-) score 645 or sacrifice child
Feb 13 15:29:02 localhost kernel: Out of memory: Kill process 9509 (panel-16-power-) score 843 or sacrifice child
Feb 21 06:51:49 localhost kernel: Out of memory: Kill process 1643 (panel-21-power-) score 749 or sacrifice child

Details:
[tingo@localhost ~]$ lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID:	Fedora
Description:	Fedora release 23 (Twenty Three)
Release:	23
Codename:	TwentyThree
[tingo@localhost ~]$ uname -a
Linux localhost.localdomain 4.3.5-300.fc23.x86_64 #1 SMP Mon Feb 1 03:18:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

[tingo@localhost ~]$ sudo dnf list xfce4-power*
Last metadata expiration check performed 1:45:17 ago on Mon Feb 22 18:32:18 2016.
Installed Packages
xfce4-power-manager.x86_64                                           1.5.2-4.fc23                                            @updates

Is there any other info I could give that would help getting this bug fixed?
Comment 3 Mukundan Ragavan 2016-02-23 02:47:42 CET
Any suggestions on how to isolate this? what other information can I provide to identify any potential issues?

Thanks!
Comment 4 Eric Koegel editbugs 2016-02-23 18:30:46 CET
With that leak you'll either have to wait for a new glib release to hit Fedora or downgrade to xfpm 1.4.4. I suppose if you could live without the plugin, you could also just disable that for now... Not a lot of great options, sorry.
Comment 5 Kratzer Kevin 2016-03-08 06:53:15 CET
My power manager plugin reached 5GB memory usage after one week using Xubuntu 15.10 on a Surface Pro 3.
I've added a details to the Xubuntu bug tracker containing:
https://bugs.launchpad.net/xfce4-power-manager/+bug/1534963

There seems to be a report in the debian bug tracker as well:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778642

Thanks,

Kevin
Comment 6 unhammer+dill 2016-04-03 17:37:52 CEST
(In reply to Eric Koegel from comment #4)
> With that leak you'll either have to wait for a new glib release to hit
> Fedora or downgrade to xfpm 1.4.4. I suppose if you could live without the
> plugin, you could also just disable that for now... Not a lot of great
> options, sorry.

which glib release fixes it?
Comment 7 poma 2016-06-02 20:42:58 CEST
FTR: Upstream - Fedora 23 - fix a memory leak in glib2
Backport a patch to fix a memory leak during initialization in GDBusProxy
https://bugzilla.redhat.com/show_bug.cgi?id=1342253
Comment 8 Simon Steinbeiss editbugs 2019-04-28 00:03:56 CEST
I guess this was never a bug in xfpm panel plugin, but always in glib and it's fixed by now.

Bug #12367

Reported by:
Mukundan Ragavan
Reported on: 2015-12-17
Last modified on: 2019-04-28

People

Assignee:
Ali Abdallah
CC List:
5 users

Version

Attachments

Additional information