100% host cpu with gtk3
Hi Gerd,
When using the gtk frontend, it seems there is a busy loop in libgtk repeatedly calling recvmsg, causing 100% cpu on the main thread. This started to appear after I upgraded to Fedora 28. Is this a known problem?
Any hints on how to track it down?
Fam
Quoted 5 lines · Fam Zheng
Hi Gerd,
When using the gtk frontend, it seems there is a busy loop in libgtk repeatedly calling recvmsg, causing 100% cpu on the main thread. This started to appear after I upgraded to Fedora 28. Is this a known problem?
No, didn't saw this (but running rhel-7 on my workstation).
Quoted 1 line
Any hints on how to track it down?
perf top, maybe with with call graphs would be the first thing I would try ...
cheers,
Gerd
Quoted 7 lines · Fam Zheng
Hi Gerd,
When using the gtk frontend, it seems there is a busy loop in libgtk repeatedly calling recvmsg, causing 100% cpu on the main thread. This started to appear after I upgraded to Fedora 28. Is this a known problem?
Any hints on how to track it down?
GLib has systemtap probes registered in its dispatch code. These probes will include the name of the GSource. You could possibly use this to identify which GSource is firing too often.
eg in gmain.c in glib code there are these events to hook into:
TRACE (GLIB_MAIN_BEFORE_DISPATCH (g_source_get_name (source), source,
dispatch, callback, user_data));
need_destroy = !(* dispatch) (source, callback, user_data);
TRACE (GLIB_MAIN_AFTER_DISPATCH (g_source_get_name (source), source,
dispatch, need_destroy));Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|