GNOME Bugzilla – Bug 793466
[evolution-source-registry] Empty .source file causes high CPU usage
Last modified: 2018-03-26 11:29:12 UTC
Immediately after boot, evolution-source-registry keeps consuming a whole CPU core. When killing it and running it from a terminal emulator, I get the same issue, and following output: $ LANG=C /usr/lib/evolution-data-server/evolution-source-registry (evolution-source-registry:4698): e-backend-WARNING **: collection_backend_load_resources: Data source is missing a [Data Source] group I'm using an up-to-date Arch Linux system, with evolution-data-server 3.26.5-1. Please, let me know if I can provide any more information. Thanks!
Thanks for a bug report. Does that runtime warning repeat on the console, or it is shown there just once, please? The best would be to find out what the source registry is trying to do. Could you install debuginfo package for evolution-data-server, then grab a backtrace of it when it'll be busy, like with this command, please? $ gdb --batch --ex "t a a bt" -pid=`pidof evolution-source-registry` &>bt.txt Please check the bt.txt for any private information, like passwords, email address, server addresses,... I usually search for "pass" at least (quotes for clarity only). Then maybe it's the false .source file about which the runtime warning claims causing the issue. I guess it's one of the files under: ~/.cache/evolution/sources/ The other place with the .source files is at: ~/.config/evolution/sources/ but according to the runtime warnings it's likely to be in the ~/.cache/. Please, do not delete that file, rather move it elsewhere for further investigation and remember which folder it was at. Ideally backup content of both folders before changing anything there, thus it'll be easier to investigate the cause later. There should be a corresponding .source file, of the same name as the folder, in ~/.config/evolution/sources/ which contains the information about the account it belongs to. By any chance, can this be related to bug #793450?
(In reply to Milan Crha from comment #1) > Thanks for a bug report. Does that runtime warning repeat on the console, or > it is shown there just once, please? It was a one time message. > > The best would be to find out what the source registry is trying to do. > Could you install debuginfo package for evolution-data-server, then grab a > backtrace of it when it'll be busy, like with this command, please? > > $ gdb --batch --ex "t a a bt" -pid=`pidof evolution-source-registry` > &>bt.txt > > Please check the bt.txt for any private information, like passwords, email > address, server addresses,... I usually search for "pass" at least (quotes > for clarity only). > > Then maybe it's the false .source file about which the runtime warning > claims causing the issue. I guess it's one of the files under: > > ~/.cache/evolution/sources/ I looked for suspicious .source files and found one empty file. I removed the file, restarted evolution-source-registry and the usage went back to normal. Creating any empty .source file under that path resumes the high CPU usage behavior after restart. It I don't know how the file got created in the first place. Is the name of the file relevant? It looks like a UUID. > The other place with the .source files is at: > > ~/.config/evolution/sources/ > > but according to the runtime warnings it's likely to be in the ~/.cache/. > Please, do not delete that file, rather move it elsewhere for further > investigation and remember which folder it was at. Ideally backup content of > both folders before changing anything there, thus it'll be easier to > investigate the cause later. > > There should be a corresponding .source file, of the same name as the > folder, in > ~/.config/evolution/sources/ > which contains the information about the account it belongs to. There was no file matching the empty one under ~/.config/evolution/sources/. > By any chance, can this be related to bug #793450? Seems like it. Thanks again!
(In reply to Davi from comment #2) > I looked for suspicious .source files and found one empty file. I removed > the file, restarted evolution-source-registry and the usage went back to > normal. Creating any empty .source file under that path resumes the high CPU > usage behavior after restart. It Nice, I can reproduce it with an empty file too. > I don't know how the file got created in the first place. Right, that's the main question. > Is the name of the file relevant? It looks like a UUID. Yes, it is a unique ID (of the form of UUID these days), which evolution(-data-server) code uses to uniquely address that .source (an ESource instance).
The busy loop was caused by the ESource trying to notify about its change, but it is skipped due to the ESource not being initialized yet, but this initialization didn't finish properly, due to the file content being wrong (as expected). I made two changes: a) do not even try to notify about changes when the ESource is not initialized b) remove such broken files from the disk, thus the folder is fine the next start. There is still opened the question how the empty file could be crated in the folder, but with the above changes it'll have minimal impact (unless some reproducer will be found). One reason could be when the source registry crashed in the middle of saving the .source file or anything like that. Created commit 59c43baa1 in eds master (3.27.91+)
*** Bug 793450 has been marked as a duplicate of this bug. ***
I came across this bug because I found this one #793450 I had the same issue, that evolution-source-registry ate 100% of a CPU. For me, reverting the following commit, solved the issue: https://git.gnome.org/browse/evolution-data-server/commit/?h=gnome-3-26&id=deade53c48a7ab49209e84c57736b8087373ac0f hth, Nicolas
(In reply to spammail from comment #6) > For me, reverting the following commit, solved the issue: You are right, that commit caused it, because it kept the ESource instance alive forever with the busy-loop on waiting for it to be initialized. The change from comment #4 corrects it.
*** Bug 793852 has been marked as a duplicate of this bug. ***
Due to multiple users have some leftover invalid .source files here and there (most likely 0-length) I decided to do one more 3.26 release, thus: Created commit 77fc0875b in eds gnome-3-26 (3.26.6+)