Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 275532 - portage-2.2_rc33 depclean crashes with cannot allocate memory.
Summary: portage-2.2_rc33 depclean crashes with cannot allocate memory.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 210077
  Show dependency tree
 
Reported: 2009-06-26 20:23 UTC by Chad A. Simmons
Modified: 2010-09-22 04:26 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chad A. Simmons 2009-06-26 20:23:48 UTC
I am trying to remove kde 3.5 from my system. I am running
emerge --depclean @kde-3.5
cciechad@chadgentoo ~ $ sudo emerge --depclean @kde-3.5

Calculating dependencies... done!
>>> Checking for lib consumers...
>>> Assigning files to packages...

 kde-base/kpersonalizer
    selected: 3.5.10   
   protected: none     
     omitted: none     

 kde-base/kdeprint
    selected: 3.5.10 
   protected: none   
     omitted: none   

 kde-base/khotkeys
    selected: 3.5.10 
   protected: none   
     omitted: 4.2.4  

 kde-base/kdesu
    selected: 3.5.10 
   protected: none   
     omitted: 4.2.4  

 kde-base/kdebase-kioslaves
    selected: 3.5.10-r1    
   protected: none         
     omitted: 4.2.4        

 kde-base/kooka
    selected: 3.5.10 
   protected: none   
     omitted: none   

 kde-base/ksplashml
    selected: 3.5.10 
   protected: none   
     omitted: none   

 kde-base/kfind
    selected: 3.5.10 
   protected: none   
     omitted: 4.2.4  

 kde-base/kdesktop
    selected: 3.5.10 
   protected: none   
     omitted: none   

 kde-base/kicker
    selected: 3.5.10-r1 
   protected: none      
     omitted: none      

 kde-base/kcminit
    selected: 3.5.10 
   protected: none   
     omitted: 4.2.4  

 kde-base/kghostview
    selected: 3.5.10 
   protected: none   
     omitted: none   

 kde-base/libkscan
    selected: 3.5.10 
   protected: none   
     omitted: none   

 kde-base/kcheckpass
    selected: 3.5.10 
   protected: none   
     omitted: 4.2.4  

 kde-base/kmenuedit
    selected: 3.5.10 
   protected: none   
     omitted: none   

 kde-base/kdialog
    selected: 3.5.10 
   protected: none   
     omitted: 4.2.4  

 kde-base/libkonq
    selected: 3.5.10 
   protected: none   
     omitted: 4.2.4  

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...             
>>> Unmerging in: 5 4 3 2 1             
>>> Unmerging kde-base/kpersonalizer-3.5.10...
!!! Error extracting saved environment: '/var/db/pkg/kde-base/kpersonalizer-3.5.10/environment.bz2'
 * The 'prerm' phase of the 'kde-base/kpersonalizer-3.5.10' package has                            
 * failed with exit value -1.                                                                      
 *                                                                                                 
 * The problem occurred while executing the ebuild file named                                      
 * 'kpersonalizer-3.5.10.ebuild' located in the '/var/db/pkg/kde-                                  
 * base/kpersonalizer-3.5.10' directory. If necessary, manually remove the                         
 * environment.bz2 file and/or the ebuild file located in that directory.                          
 *                                                                                                 
 * Removal of the environment.bz2 file is preferred since it may allow the                         
 * removal phases to execute successfully. The ebuild will be sourced and                          
 * the eclasses from the current portage tree will be used when necessary.                         
 * Removal of the ebuild file will cause the pkg_prerm() and pkg_postrm()                          
 * removal phases to be skipped entirely.                                                          
