Bug 507706

Summary: runaway grpconv when parsing duplicate entries in /etc/group
Product: Red Hat Enterprise Linux 5 Reporter: Casey Dahlin <cdahlin>
Component: shadow-utilsAssignee: Peter Vrabec <pvrabec>
Status: CLOSED ERRATA QA Contact: BaseOS QE <qe-baseos-auto>
Severity: medium Docs Contact:
Priority: low    
Version: 5.3CC: james.leddy, mmalik, sgrubb, tao, tmraz, vanhoof
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 08:14:21 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:
Attachments:
Description Flags
duplicate entries patch none

Description Casey Dahlin 2009-06-23 20:24:17 UTC
Description of problem:
When there are duplicate entries for groups in /etc/group grpconv begins to take all memory and is eventually OOM-killed. This bug did not exist in RHEL 4

Version-Release number of selected component (if applicable):
authconfig-4.6.10-7.el4
authconfig-gtk-4.6.10-7.el4

How reproducible:
Always

Steps to reproduce:
1. Create 10 groups (g1 to g10) with groupadd and then create duplicate entries for these groups in /etc/group.
ex:- # grep g2 /etc/group
g2:x:2517:
g2:x:2517:

2. Run authconfig.
grpconv is consuming all the memory and oom-kill is called -

[root@dhcp7-150 ~]# time authconfig-tui

real    2m22.689s
user    1m44.832s
sys     0m14.545s

OOM Kill -
-----
Jun 18 05:54:10 dhcp7-150 kernel: 0 pages swap cached
Jun 18 05:54:10 dhcp7-150 kernel: Out of memory: Killed process 28224 (grpconv).
-----

Actual results:
grpconv is consuming all the memory and oom-kill is called.

Expected results:
An error message or some sort of sane failure mode that doesn't require emergency intervention by the kernel.

Comment 1 Tomas Mraz 2009-06-23 20:45:23 UTC
This belongs to shadow-utils as grpconv is part of this package.

Comment 2 Peter Vrabec 2009-06-29 14:31:12 UTC
Created attachment 349785 [details]
duplicate entries patch

Comment 3 Peter Vrabec 2009-06-29 14:31:50 UTC
I have updated the shadow-4.0.17-duplicateGroupEntries.patch. There was already another issue with duplicate entries, so patch is just extended to grpconv now. It transforms group -> gshadow successfully and creates only one entry in gshadow for >1 entries in group file. (last of duplicate entries is the reference one)

Comment 4 Peter Vrabec 2009-11-02 12:10:42 UTC
Why is this bug reported assigned to RHEL5? Shouldn't it be RHEL4? Because I don't see duplicateGroupEntries patch in RHEL4.

Comment 5 Casey Dahlin 2009-11-03 14:23:35 UTC
Looks like my report was wrong. The bug was in:
authconfig-5.3.21-5.el5

The cited versions are the last known working versions of the package.

Comment 6 Tomas Mraz 2009-11-03 14:30:27 UTC
authconfig just calls grpconv it does not contain the bug itself.

Comment 7 Casey Dahlin 2009-11-03 14:32:39 UTC
Right. At any rate, the bug was observed on EL5, and was specifically NOT seen on EL4

Comment 13 errata-xmlrpc 2010-03-30 08:14:21 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 therefore 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/RHBA-2010-0209.html

Comment 15 James M. Leddy 2010-11-19 15:14:42 UTC
*** Bug 655088 has been marked as a duplicate of this bug. ***