Bug 517816 - faillog -p takes forever if /var/log/faillog has gone huge sparse.
Summary: faillog -p takes forever if /var/log/faillog has gone huge sparse.
Keywords:
Status: CLOSED DUPLICATE of bug 473054
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: shadow-utils
Version: 5.4
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Vrabec
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On: 469702
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-17 10:48 UTC by Olivier Fourdan
Modified: 2013-03-04 02:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 469702
Environment:
Last Closed: 2009-11-02 12:33:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed patch (5.74 KB, patch)
2009-08-17 10:48 UTC, Olivier Fourdan
no flags Details | Diff

Description Olivier Fourdan 2009-08-17 10:48:18 UTC
Created attachment 357628 [details]
Proposed patch

+++ This bug was initially created as a clone of Bug #469702 +++

Escalated to Bugzilla from IssueTracker

--- Additional comment from mpoole on 2008-11-03 11:13:31 EDT ---

There is a bug with the print code in that is simply reads the whole file sequentially to meet the man page of printing in UID order. Since the output does not actually include the UID it is a little redundant stating or assuming UID order which therefore gives an optimal way of reworking the code.

* How reproducible:

Always.

* Steps to Reproduce:

1) Make sure nfsnobody has a very large uid:

  # grep nfsnobody /etc/passwd
  nfsnobody:x:4294967294:4294967294:Anonymous

2) Initialize the faillog file

  # faillog -m 3

3) Check the size of the faillog file (huge sparse file):

  # ls -l /var/log/faillog
  -rw-r--r-- 1 root root 137438953440 Aug 17 11:43 /var/log/faillog

4) Check for failures

  # faillog -a

Actual result

  faillog reads sequentially the huge sparse file and takes a very long time to complete.

Expected results

  faillog picks the right records in the sparse file and completes instantly.

Additional information

Attaching the patch from Martin Poole in BZ#469702 ported to shadow 4.0.17 for el5.

Note: the problem is also present in F11.

Comment 1 Peter Vrabec 2009-11-02 12:33:27 UTC

*** This bug has been marked as a duplicate of bug 473054 ***


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