Traceback (most recent call last):                                                                 
  File "/usr/bin/emerge", line 40, in <module>
    retval = _emerge.emerge_main()
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 16242, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 14072, in action_uninstall
    opts, action, valid_atoms, spinner)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 14723, in action_depclean
    ldpath_mtimes, ordered=ordered)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 12367, in unmerge
    scheduler=scheduler)
  File "/usr/lib64/portage/pym/portage/__init__.py", line 6793, in unmerge
    ldpath_mtimes=ldpath_mtimes)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 2045, in unmerge
    vartree=self.vartree)
  File "/usr/lib64/portage/pym/portage/__init__.py", line 6275, in doebuild
    fd_pipes=fd_pipes, returnpid=returnpid)
  File "/usr/lib64/portage/pym/portage/__init__.py", line 3395, in spawn
    _create_pty_or_pipe(copy_term_size=fd_pipes_orig[1])
  File "/usr/lib64/portage/pym/portage/__init__.py", line 3303, in _create_pty_or_pipe
    set_term_size(rows, columns, slave_fd)
  File "/usr/lib64/portage/pym/portage/output.py", line 422, in set_term_size
    spawn(cmd, env=os.environ, fd_pipes={0:fd})
  File "/usr/lib64/portage/pym/portage/process.py", line 225, in spawn
    pid = os.fork()
OSError: [Errno 12] Cannot allocate memory

This works correctly if I take the list depclean generates and just do emerge -C against the packages listed.

Reproducible: Always

Steps to Reproduce:
1. emerge --depclean @kde-3.5
2. Fail
3.

Actual Results:  
Crash

Expected Results:  
Unmerge kde3.5 deps

emerge --info
Portage 2.2_rc33 (default/linux/amd64/2008.0/desktop, gcc-4.3.3, glibc-2.10.1-r0, 2.6.30-gentoo-r1 x86_64)                                                                                              
=================================================================                                   
System uname: Linux-2.6.30-gentoo-r1-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4400+-with-gentoo-2.0.1                                                                                            
Timestamp of tree: Fri, 26 Jun 2009 13:30:01 +0000                                                  
distcc 3.1 x86_64-pc-linux-gnu [disabled]                                                           
ccache version 2.4 [disabled]                                                                       
app-shells/bash:     4.0_p24                                                                        
dev-java/java-config: 1.3.7-r1, 2.1.8-r1                                                            
dev-lang/python:     2.4.6, 2.5.4-r3, 2.6.2-r1                                                      
dev-python/pycrypto: 2.0.1-r8                                                                       
dev-util/ccache:     2.4-r8                                                                         
dev-util/cmake:      2.6.4                                                                          
dev-util/confcache:  0.4.2-r1                                                                       
sys-apps/baselayout: 2.0.1                                                                          
sys-apps/openrc:     0.4.3-r3                                                                       
sys-apps/sandbox:    2.0                                                                            
sys-devel/autoconf:  2.13, 2.63-r1                                                                  
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11                 
sys-devel/binutils:  2.19.1-r1                                                                      
sys-devel/gcc-config: 1.4.1                                                                         
sys-devel/libtool:   2.2.6a                                                                         
virtual/os-headers:  2.6.29                                                                         
ACCEPT_KEYWORDS="amd64 ~amd64"                                                                      
CBUILD="x86_64-pc-linux-gnu"                                                                        
CFLAGS="-march=native -msse3 -O2 -pipe"                                                             
CHOST="x86_64-pc-linux-gnu"                                                                         
CONFIG_PROTECT="/etc /usr/NX/etc /usr/NX/home /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"                                                                       
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"          
CXXFLAGS="-march=native -msse3 -O2 -pipe"                                                           
DISTDIR="/usr/portage/distfiles"                                                                    
FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"                                                                            
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://www.gtlib.gatech.edu/pub/gentoo ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.mirrors.pair.com/ http://mirror.mcs.anl.gov/pub/gentoo/ http://lug.mtu.edu/gentoo/"                                                                                  
LANG="en_US.utf-8"                                                                                  
LDFLAGS="-Wl,-O1"                                                                                   
LINGUAS="en_US en"                                                                                  
PKGDIR="/usr/portage/packages"                                                                      
PORTAGE_CONFIGROOT="/"                                                                              
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"          
PORTAGE_TMPDIR="/var/tmp"                                                                           
PORTDIR="/usr/portage"                                                                              
PORTDIR_OVERLAY="/usr/portage/local/layman/kde-testing /usr/portage/local/layman/sunrise /usr/portage/local/layman/games"                                                                               
SYNC="rsync://rsync.gentoo.org/gentoo-portage"                                                      
USE="3dnow 3dnowext X Xaw3d a52 aac aalib acct acl acpi adns aften aio alsa amd64 amr amrnb amrwb apache2 apm archive ares asf athena avahi bash-completion berkdb binary-drivers blas blender-game branding bullet bzip2 cairo caps cblas ccache cdaudio cdda cddb cdparanoia cdr cgi chroot cli color-console commercial connectionstatus consolekit cracklib crypt css cups curl cvs daap dbus divx djbfft dnd dri dts dvd dvdnav dvdr dvdread eds emboss emerald encode escreen esd evo exif extensions extrafilters fam fame fat ffmpeg fftw firefox firefox3 flac fortran gcrypt gd gdbm geoip gif git glitz glx gmedia gnome gnutls gpm graphviz gstreamer gtk hal hddtemp hdri hpn httpd iconv ieee1394 imagemagick inotify ipod isdnlog java joystick jpeg kde kdeenablefinal kdehiddenvisibility kdenablefinal lame lcms ldap libcaca libnotify lm_sensors logitech-mouse lzo mad md5sum mdnsresponder-compat midi mikmod mjpeg mmap mmx mmxext mng moonlight mp2 mp3 mp4 mpeg mpeg2 mpi mplayer mplayer-bin mpm-worker mudflap multilib mysql ncurses netmeeting network network-cron nls nptl nptlonly nsplugin nvidia nxclient ocaml offensive ogg openal openexr opengl openmp pam passwdqc pcre pdf perl php pic player plugins png ppds pppd python qmmm-tinker qt3 qt3support qt4 quicktime quotes rdesktop readline realmedia reflection reiserfs rtc rtsp schroedinger sdl session sftplogging shout smi smp sms snmp spell spl sqlite3 sse sse2 ssh ssl startup-notification stream subversion svg sysfs tcpd theora threads thumbnail tiff tk toolbar truetype unicode upnp usb vdpau visualization vlm vorbis wad webkit winpopup wmp x264 xcb xcomposite xml xml2 xorg xprint xscreensaver xulrunner xv xvid xvmc yv12 zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev mouse keyboard joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Zac Medico gentoo-dev 2009-06-26 21:39:04 UTC
In svn r13698:13700 it's fixed to free memory from the dep calculation before doing the unmerge. The patch doesn't apply to rc33, so you'll have to wait for the next release or else use an svn checkout to test it:

  http://www.gentoo.org/proj/en/portage/doc/testing.xml#doc_chap3
