! 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 !
xfdesktop increases CPU to 100%
Status:
RESOLVED: WORKSFORME

Comments

Description Olivier Duchateau 2012-04-10 22:15:26 CEST
With Xfce 4.10pre1 (and even with xfdesktop 4.8.x) under FreeBSD, at starting session, it increases CPU to 100% (during 1 or 2 min).

There's "workaround", http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/x11-wm/xfce4-desktop/files/patch-src%3A%3Axfce-desktop-menu.c

This patch works with xfdesktop 4.9.2

Is it safe ? or not
Comment 1 Nick Schermer editbugs 2012-04-13 18:41:54 CEST
What happens if you use

g_timeout_add (250, _generate_menu_idled, desktop_menu);
Comment 2 Olivier Duchateau 2012-04-13 22:40:23 CEST
(In reply to comment #1)
> What happens if you use
> 
> g_timeout_add (250, _generate_menu_idled, desktop_menu);

It's better, CPU rises only to 12% (on overage).
Comment 3 Nick Schermer editbugs 2012-04-13 23:18:07 CEST
Created attachment 4318 
Don't recreate menu, but only reload it

Looks like the code could recurse, could you try this patch? And if it doesn't work post the dbg output.
Comment 4 Nick Schermer editbugs 2012-04-15 09:52:22 CEST
Any news about this? I landed the attached patch in pre2, because it is better anyway.
Comment 5 Olivier Duchateau 2012-04-15 11:54:58 CEST
With xfdesktop-4.9.3 CPU is still to 100%. I tested without this:

g_timeout_add (250, _generate_menu_idled, desktop_menu);

But I can.

Full log of when session starts (debug is enabled), http://avignu.tuxfamily.org/FreeBSD/xsession-errors
Comment 6 Nick Schermer editbugs 2012-04-15 13:27:23 CEST
Please attach the log, access denied.
Comment 7 Olivier Duchateau 2012-04-15 14:13:06 CEST
Created attachment 4324 
log of xfdesktop
Comment 8 Nick Schermer editbugs 2012-04-15 16:20:15 CEST
Mm not's not going to help much. I've pushed a patch to garcon master to print debugging about file reloading, that will give some more into what is going on here.
You could give it a shot and attach the output?
Comment 9 Olivier Duchateau 2012-04-15 20:23:57 CEST
Created attachment 4325 
Output of garcon and xfdesktop
Comment 10 Nick Schermer editbugs 2012-04-15 20:45:03 CEST
Mm interestingly, it looks like garcon receives G_FILE_MONITOR_EVENT_DELETED evens from the files ~/.config/menus/xfce-applications.menu and ~/.local/share/xfce-*.directory.

You don't have those files I think?
Comment 11 Nick Schermer editbugs 2012-04-15 21:01:04 CEST
Created attachment 4326 
Ignore delete events if the file causing the event is not used

I think we can work around this problem. Can you try the attached patch?
Comment 12 Olivier Duchateau 2012-04-15 23:03:49 CEST
Created attachment 4327 
Output with new patch, load CPU is better around 8%
Comment 13 Nick Schermer editbugs 2012-04-15 23:56:00 CEST
Created attachment 4328 
Ignore delete events if the file causing the event is not used, v2

A better patch that is null safe, but I think there is not much we can improve here. at least xfdesktop is not racing anymore, neither is garcon, but possibly the gio file monitor.
Comment 14 Olivier Duchateau 2012-04-16 19:08:21 CEST
Created attachment 4332 
Log with patch v2, when garcon and xfdesktop are 'debug' support enable, load CPU is around 5%
Comment 15 Nick Schermer editbugs 2012-04-17 21:45:27 CEST
Pushed a slightly modified version of the patch.

No I wonder, was the workaround a way to reduce the cpu usage or did it completely disappear? Because that would be strange..
Comment 16 Nick Schermer editbugs 2014-07-29 08:28:42 CEST
Old bug

Bug #8671

Reported by:
Olivier Duchateau
Reported on: 2012-04-10
Last modified on: 2014-07-29

People

Assignee:
Nick Schermer
CC List:
1 user

Version

Version:
0.1.12

Attachments

Additional information