Bug 142617

Summary: [RHEL3] libc's getXXent and getXXbyYY are inefficient for large groups
Product: Red Hat Enterprise Linux 3 Reporter: Mike Patnode <mike.patnode>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: drepper.fsp, roland
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-05-18 09:59:59 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Mike Patnode 2004-12-10 17:26:05 EST
Description of problem:  The getent utility starts off with a buffer size of 1K 
when doing queries.  If the group is larger than 1K, nss returns an ERANGE and 
the getent routine increases the buffer by 1K and tries again.  Very large 
groups (1000's or users) can cause many round trips between libc and the nss 
module while it's trying to resize the buffer.  

Version-Release number of selected component (if applicable): glibc-common-
2.3.2-95.27

How reproducible: Every time.

Steps to Reproduce:
1. Create a large ldap group (10000 users)
2. run "getent group biggroup"
3. wait....
  
Actual results: It's very slow

Expected results: It should only be somewhat slow.

Additional info: The number of round trips could be greatly reduced if getent 
doubled the buffer everytime, rather than increasing by only 1K.
Comment 3 Jakub Jelinek 2004-12-14 13:25:42 EST
Should be fixed in glibc-2.3.3-91 and above in rawhide and hopefully will make
it into RHEL4 glibc too.
For RHEL3 this is maybe U5 material.
Comment 5 Jakub Jelinek 2004-12-17 10:06:49 EST
This patch is in RHEL4 glibc, so this bug is now RHEL3 only about the backport.
Comment 6 Jakub Jelinek 2004-12-23 16:17:20 EST
Fix added to glibc-2.3.2-95.31, for the time being available from
ftp://people.redhat.com/jakub/glibc/2.3.2-95.31/
Comment 7 Tim Powers 2005-05-18 10:00:00 EDT
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/RHSA-2005-256.html