Comment 2 Chad A. Simmons 2009-06-27 00:50:09 UTC
Still getting the same traceback/crash with r13700
Comment 3 Zac Medico gentoo-dev 2009-06-27 03:19:02 UTC
Are you sure that it was executing the latest version (not 2.2_rc33)? The traceback should have looked at least a little different due to changed line numbers and file names.
Comment 4 Chad A. Simmons 2009-06-27 18:01:18 UTC
I think so for some reason its saying its r13694 but I did a checkout of 13700. Also I should have said similar not same.

chadgentoo trunk # emerge --version
Portage 13694-svn (default/linux/amd64/2008.0/desktop, gcc-4.3.3, glibc-2.10.1-r0, 2.6.30-gentoo-r1 x86_64)
chadgentoo trunk # emerge --depclean @kde-3.5

Calculating dependencies... done!
>>> Checking for lib consumers...
>>> Assigning files to packages...

 kde-base/kpersonalizer
    selected: 3.5.10   
   protected: none     
     omitted: none     

 kde-base/kdeprint
    selected: 3.5.10 
   protected: none   
     omitted: none   

 kde-base/khotkeys
    selected: 3.5.10 
   protected: none   
     omitted: 4.2.4  

 kde-base/kdesu
    selected: 3.5.10 
   protected: none   
     omitted: 4.2.4  

 kde-base/kdebase-kioslaves
    selected: 3.5.10-r1    
   protected: none         
     omitted: 4.2.4        

 kde-base/kooka
    selected: 3.5.10 
   protected: none   
     omitted: none   

 kde-base/ksplashml
    selected: 3.5.10 
   protected: none   
     omitted: none   

 kde-base/kfind
    selected: 3.5.10 
   protected: none   
     omitted: 4.2.4  

 kde-base/kdesktop
    selected: 3.5.10 
   protected: none   
     omitted: none   

 kde-base/kicker
    selected: 3.5.10-r1 
   protected: none      
     omitted: none      

 kde-base/kcminit
    selected: 3.5.10 
   protected: none   
     omitted: 4.2.4  

 kde-base/kghostview
    selected: 3.5.10 
   protected: none   
     omitted: none   

 kde-base/libkscan
    selected: 3.5.10 
   protected: none   
     omitted: none   

 kde-base/kcheckpass
    selected: 3.5.10 
   protected: none   
     omitted: 4.2.4  

 kde-base/kmenuedit
    selected: 3.5.10 
   protected: none   
     omitted: none   

 kde-base/kdialog
    selected: 3.5.10 
   protected: none   
     omitted: 4.2.4  

 kde-base/libkonq
    selected: 3.5.10 
   protected: none   
     omitted: 4.2.4  

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...             
>>> Unmerging in: 5 4 3 2 1             
>>> Unmerging kde-base/kpersonalizer-3.5.10...
!!! Error extracting saved environment: '/var/db/pkg/kde-base/kpersonalizer-3.5.10/environment.bz2'
 * The 'prerm' phase of the 'kde-base/kpersonalizer-3.5.10' package has                            
 * failed with exit value -1.                                                                      
 *                                                                                                 
 * The problem occurred while executing the ebuild file named                                      
 * 'kpersonalizer-3.5.10.ebuild' located in the '/var/db/pkg/kde-                                  
 * base/kpersonalizer-3.5.10' directory. If necessary, manually remove the                         
 * environment.bz2 file and/or the ebuild file located in that directory.                          
 *                                                                                                 
 * Removal of the environment.bz2 file is preferred since it may allow the                         
 * removal phases to execute successfully. The ebuild will be sourced and                          
 * the eclasses from the current portage tree will be used when necessary.
 * Removal of the ebuild file will cause the pkg_prerm() and pkg_postrm()
 * removal phases to be skipped entirely.
