Bug 167687 - userdel allocate all system memory and then fail
userdel allocate all system memory and then fail
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: shadow-utils (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Vrabec
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-07 03:36 EDT by Milan Kerslager
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-19 03:39:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Milan Kerslager 2005-09-07 03:36:39 EDT
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 03:41:41 EDT
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 03:46:49 EDT
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 05:33:37 EDT
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 08:21:27 EDT
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.