Bug 167687

Summary: userdel allocate all system memory and then fail
Product: Red Hat Enterprise Linux 4 Reporter: Milan Kerslager <milan.kerslager>
Component: shadow-utilsAssignee: Peter Vrabec <pvrabec>
Status: CLOSED WORKSFORME QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0   
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: 2006-07-19 07:39:09 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
strace of infinite loop in 'userdel -r kp' none

Description Milan Kerslager 2005-09-07 07:36:39 UTC
In some cases 'userdel -r' allocate infinite amount of memory and then fail.
This is long standing bug as I saw this behavior years ago so I think it is not
introduced by recent patches.

# userdel -r kp &
# ps xaumOT | grep userde[l] (repeated)
root     20333 28.0 39.6 450484 406740 pts/1 -    09:34   0:06 userdel -r kp
root     20333 27.7 45.8 513536 469840 pts/1 -    09:34   0:07 userdel -r kp
root     20333 27.9 51.0 567848 524064 pts/1 -    09:34   0:08 userdel -r kp
...
malloc(664) failed
#

Comment 1 Milan Kerslager 2005-09-07 07:41:41 UTC
Created attachment 118542 [details]
strace of infinite loop in 'userdel -r kp'

The bug does not depend on '-r' switch.

Comment 2 Milan Kerslager 2005-09-07 07:46:49 UTC
Hm. When I manually deleted this user I found that there was no record in the
/etc/gshadow file. Maybe this was lost when the system has been moved to another
machine or so.

Comment 3 Peter Vrabec 2005-09-21 09:33:37 UTC
I can't reproduce it.

I deleted(userdel) user foo after group foo had been removed from /etc/gshadow
and I got "userdel: error removing shadow group entry" but user foo was removed
properly.

Comment 4 Peter Vrabec 2005-10-24 12:21:27 UTC
Did u have two lines begining with same group name in /etc/group?

example:
#/etc/group
groupa:x:998:user1,user2
groupa:x:998:user3,user4
#/etc/passwd
user4:x:1773:998::/wic/home/user4:/bin/bash

"$userdel user4" spin in infinite loop now.