Apparent Xfce Power manager memory leak in Xubuntu Xenial daily

Bug #1534963 reported by Doc Kelley
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Xfce4 Power Manager
Invalid
Medium
Xubuntu Xfce Daily Builds
New
Undecided
Unassigned
xfce4-power-manager (Debian)
Incomplete
Unknown
xfce4-power-manager (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I'm running the 20160115 daily xubuntu build, xenial-desktop-amd64, live from a usb drive. The Xfce4-power-manager package (version 1.4.4-4ubuntu2) seems to have a memory leak, consuming all 4GB of RAM when running for more than an hour on a Core i3 notebook (Acer E5-471 with a Sanyo AL14A32 battery). Xfce Power Manager settings are at default.

I boot with AC power connected, and the task memory starts growing immediately. It stops increasing and remains constant, when I unplug AC power. When I boot and run from battery, the problem does not appear: the task uses about 17MB and is steady.

I've never seen anything like this in previous xubuntu releases.

Task Manager reports the task as
"/usr/lib/x86_64-linux-gnu/xfce4/panel/wrapper-1.0 /usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libxfce4powermanager.so 5 8388654 power-manager-plugin Power Manager Plugin Display the battery levels of your devices..."

Top Output:
============================================
Tasks: 205 total, 2 running, 203 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.7 us, 0.3 sy, 0.0 ni, 98.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 97.5/3968004 [|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ]
KiB Swap: 10.9

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 1848 xubuntu 20 0 3904128 3.190g 6640 S 3.0 84.3 5:30.16 panel-5-power-m
 3273 xubuntu 20 0 312640 16008 10220 S 3.0 0.4 9:00.46 xfce4-taskmanag
   43 root 20 0 0 0 0 R 0.7 0.0 1:01.17 kworker/0:1
 1362 message+ 20 0 44196 3160 2044 S 0.7 0.1 1:45.51 dbus-daemon
 1702 root 20 0 348824 4396 3680 S 0.7 0.1 0:55.97 upowerd
 1386 root 20 0 173512 3432 3272 S 0.3 0.1 0:02.84 thermald
 1461 root 20 0 274492 38212 26664 S 0.3 1.0 4:35.72 Xorg
 1696 xubuntu 20 0 328484 8568 5692 S 0.3 0.2 0:12.63 xfce4-power-man
    1 root 20 0 119832 3632 2800 S 0.0 0.1 0:11.43 systemd
============================================

Tags: bot-comment
Revision history for this message
In , No Name Dot C (nonamedotc) wrote :

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

Revision history for this message
In , Eric Koegel (eric-koegel) wrote :

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

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1534963/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Doc Kelley (kelley-3)
affects: ubuntu → xfce4-power-manager (Ubuntu)
Revision history for this message
Doc Kelley (kelley-3) wrote :

Bugs exists when installed as well as running from live image.

Revision history for this message
In , No Name Dot C (nonamedotc) wrote :

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?

Revision history for this message
In , No Name Dot C (nonamedotc) wrote :

Any suggestions on how to isolate this? what other information can I provide to identify any potential issues?

Thanks!

Revision history for this message
In , Eric Koegel (eric-koegel) wrote :

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.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xfce4-power-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Kevin Kratzer (kratzer-kevin) wrote :

I'm experiencing the same for Xubuntu 15.10 on a Surface Pro 3

uptime
> 09:59:00 up 7 days, 19:29, 6 users, load average: 0.12, 0.26, 0.24

ps auxww | egrep 1605\|USER
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> ****** 1605 0.0 14.3 4991276 1158892 ? Sl 2月29 8:56 /usr/lib/x86_64-linux-gnu/xfce4/panel/wrapper-1.0 /usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libxfce4powermanager.so 5 23068718 power-manager-plugin Power Manager Plugin Display the battery levels of your devices and control the brightness of your display

So after 7 days the process
- VSZ is 4991 megabytes
- RSS is 1187 megabytes

free -m
> total used free shared buffers cached
> Mem: 7889 7772 117 494 460 1720
> -/+ buffers/cache: 5591 2298
> Swap: 8099 5083 3015

kill 1605

free -m
> total used free shared buffers cached
> Mem: 7889 6493 1396 468 460 1695
> -/+ buffers/cache: 4337 3552
> Swap: 8099 1602 6496

apt-cache policy xfce4-power-manager-plugins
> xfce4-power-manager-plugins:
> Installed: 1.4.4-4ubuntu1
> Candidate: 1.4.4-4ubuntu1
> Version table:
> *** 1.4.4-4ubuntu1 0
> 500 http://jp.archive.ubuntu.com/ubuntu/ wily/universe amd64 Packages
> 100 /var/lib/dpkg/status

I've attached the result of
apport-cli -f -p <package name> --save bug.apport
(after killing the plugin)

I've also found a debian bug report similar to this:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778642

Thanks,

Kevin

Changed in xfce4-power-manager (Debian):
status: Unknown → Incomplete
Revision history for this message
In , Kevin Kratzer (kratzer-kevin) wrote :

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

Revision history for this message
Dan Garland (m-dan-l) wrote :

+1

Revision history for this message
In , Kevin Brubeck Unhammer (unhammer) wrote :

(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?

Revision history for this message
Kevin Kratzer (kratzer-kevin) wrote :

Seems to be better in in 16.04.

uptime
> 17:01:08 up 11 days, 6:22, 3 users, load average: 0.31, 0.35, 0.23

ps auxww | egrep 1806\|USER
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> ****** 1806 0.0 0.1 321744 15172 ? Sl 4月28 1:30 /usr/lib/x86_64-linux-gnu/xfce4/panel/wrapper-1.0 /usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libxfce4powermanager.so 6 18874413 power-manager-plugin Power Manager Plugin Display the battery levels of your devices and control the brightness of your display

apt-cache policy xfce4-power-manager-plugins
> xfce4-power-manager-plugins:
> Installed: 1.4.4-4ubuntu2
> Candidate: 1.4.4-4ubuntu2
> Version table:
> *** 1.4.4-4ubuntu2 500
> 500 http://jp.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
> 100 /var/lib/dpkg/status

uname -r
> 4.4.0-21-generic

Revision history for this message
In , Pomidorabelisima (pomidorabelisima) wrote :

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

Revision history for this message
Theo Linkspfeifer (lastonestanding) wrote :

Marking as fixed then.

If you still encounter this issue, please open a new report.

Changed in xfce4-power-manager (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
In , Simon Steinbeiß (ochosi) wrote :

I guess this was never a bug in xfpm panel plugin, but always in glib and it's fixed by now.

Changed in xfce4-power-manager:
importance: Unknown → Medium
status: Unknown → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.