Bug 1420678

Summary: Don't leak the name_owner and result in dbus_proxy_reload_properties_sync
Product: [Fedora] Fedora Reporter: Stefan Assmann <sassmann>
Component: gnome-online-accountsAssignee: Debarshi Ray <debarshir>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 25CC: debarshir, jcapik, sassmann, udovdh
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: gnome-online-accounts-3.22.5-1.fc25 gnome-online-accounts-3.20.7-1.fc24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-12 21:54:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
full valgrind log
none
second valgrind log none

Description Stefan Assmann 2017-02-09 10:00:49 UTC
Description of problem:
Just checked what applications are consuming the most RAM on my machine and goa-daemon is the top on, although I'm not using any gnome online accounts at all.

Checking with top
  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 1925 sassmann  20   0 2400672 1,570g   1452 S   0,0 10,1   9:30.01 goa-daemon

Version-Release number of selected component (if applicable):
gnome-online-accounts-3.22.4-1.fc25.x86_64

Expected results:
goa-daemon should ideally consume a few megs of RAM, but not over 1GB.



Also is there any way to disable goa-daemon if you don't need it?

Comment 1 Debarshi Ray 2017-02-23 17:35:26 UTC
Would it be possible for you to let it run under Valgrind for a while and attach the logs?

Comment 2 Stefan Assmann 2017-02-23 17:40:31 UTC
can try, any special settings you want me to apply?

Comment 3 Stefan Assmann 2017-03-03 10:56:28 UTC
sassmann@w541:~ > valgrind --leak-check=yes /usr/libexec/goa-daemon
[...]
==6692== LEAK SUMMARY:
==6692==    definitely lost: 6,516,824 bytes in 283,335 blocks
==6692==    indirectly lost: 132,452,180 bytes in 4,674,664 blocks
==6692==      possibly lost: 20,748 bytes in 609 blocks
==6692==    still reachable: 260,911 bytes in 3,601 blocks
==6692==                       of which reachable via heuristic:
==6692==                         length64           : 3,008 bytes in 53 blocks
==6692==                         newarray           : 1,984 bytes in 44 blocks
==6692==         suppressed: 0 bytes in 0 blocks
==6692== Reachable blocks (those to which a pointer was found) are not shown.
==6692== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==6692==
==6692== For counts of detected and suppressed errors, rerun with: -v
==6692== ERROR SUMMARY: 53 errors from 53 contexts (suppressed: 0 from 0)

At that point goa-daemon already consumed 1,2GB of RAM.

Comment 4 Stefan Assmann 2017-03-03 10:57:31 UTC
Created attachment 1259485 [details]
full valgrind log

Comment 5 Debarshi Ray 2017-03-03 18:54:40 UTC
(In reply to Stefan Assmann from comment #3)

Thanks for those logs!

> sassmann@w541:~ > valgrind --leak-check=yes /usr/libexec/goa-daemon

Next time, it won't hurt to throw in --track-origins=yes with the -debuginfo sub-package installed.

I posted a patch on the upstream bug. I expect that it should cut the leak down by quite a bit.

(In reply to Stefan Assmann from comment #0)
> Description of problem:
> Just checked what applications are consuming the most RAM on my machine and
> goa-daemon is the top on, although I'm not using any gnome online accounts
> at all.

Do you happen to have a Kerberos ticket?

Comment 6 Stefan Assmann 2017-03-05 11:24:57 UTC
(In reply to Debarshi Ray from comment #5)
> (In reply to Stefan Assmann from comment #3)
> 
> Thanks for those logs!
> 
> > sassmann@w541:~ > valgrind --leak-check=yes /usr/libexec/goa-daemon
> 
> Next time, it won't hurt to throw in --track-origins=yes with the -debuginfo
> sub-package installed.

Actually I tried to install all required debuginfo with
# debuginfo-install gnome-online-accounts
if that doesn't catch all dependencies I'm not sure what package I should install manually.

 
> I posted a patch on the upstream bug. I expect that it should cut the leak
> down by quite a bit.

Thanks! Got a link to the patch so I can test it and run valgrind again?

> (In reply to Stefan Assmann from comment #0)
> > Description of problem:
> > Just checked what applications are consuming the most RAM on my machine and
> > goa-daemon is the top on, although I'm not using any gnome online accounts
> > at all.
> 
> Do you happen to have a Kerberos ticket?

Yes, indeed.

Comment 7 Debarshi Ray 2017-03-08 13:52:55 UTC
(In reply to Stefan Assmann from comment #6)
> (In reply to Debarshi Ray from comment #5)
>> Next time, it won't hurt to throw in --track-origins=yes with the -debuginfo
>> sub-package installed.
> 
> Actually I tried to install all required debuginfo with
> # debuginfo-install gnome-online-accounts
> if that doesn't catch all dependencies I'm not sure what package I should
> install manually.

That should have been enough. I don't know what went wrong.

> > I posted a patch on the upstream bug. I expect that it should cut the leak
> > down by quite a bit.
> 
> Thanks! Got a link to the patch so I can test it and run valgrind again?

It's on the upstream GNOME bug linked from this one:
https://bug779548.bugzilla-attachments.gnome.org/attachment.cgi?id=347162

>> Do you happen to have a Kerberos ticket?
> 
> Yes, indeed.

Ok. That means you are using gnome-online-accounts to some extent. I was worried that goa-daemon was silently chewing memory even when there were no accounts whatsoever.

Comment 8 Stefan Assmann 2017-03-08 15:56:00 UTC
You made me curious, what does gnome-online-accounts do when I kinit?
Running a version of gnome-online-accounts with your patch applied under valgrind now, let's see what happens.

Comment 9 Debarshi Ray 2017-03-08 17:06:38 UTC
(In reply to Stefan Assmann from comment #8)
> You made me curious, what does gnome-online-accounts do when I kinit?

It is primarily meant to act as a GUI counterpart of the krb5-workstation command line utilities. So, if you use it to get a Kerberos ticket, instead of kinit, and choose to save your password, it will try its best to ensure that you always have a ticket. If possible, it will renew the ticket, or it will get a new one.

That won't happen if you use kinit to get your ticket. However, goa-daemon will still detect it and show it in the UI so that its world view continues to match that of krb5-workstation's.

Comment 10 Stefan Assmann 2017-03-09 12:32:57 UTC
Created attachment 1261542 [details]
second valgrind log

New valgrind log with patched goa-daemon, now with proper debuginfo as well.

Comment 11 Fedora Update System 2017-03-10 18:55:14 UTC
gnome-online-accounts-3.22.5-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-fb14d710bf

Comment 12 Fedora Update System 2017-03-10 19:06:55 UTC
gnome-online-accounts-3.20.7-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-67391b57d7

Comment 13 Fedora Update System 2017-03-11 13:54:14 UTC
gnome-online-accounts-3.20.7-1.fc24 has been pushed to the Fedora 24 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-67391b57d7

Comment 14 Fedora Update System 2017-03-11 14:27:01 UTC
gnome-online-accounts-3.22.5-1.fc25 has been pushed to the Fedora 25 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-fb14d710bf

Comment 15 Fedora Update System 2017-03-12 21:54:04 UTC
gnome-online-accounts-3.22.5-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2017-03-13 23:52:07 UTC
gnome-online-accounts-3.20.7-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Debarshi Ray 2017-03-31 13:53:15 UTC
*** Bug 1269873 has been marked as a duplicate of this bug. ***