Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 33282 - baselayout-1.8.6.12 - grpconv uses all mem and is OOM killed
Summary: baselayout-1.8.6.12 - grpconv uses all mem and is OOM killed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 40898 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-11 21:44 UTC by Matt Taylor
Modified: 2004-02-15 13:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
strace.gz (strace.gz,12.54 KB, application/x-gzip)
2003-11-16 18:12 UTC, Matt Taylor
Details
ltrace.gz (ltrace.gz,41.71 KB, application/x-gzip)
2003-11-16 18:13 UTC, Matt Taylor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Taylor 2003-11-11 21:44:03 UTC
Just updated baselayout from 1.8.6.11 to 1.8.6.12 and at the end it runs grpconv
which took up 512MB ram and 256MB swap and was then OOM killed.  It left
group.lock and gshadow.lock in /etc and changed the modified time on group but
made no other changes I can see.

Reproducible: Didn't try
Steps to Reproduce:
1.update baselayout
2.
3.

Actual Results:  
...
 * Removing invalid backup copies of critical config files...

 * Updating module dependencies...

/usr/sbin/ebuild.sh: line 1325: 32588 Terminated              /usr/sbin/grpconv

 * Please be sure to update all pending '._cfg*' files in /etc are updated,
 * else things might break at your next reboot!  You can use 'etc-update'
 * to accomplish this:
...

dmesg shows:
Out of Memory: Killed process 32588 (grpconv).

Expected Results:  
not use all my ram and bring the system to it's knees with a swap storm

Portage 2.0.49-r15 (default-1.0, gcc-2.95.3, glibc-2.2.5-r8, 2.4.20-gentoo-r8a)
=================================================================
System uname: 2.4.20-gentoo-r8a i686 AMD Athlon(tm) processor
Gentoo Base System version 1.4.3.12
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=i686 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=i686 -O3 -pipe"
DISTDIR="/mnt/linuxback/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs digest userpriv usersandbox strict"
GENTOO_MIRRORS="http://linux.oit.umass.edu/gentoo/gentoo
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/mnt/linuxback/portage"
PORTDIR_OVERLAY="/mnt/linuxback/portage-local"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="x86 oss 3dnow apm avi crypt cups jpeg libg++ mikmod mmx mpeg ncurses pdflib
spell truetype xml2 xmms xv berkdb bonobo cdr directfb esd gdbm ggi gif gnome
gnome-libs gpm gtk gtkhtml guile imlib libwww motif mozilla nls oggvorbis opengl
pam perl png python readline sdl slang snmp ssl svga tcltk tcpd tiff X -kde -qt
-arts -java dvd encode gtk2 -quicktime"
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-15 06:10:15 UTC
If you run it from console, does this still happens ?
Comment 2 Matt Taylor 2003-11-15 13:04:39 UTC
yup
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-16 15:10:01 UTC
Could you merge 'strace' and 'ltrace' and attach logs for both
of '[sl]trace -ff grpconv' ?
Comment 4 Matt Taylor 2003-11-16 18:12:34 UTC
Created attachment 20843 [details]
strace.gz

strace...once it gets into the brk(*) part it just keeps going incrementing
until it's killed.
Comment 5 Matt Taylor 2003-11-16 18:13:41 UTC
Created attachment 20844 [details]
ltrace.gz

ltrace loops...2 full loops and the start of a third are captured
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2003-12-14 10:24:15 UTC
Try to update to -r9 of glibc ?
Comment 7 Matt Taylor 2003-12-15 13:22:33 UTC
still does it w/ glibc-2.2.5-r9
Comment 8 Radek Podgorny 2004-01-02 11:22:34 UTC
Same here...
Comment 9 Bastian Schmitz 2004-02-09 00:31:29 UTC
from the grpconv manual page
...
BUGS
       Errors in the password or group files (such as invalid or duplicate entries) may
       cause these programs to loop forever or fail in other strange ways.  Please  run
       pwck  and  grpck  to correct any such errors before converting to or from shadow
       passwords or groups.
...

running grpck prior to grpconv fixes the problem for me
Comment 10 Matt Taylor 2004-02-09 11:05:48 UTC
grpck fixed it for me.  I had duplicate nogroup, sshd, and apache entries.
Comment 11 Carsten Lohrke (RETIRED) gentoo-dev 2004-02-09 15:50:07 UTC
*** Bug 40898 has been marked as a duplicate of this bug. ***
Comment 12 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-15 13:29:05 UTC
So basically this should fix it?:

--
Index: baselayout-1.8.6.13.ebuild
===================================================================
RCS file: /home/cvsroot/gentoo-x86/sys-apps/baselayout/baselayout-1.8.6.13.ebuild,v
retrieving revision 1.3
diff -u -r1.3 baselayout-1.8.6.13.ebuild
--- baselayout-1.8.6.13.ebuild  9 Feb 2004 04:12:24 -0000       1.3
+++ baselayout-1.8.6.13.ebuild  15 Feb 2004 21:28:28 -0000
@@ -703,9 +703,18 @@
        # Enable shadow groups (we need ROOT=/ here, as grpconv only
        # operate on / ...).
        if [ "${ROOT}" = "/" -a \
-            ! -f /etc/gshadow -a -x /usr/sbin/grpconv ]
+            ! -f /etc/gshadow -a -x /usr/sbin/grpck -a -x /usr/sbin/grpconv ]
        then
-               /usr/sbin/grpconv
+               /usr/sbin/grpck &>/dev/null
+               if [ "$?" -eq 0 ]
+               then
+                       /usr/sbin/grpconv
+               else
+                       echo
+                       ewarn "Running 'grpck' returned errors.  Please run it by hand, and then"
+                       ewarn "run 'grpconv' afterwards!"
+                       echo
+               fi
        fi
  
        # Simple Release version for testing of features that *should* be
--

Anyhow, commited to cvs.  Please reopen if there are any more issues.