Bug 142617 - [RHEL3] libc's getXXent and getXXbyYY are inefficient for large groups
Summary: [RHEL3] libc's getXXent and getXXbyYY are inefficient for large groups
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-12-10 22:26 UTC by Mike Patnode
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-05-18 13:59:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:256 0 high SHIPPED_LIVE Low: glibc security update 2005-05-18 04:00:00 UTC

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



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