Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 86679 - m4 autoclean error causes emerge to crash with traceback
Summary: m4 autoclean error causes emerge to crash with traceback
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-25 10:05 UTC by Stephen Ake
Modified: 2005-04-11 08:09 UTC (History)
0 users

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


Attachments
md5sum 1a1e52f2a5554881860418153a432d27 (CONTENTS,731 bytes, application/octet-stream)
2005-04-06 18:12 UTC, Stephen Ake
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Ake 2005-03-25 10:05:24 UTC
This bug seems almost identical to bug 53441, except for my up-to-date version of portage. When I upgraded to the new stable version of m4 (1.4.2-r1) the autoclean fails at removing m4-1.4.1 with a traceback. This also happens after any normal merge, as portage checks packages to autoclean every time it finishes. Also, when I try to completely remove m4 (when both versions are installed), m4-1.4.2-r1 is removed successfully, but m4-1.4.1 causes the same traceback.

Output of `emerge --clean`:


 sys-devel/m4
    selected: 1.4.1
   protected: 1.4.2-r1
     omitted: none

>>> '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 sys-devel/m4-1.4.1...
No package files given... Grabbing a set.
Traceback (most recent call last):
  File "/usr/bin/emerge", line 2828, in ?
    if 1==unmerge(myaction, myfiles):
  File "/usr/bin/emerge", line 2188, in unmerge
    retval=portage.unmerge(mysplit[0],mysplit[1],portage.root,mysettings,unmerge_action not in ["clean","prune"])
  File "/usr/lib/portage/pym/portage.py", line 2828, in unmerge
    mylink.unmerge(trimworld=mytrimworld,cleanup=1)
  File "/usr/lib/portage/pym/portage.py", line 6064, in unmerge
    spawn("bzip2 -d "+self.dbdir+"/environment.bz2",self.settings,free=1)
  File "/usr/lib/portage/pym/portage.py", line 1567, in spawn
    return portage_exec.spawn_bash(mystring,env=env,**keywords)
  File "/usr/lib/portage/pym/portage_exec.py", line 46, in spawn_bash
    return spawn(args,env=env,opt_name=opt_name,**keywords)
  File "/usr/lib/portage/pym/portage_exec.py", line 160, in spawn
    raise str(e)+":\n   "+myc+" "+string.join(myargs)
execve() arg 3 contains a non-string value:
   /bin/bash [m4-1.4.1] bash -c bzip2 -d /var/db/pkg/sys-devel/m4-1.4.1/environment.bz2

>>> Unmerging sys-devel/m4-1.4.1...
No package files given... Grabbing a set.
Traceback (most recent call last):
  File "/usr/bin/emerge", line 2828, in ?
    if 1==unmerge(myaction, myfiles):
  File "/usr/bin/emerge", line 2188, in unmerge
    retval=portage.unmerge(mysplit[0],mysplit[1],portage.root,mysettings,unmerge_action not in ["clean","prune"])
  File "/usr/lib/portage/pym/portage.py", line 2828, in unmerge
    mylink.unmerge(trimworld=mytrimworld,cleanup=1)
  File "/usr/lib/portage/pym/portage.py", line 6075, in unmerge
    a=doebuild(myebuildpath,"prerm",self.myroot,self.settings,cleanup=cleanup,use_cache=0,tree="vartree")
  File "/usr/lib/portage/pym/portage.py", line 2542, in doebuild
    return spawn(EBUILD_SH_BINARY+" "+mydo,mysettings,debug=debug,free=1,logfile=logfile)
  File "/usr/lib/portage/pym/portage.py", line 1567, in spawn
    return portage_exec.spawn_bash(mystring,env=env,**keywords)
  File "/usr/lib/portage/pym/portage_exec.py", line 46, in spawn_bash
    return spawn(args,env=env,opt_name=opt_name,**keywords)
  File "/usr/lib/portage/pym/portage_exec.py", line 160, in spawn
    raise str(e)+":\n   "+myc+" "+string.join(myargs)
execve() arg 3 contains a non-string value:
   /bin/bash [m4-1.4.1] bash -c /usr/lib/portage/bin/ebuild.sh prerm
!!! FAILED prerm: 1


Reproducible: Always
Steps to Reproduce:
1. Upgrade to m4-1.4.2-r1
2. autoclean of m4-1.4.1 will result in a traceback
3.

Actual Results:  
emerge crashed and didn't remove m4-1.4.1

Expected Results:  
m4-1.4.1 should have been uninstalled, and emerge should exit normally

Gentoo Base System version 1.4.16
Portage 2.0.51.19 (default-linux/x86/2004.2, gcc-3.3.5, glibc-2.3.4.20041102-r1,
2.6.10-gentoo-r2 i686)
=================================================================
System uname: 2.6.10-gentoo-r2 i686 AMD Athlon(TM) XP 2000+
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb  7 2005, 23:49:39)]
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.4.22-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
DISTDIR="/mnt/200GB/system/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dfx 3dnow X acpi aim ala alsa apache2 apm audiofile avi berkdb
bitmap-fonts bonobo bzlib cdparanoia cdr crypt cups curl dedicated divx4linux
dvd dvdr dvdread emboss encode esd ethereal exif faac faad fam fbcon flac
font-server foomaticdb fortran ftp gdbm gif gimpprint gnome gpm gstreamer gtk
gtk2 gtkhtml guile imagemagick imlib ipv6 jack java jpeg junit kerberos ldap
libg++ libwww mad mbox mikmod mime mmx motif mozilla mp3 mpeg mysql mysqli nas
ncurses nls nocd oggvorbis opengl oss pam pdflib perl php plotutils png posix
python quicktime readline rtc samba sdl shared slang sockets speex spell spl sse
ssl svga tcltk tcpd tetex theora threads tiff truetype truetype-fonts
type1-fonts unicode usb v4l v4l2 vhosts videos xine xinerama xml xml2 xmms
xprint xv xvid zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 Stephen Ake 2005-04-06 18:12:22 UTC
Created attachment 55530 [details]
md5sum 1a1e52f2a5554881860418153a432d27

Well, I found the problem. Somehow, the /var/db/pkg/sys-devel/m4-1.4.1/CONTENTS
file had gotten corrupted (attached). The file is terminated prematurely with a
bunch of null characters, which is why I selected the binary MIME type for
uploading. The file had the same timestamp as all the other files in the
/var/db/pkg/m4-1.4.1 directory, so the bork must have happened when m4-1.4.1
originally was installed on August 7, 2004, which happens to be the day I
installed Gentoo on this computer for the first time. Maybe it's just an old
version of portage?
Comment 2 SpanKY gentoo-dev 2005-04-06 18:48:47 UTC
or perhaps a fsck ate the file ?
Comment 3 Jason Stubbs (RETIRED) gentoo-dev 2005-04-11 08:09:24 UTC
Yep. That looks to be fs corruption. Not really much that can be done about it other than having a nice error message. Nice error messages are another bug.