Bug 114436 - samba consumes all memory then hangs z390 vmachine.
samba consumes all memory then hangs z390 vmachine.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: samba (Show other bugs)
3.0
s390x Linux
medium Severity high
: ---
: ---
Assigned To: Jay Fenlason
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-27 22:21 EST by Shane R. Stixrud
Modified: 2014-08-31 19:25 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-07-22 07:01:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
My /etc/krb5.conf (677 bytes, text/plain)
2004-01-27 22:24 EST, Shane R. Stixrud
no flags Details
My smb.conf file (933 bytes, text/plain)
2004-01-27 22:25 EST, Shane R. Stixrud
no flags Details

  None (edit)
Description Shane R. Stixrud 2004-01-27 22:21:53 EST
Description of problem:
I am experiencing a situation where attempting to browse/connect to a 
z390 RHEL3 samba server causes the process to peg out at 100% cpu and 
begin to consume every increasing amounts of memory.  I have tested 
basically the same configuration on a x86 RHEL3 server without 
problem.  Once memory is fully consumed the vmachine hangs, which 
suggests the virtual memory killer is not working or is disabled.

Here is a snapshot from strace of the smb process:

munmap(0x100023fa000, 4096)             = 0
mremap(0x1000241c000, 718000128, 718004224, MREMAP_MAYMOVE) = 
0x1000241c000
open("/etc/passwd", O_RDONLY)           = 25
fcntl(25, F_GETFD)                      = 0
fcntl(25, F_SETFD, FD_CLOEXEC)          = 0
fstat(25, {st_mode=S_IFREG|0644, st_size=1492, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = 
0x100023fa000
read(25, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 1492
read(25, "", 4096)                      = 0
close(25)                               = 0
munmap(0x100023fa000, 4096)             = 0
mremap(0x1000241c000, 718004224, 718004224, MREMAP_MAYMOVE) = 
0x1000241c000
open("/etc/passwd", O_RDONLY)           = 25
fcntl(25, F_GETFD)                      = 0
fcntl(25, F_SETFD, FD_CLOEXEC)          = 0
fstat(25, {st_mode=S_IFREG|0644, st_size=1492, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = 
0x100023fa000
read(25, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 1492
read(25, "", 4096)                      = 0
close(25)           

The above repeats endlessly until all memory is consumed.

I have added the following to /etc/pam.d/system-auth:
auth        sufficient    /lib64/security/pam_winbind.so
account     required      /lib64/security/pam_winbind.so
session     required      /lib64/security/pam_mkhomedir.so 
skel=/etc/skel

I found it odd that /lib/ did not contain these libs and that I had 
to use /lib64/.

I am able to join this server to active directory and rpc without 
issue, and kinit _SEEMS_ to connect properly.

I have verified that the same /etc/samba/smb.conf and /etc/krb5.conf 
works on my x86 test server without problem but I can provide those 
if needed.  wbinfo -g and wbinfo -u reports fine, however "getent 
passwd" and "getent groups" reports the local machine accounts, then 
hangs when it gets to where it should report the active directory 
users and groups.

Version-Release number of selected component (if applicable):
samba-3.0.0-14.3E

How reproducible:
1.Configure samba as a windows 2000 active directory member server 
(with winbind and kerberos)
2.Attempt to browse or connect to a samba share
3.Check for smb processes that are consuming all cpu and growing in 
memory usage.

Steps to Reproduce:
1.Configure samba as a windows 2000 active directory member server 
(with winbind and kerberos)
2.Attempt to browse or connect to a samba share
3.Check for smb processes that are consuming all cpu and growing in 
memory usage.
  
Actual results:
Hung smb process for for each attempt at a connection.


Expected results:
Browse the server / mount the share


Additional info:
Comment 1 Shane R. Stixrud 2004-01-27 22:24:20 EST
Created attachment 97293 [details]
My /etc/krb5.conf
Comment 2 Shane R. Stixrud 2004-01-27 22:25:44 EST
Created attachment 97294 [details]
My smb.conf file
Comment 4 Jay Fenlason 2004-02-04 14:34:56 EST
I've built samba-3.0.2-2rc2.3E from the latest Samba release
candidate.   I've put i386 and s390x rpms at
http://people.redhat.com/fenlason/.samba  Please try them out and see
if the problem persists.  When the samba team releases 3.0.2 final, I
intend to build an errata candidate from it.
Comment 5 Shane R. Stixrud 2004-02-04 19:36:22 EST
It seems z390 (64bit) RHELv3 installs the s390x as well as the s390 
(no x) for some rpms.  samba-3.0.0-14.3E is one of those packages.  
Will this be an issue?

Thanks.
Comment 6 Shane R. Stixrud 2004-02-04 19:48:58 EST
Update, I went ahead and tested with these rpms.  The results are the 
same getent passwd/group still does not report NT 4.0 domain 
users/groups and/or active directory users/groups.  Trying to mount a 
share still hangs samba at 100% cpu per connection attempt until 
samba consumes all memory on the server at which point the server 
hangs.

One thing I find curious is that all the documentation I read 
suggests that when getent fails but wbinfo succeeds that the problem 
is most likely that I have not linked libwinbind.so to 
libnss_winbind.so in /lib.  Well libnnss_windbind.so exists but it is 
in /lib64 and not /lib could this be related?  I have confirmed that 
this problem only appears to affect our s390 servers (tested 3) and 
not our x86 servers (tested 2).
Comment 7 Shane R. Stixrud 2004-02-19 00:30:24 EST
The problem still exists in samba 3.0.2-EL errata.
Comment 8 Brock Organ 2004-03-09 11:43:07 EST
the problem is verified/reproduced in internal environment ...
Comment 9 Jay Fenlason 2004-03-16 15:46:03 EST
I've built test rpms from samba-3.0.2a with a patch to
libnss_winbind.so (and smbd) that fixes the problem in my test
environment.  I've put them up on
http://people.redhat.com/fenlason/.samba/  Can you please try them
out, and if they fix the problem, I'll start the process of building
"official" rpms.
Comment 10 Shane R. Stixrud 2004-03-20 17:29:45 EST
The new packages fix my issue, I look forward to seeing the offical 
packages released.

Thanks for the support.
Comment 17 Mark J. Cox (Product Security) 2004-07-22 07:01:03 EDT
An errata 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/RHSA-2004-259.html

Note You need to log in before you can comment on or make changes to this bug.