Bug 1046197

Summary: Leaking credentials, cursors, principals and GDateTime
Product: [Fedora] Fedora Reporter: Bojan Smojver <bojan>
Component: gnome-online-accountsAssignee: Debarshi Ray <debarshir>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 20CC: bnocera, debarshir, mike, phil.pishioneri
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gnome-online-accounts-3.10.3-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-21 09:35:24 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
valgrind run for one hour
none
kerberos memory leak fixes none

Description Bojan Smojver 2013-12-24 04:07:49 UTC
Description of problem:
$ top -b -p `pgrep goa-daemon` -n 1
top - 15:04:01 up 3 days, 20:36, 11 users,  load average: 0.05, 0.12, 0.13
Tasks:   1 total,   0 running,   1 sleeping,   0 stopped,   0 zombie
libnuma: Warning: /sys not mounted or invalid. Assuming one node: No such file or directory
%Cpu(s):  1.9 us,  0.2 sy,  0.0 ni, 97.8 id,  0.0 wa,  0.1 hi,  0.0 si,  0.0 st
KiB Mem:   3882364 total,  3450768 used,   431596 free,   346676 buffers
KiB Swap:  1048572 total,        0 used,  1048572 free,  1744832 cached

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 1241 bsmojver  20   0  581156 454204   8480 S   0.0 11.7   0:52.62 goa-daemon

Version-Release number of selected component (if applicable):
gnome-online-accounts-3.10.2-1.fc20.i686

How reproducible:
Use Gnome?

Steps to Reproduce:
1. Login to Gnome.
2. Wait.
3. Run above top.

Actual results:
Use 1/2 GB of RAM do not do anything.

Expected results:
Not use 1/2 GB RAM to not do anything?

Additional info:
I have no online accounts configure on this machine. Authentication is against AD (Kerberos/LDAP), with sssd.

Comment 1 Michael Cronenworth 2014-01-29 21:55:12 UTC
I'm seeing the same thing. I have no online accounts configured. Authentication against AD/sssd.

top:
 1342 mcronen+  20   0 2371952 1.733g  20204 S   0.0 22.2   1:46.81 goa-daemon

gnome-online-accounts-3.10.2-1.fc20.x86_64

Comment 2 Michael Cronenworth 2014-03-03 20:18:27 UTC
Created attachment 870108 [details]
valgrind run for one hour

I am attaching a valgrind log of running goa-accounts for one hour. After only one hour goa-daemon was leaking about 12 MB.

The largest leaks are caused by the kerberos code.

Comment 3 Michael Cronenworth 2014-03-13 20:14:14 UTC
Created attachment 874151 [details]
kerberos memory leak fixes

OK this is a trivial fix and I've gone ahead and created a simple diff patch for what's required to stop the leaks. A couple Kerberos calls didn't free their results and a few Glib date calls didn't (reliably) free their results.

Bastien/Mathias, this problem also effects git head. Do you want git patches and upstream bugs or is this simple enough you can push out fixes yourselves?

Comment 4 Debarshi Ray 2014-03-14 15:59:00 UTC
Michael, can you please attach your patch as 'git format-patch' to the upstream bug report: https://bugzilla.gnome.org/show_bug.cgi?id=726353 ?

That way we can properly attribute it to you. Thanks for the effort!

Comment 5 Michael Cronenworth 2014-03-17 15:45:11 UTC
Debarashi, could a F20 update now be spun?

Comment 6 Fedora Update System 2014-03-18 16:34:33 UTC
gnome-online-accounts-3.10.3-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/gnome-online-accounts-3.10.3-1.fc20

Comment 7 Fedora Update System 2014-03-19 08:47:12 UTC
Package gnome-online-accounts-3.10.3-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gnome-online-accounts-3.10.3-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-4061/gnome-online-accounts-3.10.3-1.fc20
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2014-03-21 09:35:24 UTC
gnome-online-accounts-3.10.3-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.