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 621157 - Memory leak in krb5-auth-dialog when ticket renewal is not acted upon for a while
Memory leak in krb5-auth-dialog when ticket renewal is not acted upon for a w...
Status: RESOLVED FIXED
Product: krb5-auth-dialog
Classification: Other
Component: general
0.15
Other Linux
: Normal normal
: ---
Assigned To: Christopher Aillon
krb5-auth-dialog-maint
Depends on:
Blocks:
 
 
Reported: 2010-06-09 23:18 UTC by Bojan Smojver
Modified: 2010-06-19 00:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bojan Smojver 2010-06-09 23:18:08 UTC
Description of problem:
Left my VM running overnight and my kerberos ticket expired. When I connected
back in the morning, krb5-auth-dialog was using 188 MB or RES memory.
Similarly, on another occasion, it shot up to 30+ MB of RES. On a system where
I don't do this (i.e. leave the session alone so that ticket expires), I get
around 10 MB of RES memory used and it never changes.

Version-Release number of selected component (if applicable):
0.15-1.fc13.i686

How reproducible:
When ticket expires and nobody act on it.

Steps to Reproduce:
1. Leave your session running and do not renew the ticket for a while by
providing the password to krb5-auth-dialog.

Actual results:
Memory leak.

Expected results:
Should not leak memory.

Additional info:
See: https://bugzilla.redhat.com/show_bug.cgi?id=597669

PS. Clocking 109 MB of RES memory on my VM right now. The ticket expired sometime during the night.
Comment 1 Guido Günther 2010-06-16 18:11:57 UTC
Could you attach your krb5.conf? I assume the ticket wasn't renewable?
Comment 2 Bojan Smojver 2010-06-16 21:55:40 UTC
Sanitized krb5.conf:
-------------------------
[logging]
 default = FILE:/var/log/krb5libs.log
 kdc = FILE:/var/log/krb5kdc.log
 admin_server = FILE:/var/log/kadmind.log

[libdefaults]
 ticket_lifetime = 10h
 renew_lifetime = 7days
 default_realm = REALM
 dns_lookup_kdc = false
# ccache_type = 2
 dns_lookup_realm = false
 default_etypes = DES-CBC-MD5
forwardable = true 

[realms]
 REALM = {
        admin_sever = tcp/adminserver:749
	kpasswd_server = kpasswdserver:464
	kdc = kdcserver
	RealmFlags = TcpSupported
 }

[domain_realm]
 .domain = REALM
 domain = REALM

[kdc]
 profile = /var/kerberos/krb5kdc/kdc.conf

[appdefaults]
   pam = {
   debug = false
   ticket_lifetime = 36000
   renew_lifetime = 36000
   forwardable = true
   krb4_convert = false
   ignore_afs = true
 }
-------------------------

The ticket expired overnight (it is the 17th here):
-------------------------
Default principal: bsmojver@REALM

Valid starting     Expires            Service principal
06/16/10 20:50:45  06/16/10 20:50:46  krbtgt/REALM@REALM
	renew until 06/16/10 20:50:46, Flags: FRIA
-------------------------

krb5-auth-dialog is using 79 MB or RES memory right now.
Comment 3 Guido Günther 2010-06-18 18:33:12 UTC
I could reproduced this with 

 kinit --renewable-life=15m --lifetime=6m 

and found several leaks. I've pushed the fixes for this to git so I'm closing this report. In case it doesn't fix your issues as well please reopen.

Mostly that's commit:

http://git.gnome.org/browse/krb5-auth-dialog/commit/?id=e91acf3273856f07a594403109ddc8edbdad651e
Comment 4 Bojan Smojver 2010-06-18 23:08:55 UTC
Thank you. I'll ask Fedora folks to apply and rebuild.

So, they just need that one commit, correct?
Comment 5 Guido Günther 2010-06-19 00:18:18 UTC
Unfortunately not. You'll need the commits from there on to HEAD - since we've been shifting files around a bit these won't apply easily. I'll do some more testing and will role 0.16 then.