GNOME Bugzilla – Bug 765121
Memory leak in goa-daemon
Last modified: 2017-04-29 15:26:10 UTC
I'm using gnome-online-accounts with only 2 services: Last.fm and Google (Calendar, Contacts and Chat) After about 8 hours of uptime, goa-daemon is using 2.7GiB of memory.
I can confirm there is a memory leak (goa-daemon uses up to 4-5 GiB after a few hours). From what I can tell, it is related to the Last.fm account, as removing it "solved" the memory leak. Thanks in advance
Valgrind revealed a few leaks. I think what made this particularly worse was evolution-data-server (bug 773248 and bug 771547) very aggressively calling EnsureCredentials. There is code in goa-daemon to coalesce such calls to avoid overloading the network, but unfortunately, that code path was leaking.
Created attachment 342978 [details] [review] daemon: Don't leak the provider when coalescing EnsureCredential calls
Created attachment 342979 [details] [review] kerberos: Don't leak the return_key in sign_in_identity_sync
Created attachment 342980 [details] [review] daemon: Don't leak the list of providers in goa_daemon_init
Review of attachment 342978 [details] [review]: seems right. at some point we may want to switch over to using cleanup functions, but this seems better for now.
Review of attachment 342979 [details] [review]: eek, yup
Review of attachment 342980 [details] [review]: ++
Pushed to master, gnome-3-22 and gnome-3-20.
Thanks for the review, halfline!