Bug 142617 - [RHEL3] libc's getXXent and getXXbyYY are inefficient for large groups
[RHEL3] libc's getXXent and getXXbyYY are inefficient for large groups
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2004-12-10 17:26 EST by Mike Patnode
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-05-18 09:59:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
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-

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
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.


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