! 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 !
[4.10.2][Regression?] Right click causes xfdesktop to eat memory


Description Ronald 2013-06-02 10:43:33 CEST
Created attachment 5050 
Strace of xfdesktop while it's going nuts

I did some extensive digging to find out what is going on. But am not able to:

- Find exactly what is causing it.
- If another similar bug was already reported.

I run Xfce desktop on an Ubuntu 13.04 machine. The system is a simple UP system (AMD Athlon) which is 32bit.

The symptoms are the following: Xfdesktop is started by xfce4-session. Once it's done everything is ok. But, several events cause it to use high cpu and start it to eat memory. I managed to track down at least one of these causes:

- Right click the desktop (not the icons, just the desktop).

Apparently nothing happens, until you look at XFCE's system monitor. Here's some output with top.

Top before right click:
  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND                                             
23148 gebruike  20   0  127m  18m  11m R  18,7  3,6   0:05.64 xfdesktop                                           

Top after right click:
  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND                                             
23148 gebruike  20   0  191m  82m  11m R  32,9 16,4   0:30.15 xfdesktop                                           

This goes on, and does not ever seem to stop. I did a strace on xfdesktop (xfdesktop.log) to see what is happenning. After the click it seems that xfdesktop is starting to traverse the entire home directory looking for the file .hidden in *every single directory*. During this strace, there are 1893 of such occurences.

The home directory is a mountpoint with an EXT4 filesystem. It's mount options are:


Today, I decided to recompile the source and play with the compile flags. It turns out that, the *only* combination of flags:

--enable-file-icons --enable-desktop-icons

Exhibits this behaviour. Disabling either one of them makes all the icons disappear on the desktop. But it also makes this problem go away.
Comment 1 Ronald 2013-06-02 10:47:22 CEST
I forgot to mention that this is a barebone Ubuntu installation done with cli.seed (like cmd only). On top of that, I started to select packages to build a slim XFCE box.

That could be the cause why no one else stumbled on this.
Comment 2 Ronald 2013-06-10 21:58:41 CEST
Little update.

I reported this bug earlier on Launchpad: https://bugs.launchpad.net/ubuntu/+source/xfdesktop4/+bug/1173849

Another user claims he is suffering from this bug as well, I asked for confirmation.

Furthermore, I tried the following to make the system stop traversing:

- delete symlinks from desktop
- disable menu icons (Debian has a bug about that)
- move large directory's away from the desktop directory
- move back to all stock xfce/gnome themes

No dice.
Comment 3 Ronald 2013-07-18 22:41:40 CEST
Found the cause:


Right click makes xfdesktop search for templates. I guess this happens recursively. Despite my config error. This is not such a good idea...
Comment 4 Eric Koegel editbugs 2013-10-28 14:42:18 CET
Created attachment 5208 
Fix template sub-menu loading code

Indeed, the template code in xfdesktop was searching all subdirs and adding anything it could find. That was causing the issues you were experiencing. This patch should fix it. It applies to the master branch, I'll include one against 4.10.2 to make it easier to test with.
Comment 5 Eric Koegel editbugs 2013-10-28 14:43:59 CET
Created attachment 5209 
Fix template sub-menu loading code for 4.10

The is the same patch just applied to the 4.10.2 branch since there's a large number of changes from that to master. That way we can ensure it's isolated to just the template code.
Comment 6 Ronald 2013-10-29 07:49:29 CET
Testing would require some effort, I'm not known to building from source on Debian based systems.

Would you really want me to test?
Comment 7 Ronald 2013-10-29 07:49:44 CET
Ow, and thanks for the patch (!) =)
Comment 8 Eric Koegel editbugs 2013-10-29 17:02:15 CET
Well considering the current code had issues with how the templates were loaded and I doubt any user would want to map a large number of sub-folders, I'll push this code to master for testing: http://git.xfce.org/xfce/xfdesktop/commit/?id=11b1396b120e4719abf19ae37589a73f900b3ff7

Sorry it took so long to look into the issue. Thanks for the bug report it really helped narrow down potential issues in the code.
Comment 9 Eric Koegel editbugs 2014-03-03 09:00:21 CET
Fixed in master, marking resolved.

Bug #10138

Reported by:
Reported on: 2013-06-02
Last modified on: 2014-03-03


Eric Koegel
CC List:
3 users




Additional information