Some events cause xfdesktop to hang with high cpu usage and eating memory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Xfce4 Desktop |
Unknown
|
Unknown
|
|||
xfdesktop4 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
During 12.10 I noticed that xfdesktop sometimes caused high cpu usage and started eating memory. The one likely cause was after an update with aptitude and wine starting a new prefix. If I'm not wrong, both actions modify the icon cache and menu entries.
What happens then is as follows: xfdesktop does not respond anymore. Icons are not repainted anymore. The xfdesktop process cannot be killed with SIGTERM, but only with SIGKILL. Furthermore, the process hogs the cpu to 100% and starts eating memory.
On Ubuntu 13.04 I found a reliable way to reproduce this: Right click the desktop. That's all.
An excerpt of top before the right click:
#####
top - 08:57:57 up 12:59, 2 users, load average: 1,54, 1,72, 1,58
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
%Cpu(s): 87,7 us, 11,0 sy, 0,0 ni, 0,0 id, 1,3 wa, 0,0 hi, 0,0 si, 0,0 st
KiB Mem: 507996 total, 479464 used, 28532 free, 11164 buffers
KiB Swap: 2097148 total, 326128 used, 1771020 free, 217280 cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1389 gebruike 20 0 110m 12m 7464 S 0,0 2,5 0:08.53 xfdesktop
#####
Now I right click and wait 30 seconds:
#####
top - 08:59:16 up 13:00, 2 users, load average: 1,61, 1,70, 1,59
Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie
%Cpu(s): 51,2 us, 12,5 sy, 0,0 ni, 0,0 id, 35,3 wa, 0,0 hi, 1,0 si, 0,0 st
KiB Mem: 507996 total, 499624 used, 8372 free, 25740 buffers
KiB Swap: 2097148 total, 326068 used, 1771080 free, 153816 cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1389 gebruike 20 0 198m 100m 7912 R 48,3 20,3 0:35.24 xfdesktop
#####
As you can see, it starts eating memory and using a lot of CPU for (apparently) nothing.
I installed this Ubuntu with cli.seed and then added all the other packages on top. Everything else seems to work fine, except this.
WIth lsof, I found out that thunar starts traversing the entire home directory of this system. E.g.
xfdesktop 5890 gebruiker 20r DIR 8,3 4096 787278 /home/gebruiker /Documenten/ Ronald/ Drakan/ Mountain World/Intro Level /Documenten/ Ronald/ Drakan/ Mountain World/Intro Level/Intro Objects.ssd
xfdesktop 5890 gebruiker 21r REG 8,3 37232 787284 /home/gebruiker
And it traverses towards *everything*, including my kernel source tree (where it stays for a while).