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 766547 - Geary RAM usage keeps growing as app syncs emails
Geary RAM usage keeps growing as app syncs emails
Status: RESOLVED INCOMPLETE
Product: geary
Classification: Other
Component: general
0.11.x
Other Linux
: Normal normal
: ---
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-17 05:50 UTC by Britt Yazel
Modified: 2018-04-10 06:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
output of geary -d (83.04 KB, text/plain)
2016-05-17 16:20 UTC, Britt Yazel
  Details
Patch to get some more debugging info (1.24 KB, patch)
2016-06-05 11:33 UTC, Michael Gratton
none Details | Review

Description Britt Yazel 2016-05-17 05:50:08 UTC
As geary is open and syncing emails it consistently grows in its memory usage. When initially adding accounts the ram usage increased to upwards of 500MB on one of my computers, and I saw it reach a peak of 600MB on another. Further the app doesn't seem to release these resources during the life of the application.

Once rebooting the application Geary usually starts its life around 80-90MB, but as I open folders that have unloaded emails, or I scroll to force updating of emails, the app usage grows continuously, while again not releasing the resources.

The initial import is when the memory usage is the worst, during a normal session (after initial mass import) I have gotten it up to 170MB, and over 30 min of letting it sit open idle the ram usage only dropped by ~5MB.

Note* I didn't test after the initial account adding whether or not the RAM usage would slowly drop. Instead after it got to 600MB I killed the app and reopened it, at which point the app was only using ~80MB.
Comment 1 Britt Yazel 2016-05-17 05:57:28 UTC
Letting it sit open, the app is now at 305MB, and was sitting at 9% CPU usage. I am assuming it is syncing still,
Comment 2 Britt Yazel 2016-05-17 06:11:12 UTC
15 min later the app is now at 340MB just sitting idle
Comment 3 Michael Gratton 2016-05-17 06:13:38 UTC
If you start geary with "-d", let it do the initial sync (this may take a few minutes), what does it report it is doing when idle?
Comment 4 Britt Yazel 2016-05-17 06:20:09 UTC
It just continuously outputs these four lines:

 [deb] 23:19:24 7.065652 imap-client-session-manager.vala:525: Checking if IMAP host imap.gmail.com/default:993 reachable...
 [deb] 23:19:24 0.000109 imap-client-session-manager.vala:525: Checking if IMAP host imap.gmail.com/default:993 reachable...
 [msg] 23:19:24 0.000162 imap-client-session-manager.vala:536: IMAP host imap.gmail.com/default:993 considered reachable
 [msg] 23:19:24 0.000038 imap-client-session-manager.vala:536: IMAP host imap.gmail.com/default:993 considered reachable
Comment 5 Michael Gratton 2016-05-17 10:37:14 UTC
Oh, that's weird. You aren't having any network connectivity issues, I assume? Can you run Geary with the command "geary -d | tee geary.out" until it starts doing that, quit the app, remove any personal info from the geary.out file, and post it here?
Comment 6 Britt Yazel 2016-05-17 16:20:15 UTC
Nope I wasn't having network connection issues. I have the output, let me post it real quick
Comment 7 Britt Yazel 2016-05-17 16:20:43 UTC
Created attachment 328090 [details]
output of geary -d

Here is the output of geary -d scrubbed for my personal info
Comment 8 Michael Gratton 2016-06-05 11:33:40 UTC
Created attachment 329150 [details] [review]
Patch to get some more debugging info

Britt, can you please try rebuilding Geary with the attached patch applied to the source tree beforehand, then attaching a similar log. This will provide a bit of extra detail about what's happening with the network. Let me know if you need a hand doing that. Ta!
Comment 9 Michael Gratton 2016-06-05 11:34:20 UTC
Maybe related to Bug 713134, since both relate to GMail and high CPU utilisation when idle.
Comment 10 Britt Yazel 2016-06-07 17:19:31 UTC
Yes, when I got a free moment I will rebuild with the patch
Comment 11 Michael Gratton 2016-12-14 14:15:29 UTC
Just a quick update, there's some investigation going on about the repeated "Checking if IMAP host ... reachable" debug output over in Bug 776042. This may be a glib issue.

Also, a memory leak in glib related to this was fixed back in July: Bug 766933. This was released in glib 2.50, can you try upgrading to that and let me know if it resolves the memory leak you're seeing here?
Comment 12 Michael Gratton 2017-10-26 01:07:32 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!
Comment 13 Michael Gratton 2018-04-10 06:19:27 UTC
Just FYI, this could be caused by a combination of Bug 778288 and . The former has been mitigated by work going on the master branch since 0.12 was released, so this situation may well improve substantially with that. I'd like to track down and fix the latter for 0.13 as well.
Comment 14 Michael Gratton 2018-04-10 06:20:30 UTC
Err, I mean "... a combination of Bug 778288 and Bug 794995."