Bug 162130

Summary: winbindd, memory leak
Product: Red Hat Enterprise Linux 4 Reporter: Vasiliy Kotikov <vasiliy.kotikov>
Component: sambaAssignee: Guenther Deschner <gdeschner>
Status: CLOSED ERRATA QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: samba-bugs-list
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: https://bugzilla.samba.org/show_bug.cgi?id=2739
Whiteboard:
Fixed In Version: RHEA-2007-0698 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-15 16:14:12 UTC Type: ---
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
File contains krb5.conf, smb.conf and log records none

Description Vasiliy Kotikov 2005-06-30 06:44:44 UTC
Description of problem:
If samba is configured as "security = ADS" then winbindd begins to eat a memory
and then causes OOM-Killer to kill the process winbind, maybe then squid... and
others.

Version-Release number of selected component (if applicable):
Samba-3.0.10-1.4E, Samba-client-3.0.10-1.4E, Samba-common-3.0.10-1.4E,
krb5-libs-1.3.4-12,krb5-workstation-1.3.4-12

How reproducible:

Steps to Reproduce:
1.Configure samba as ADS against Win2K Domain (see smb.conf). 
2.Configure krb5 to get tickets on the Win2K Domain.
3.Make shares or do squid authentificate domain users using ntlm. 
4.If server has RAM 512Mb - wait for one day OOM-killer to work.
  
Actual results:
Everything works ok while there is a free memory. When winbindd process fills
all the memory (memory leak is proved by valgrind, OOM-Killer starts to
stop(kill) almost all mandatory processes even sshd can be killed.

Expected results:
no memory leak, stable work of samba with krb5

Additional info:
winbindd works ok if it is configured with security = RPC.
There are lots records in log file
"clikrb5.c:ads_cleanup_expired_creds(339) 
  ads_cleanup_expired_creds: krb5_cc_remove_cred failed, err Ccache function
not supported: not implemented"

Comment 1 Vasiliy Kotikov 2005-06-30 06:44:44 UTC
Created attachment 116161 [details]
File contains krb5.conf, smb.conf and log records

Comment 2 RHEL Program Management 2006-08-18 17:36:40 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Vasiliy Kotikov 2006-09-01 05:07:10 UTC
Hello! currently no problem appeared... 4.5

Comment 7 Vasiliy Kotikov 2006-09-01 09:29:26 UTC
Problem still exists:
current version of samba 3.0.10-1.4E.9
squid 2.5.STABLE6-3.4E.12
krb5 1.3.4-27



Comment 9 Simo Sorce 2007-03-05 18:57:33 UTC
Since we had coverity and other checkers running against samba we fixed tons of
leaks and other errors.
Upstream we have no reports of leaks in winbindd and that's a component used a
lot these days.
I am confident it is ok.
I will test it again once wrt this problem soon to be sure.

Comment 10 Vasiliy Kotikov 2007-03-06 11:03:38 UTC
I launched again on RHEL4 with
squidguard-1.2.0-2.1.EL4
squid-2.5.STABLE12-5.1E.14
samba-common-3.0.10-1.4E.11
samba-client-3.0.10-1.4E.11
samba-3.0.10-1.4E.11
pam_krb5-2.1.8-1
krb5-libs-1.3.4-27
krb5-workstation-1.3.4-27

and smb configured as ADS
on  2.6.9-42.ELsmp #1 SMP 

Results will or not be tomorrow :-)





Comment 11 Vasiliy Kotikov 2007-04-02 13:46:45 UTC
Hello!

After half of a month no mem leaks detected. It works!

ThanX

Comment 12 RHEL Program Management 2007-04-17 21:26:10 UTC
Although this bugzilla was approved for RHEL 4.5, we were unable
to resolve it in time to be included in the release.  Therefore
it is now proposed for RHEL 4.6.

Comment 13 RHEL Program Management 2007-05-09 11:17:38 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 14 Guenther Deschner 2007-07-05 14:28:53 UTC
Verified with 3.0.25b, there were in fact two major memleaks fixed (one with not
freeing an entire search result for users/groups from AD and the leakage of
expired krb5 creds, the later fixed with
http://websvn.samba.org/cgi-bin/viewcvs.cgi?rev=21240&view=rev)

Comment 17 errata-xmlrpc 2007-11-15 16:14:12 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2007-0698.html