After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794174 - 100% CPU usage since recent commits
100% CPU usage since recent commits
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: client+engine
master
Other Linux
: Normal normal
: ---
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-03-08 12:46 UTC by Cédric Bellegarde
Modified: 2018-04-07 00:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Possible fix for issue (18.25 KB, patch)
2018-03-09 01:16 UTC, Michael Gratton
none Details | Review

Description Cédric Bellegarde 2018-03-08 12:46:21 UTC
Here debug message:
 account_02:INBOX (open_count=2 remote_opened=true)...
 [deb] 13:44:18 0,033367 default: app-fill-window-operation.vala:40: Filling 7 messages in account_02:INBOX (open_count=2 remote_opened=true)...
 [deb] 13:44:18 0,032615 default: app-fill-window-operation.vala:40: Filling 7 messages in account_02:INBOX (open_count=2 remote_opened=true)...
...etc...

Does not happen with geary-git-r3472.2fde941b-1-x86_64.pkg.tar.xz
Happens with geary-git-r3493.5f60b188-1-x86_64.pkg.tar.xz
Comment 1 Cédric Bellegarde 2018-03-08 13:16:39 UTC
Can't bisect as many commits are in a broken state with my server: no connection possible.
Comment 2 Michael Gratton 2018-03-09 01:16:12 UTC
Created attachment 369476 [details] [review]
Possible fix for issue

Thanks for the report, does this patch fix the problem for you?
Comment 3 Federico Bruni 2018-03-15 15:47:05 UTC
I confirm the bug. My version is master~g5f60b188

Mike, I cannot apply your patch. It's not based on master branch, right?

[geary (master=)]$ git am 0001-Don-t-use-the-database-for-internal-ConversationMoni.patch
Applying: Don't use the database for internal ConversationMonitor bookkeeping.
error: test/engine/api/geary-folder-mock.vala: does not exist in index
Patch failed at 0001 Don't use the database for internal ConversationMonitor bookkeeping.
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
[geary (master|AM 1/1=)]$
Comment 4 Federico Bruni 2018-03-22 13:00:38 UTC
Mike, can you send a revised patch?
Comment 5 Michael Gratton 2018-03-24 03:16:41 UTC
Ah, sorry about that. That patch was mixed up with code to improve unit tests.

I've just pushed the whole lot to the branch wip/794174-conversation-monitor-max-cpu, can you try building that and let me know if it fixes the 100% cpu issue?
Comment 6 Federico Bruni 2018-03-26 08:21:40 UTC
I've tested that branch and it seems to fix it.

I could reproduce the CPU issue just by changing to some folder/label not synced yet. The spinning wheel used to spin for a long time while CPU reached 100% or even 200%.
Now the wheel spins for just a little and the CPU reaches 30/50% maximum at first and then goes down.

I think you can merge it. Thanks!
Comment 7 Michael Gratton 2018-04-07 00:06:43 UTC
Fixed pushed to master as commit 2149f74. Thanks for testing it out, Federico.