Bug 167687 - userdel allocate all system memory and then fail
Summary: userdel allocate all system memory and then fail
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: shadow-utils
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Peter Vrabec
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-09-07 07:36 UTC by Milan Kerslager
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-07-19 07:39:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
strace of infinite loop in 'userdel -r kp' (108.15 KB, application/octet-stream)
2005-09-07 07:41 UTC, Milan Kerslager
no flags Details

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.



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