Traceback (most recent call last):
  File "/root/portage/trunk/bin/emerge", line 40, in <module>
    retval = emerge_main()
  File "/root/portage/trunk/pym/_emerge/main.py", line 1215, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/root/portage/trunk/pym/_emerge/actions.py", line 2318, in action_uninstall
    opts, action, valid_atoms, spinner)
  File "/root/portage/trunk/pym/_emerge/actions.py", line 612, in action_depclean
    cleanlist, ldpath_mtimes, ordered=ordered)
  File "/root/portage/trunk/pym/_emerge/unmerge.py", line 512, in unmerge
    scheduler=scheduler)
  File "/root/portage/trunk/pym/portage/__init__.py", line 6822, in unmerge
    ldpath_mtimes=ldpath_mtimes)
  File "/root/portage/trunk/pym/portage/dbapi/vartree.py", line 2058, in unmerge
    vartree=self.vartree)
  File "/root/portage/trunk/pym/portage/__init__.py", line 6304, in doebuild
    fd_pipes=fd_pipes, returnpid=returnpid)
  File "/root/portage/trunk/pym/portage/__init__.py", line 3416, in spawn
    _create_pty_or_pipe(copy_term_size=fd_pipes_orig[1])
  File "/root/portage/trunk/pym/portage/__init__.py", line 3324, in _create_pty_or_pipe
    set_term_size(rows, columns, slave_fd)
  File "/root/portage/trunk/pym/portage/output.py", line 421, in set_term_size
    spawn(cmd, env=os.environ, fd_pipes={0:fd})
  File "/root/portage/trunk/pym/portage/process.py", line 225, in spawn
    pid = os.fork()
OSError: [Errno 12] Cannot allocate memory

Comment 5 Chad A. Simmons 2009-06-29 01:03:35 UTC
I got this to work for some reason on my system 4GB of memory isn't enough to run this command. I added an additional 4GB of swap and now it succeeds.