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, 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 13:59:59 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:

Description Mike Patnode 2004-12-10 22:26:05 UTC
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 18:25:42 UTC
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 15:06:49 UTC
This patch is in RHEL4 glibc, so this bug is now RHEL3 only about the backport.

Comment 6 Jakub Jelinek 2004-12-23 21:17:20 UTC
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 14:00:00 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/RHSA-2005-256.html