Description of problem: For some reason, timedatex has been continuously using 100% CPU time. Reboots don't change anything to the problem. Since this makes my CPU fan a bit noisy, my only workaround is "sudo pkill timedatex". And nothing interesting can be found in the logs :( $ journalctl -u timedatex -b -- Logs begin at Sat 2016-07-02 18:08:31 CEST, end at Sun 2017-05-14 07:47:50 CEST. -- mai 14 07:45:41 goudurix systemd[1]: Starting System clock and RTC settings service... mai 14 07:45:41 goudurix systemd[1]: Started System clock and RTC settings service. Version-Release number of selected component (if applicable): - fedora 26 - linux 4.11.0-2.fc26.x86_64 - timedatex-0.4-3.fc26 How reproducible: After each reboot, at least on my system Steps to Reproduce: 1. Start the system Actual results: I see "100%" CPU time for timedatex in htop Expected results: Less CPU time?
Created attachment 1278721 [details] cpu use
Comment on attachment 1278721 [details] cpu use one core of the four - loads 100%. OS: Fedora 26 (Workstation Edition) x86_64 Kernel: 4.11.0-2.fc26.x86_64 Uptime: 42 mins Packages: 1841 Shell: bash 4.4.12 Resolution: 1920x1200 DE: GNOME WM: GNOME Shell WM Theme: Adwaita Theme: Numix [GTK2/3] Icons: Numix [GTK2/3] Terminal: gnome-terminal CPU: Intel i5-3570K (4) @ 4.200GHz GPU: Intel Ivybridge Desktop Memory: 2190MiB / 15733MiB
I confirm, same issue here
I can reproduce it. It seems it was caused by the update of the glib2 package to 2.52.2-1.fc26.
This leads to increased power consumption, because the intel technology does not work for lowering the frequency of the processor.
It seems this is related to https://bugzilla.gnome.org/show_bug.cgi?id=761102 and this commit should fix it https://git.gnome.org/browse/glib/commit/?id=9ba95e25b74adf8d62effeaf6567074ac932811c Here is a minimal reproducer from the timedatex code. It should exit when nothing happens for 30 seconds, but the g_timeout_add() call seems to cause g_main_context_iteration() to immediately return, creating an infinite loop. #include <glib.h> #include <glib/gstdio.h> static gboolean main_quit = FALSE; static gboolean stop_main_loop(gpointer user_data) { main_quit = TRUE; return TRUE; } int main(int argc, char **argv) { guint timeout_id = 0; int iter = 0; while (!main_quit) { timeout_id = g_timeout_add(30 * 1000, stop_main_loop, NULL); fprintf(stderr, "iteration %d\n", iter++); g_main_context_iteration(g_main_context_default(), TRUE); if (timeout_id) g_source_remove(timeout_id); timeout_id = 0; } return 0; }
Thanks, I've backported the upstream fix to glib2-2.52.2-2.fc26
glib2-2.52.2-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-27fbf57af3
glib2-2.52.2-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-27fbf57af3
glib2-2.52.2-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.
after update and reboot all working very well. Thanks for good job!
*** Bug 1451144 has been marked as a duplicate of this bug. ***
*** Bug 1451254 has been marked as a duplicate of this bug. ***
*** Bug 1452079 has been marked as a duplicate of this bug. ***
This issue has reappeared with glib2-2.54.3. It will be fixed in timedatex. See https://github.com/mlichvar/timedatex/issues/4 for more information.
It should be fixed in timedatex-0.5-2.fc27. Kalev, could you please submit a new F27 glib2+timedatex update?
(In reply to Miroslav Lichvar from comment #16) > It should be fixed in timedatex-0.5-2.fc27. > > Kalev, could you please submit a new F27 glib2+timedatex update? I don't see any update for timedatex in bodhi for fc27. Can you check https://koji.fedoraproject.org/koji/buildinfo?buildID=1015536 has been pushed for updates stable?
I can confirm that https://koji.fedoraproject.org/koji/buildinfo?buildID=1015536 solves 100% cpu usage on x86_64 on my laptop.
glib2-2.54.3-1.fc27 timedatex-0.5-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-4745a9bbeb
(In reply to Miroslav Lichvar from comment #16) > It should be fixed in timedatex-0.5-2.fc27. > > Kalev, could you please submit a new F27 glib2+timedatex update? Done! Thanks for fixing it, Miroslav.
The new timedatex update fixes the 100% CPU usage I was seeing on my desktops
glib2-2.54.3-1.fc27, timedatex-0.5-2.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-4745a9bbeb
glib2-2.54.3-2.fc27 timedatex-0.5-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-4745a9bbeb
glib2-2.54.3-2.fc27, timedatex-0.5-2.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-4745a9bbeb
glib2-2.54.3-2.fc27, timedatex-0.5-2.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.