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: noatime,nodev,errors=remount-ro,nosuid,data=journal 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.
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.
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.
Found the cause: XDG_TEMPLATES_DIR="$HOME" Right click makes xfdesktop search for templates. I guess this happens recursively. Despite my config error. This is not such a good idea...
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.
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.
Testing would require some effort, I'm not known to building from source on Debian based systems. Would you really want me to test?
Ow, and thanks for the patch (!) =)
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.
Fixed in master, marking resolved.