Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 116756 - unmerge fails due to corruption in /var/db/pkg/*/*/*
Summary: unmerge fails due to corruption in /var/db/pkg/*/*/*
Status: RESOLVED CANTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-25 23:34 UTC by Dirk Olmes
Modified: 2006-10-29 07:16 UTC (History)
1 user (show)

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


Attachments
CONTENTS file after fresh emerge (CONTENTS.bz2,3.28 KB, application/octet-stream)
2006-01-03 22:14 UTC, Dirk Olmes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Olmes 2005-12-25 23:34:39 UTC
I'm trying to emerge net-dialup/isdn4k-utils-3.7_pre20050626. The build runs fine but the final installation step fails. I can emerge other packages just fine.

Log:
>>> net-dialup/isdn4k-utils-3.8_pre20050821 merged.

 net-dialup/isdn4k-utils
    selected: 3.7_pre20050626
   protected: 3.8_pre20050821
     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 net-dialup/isdn4k-utils-3.7_pre20050626...
No package files given... Grabbing a set.
Traceback (most recent call last):
  File "/usr/bin/emerge", line 3222, in ?
    mydepgraph.merge(pkglist)
  File "/usr/bin/emerge", line 1960, in merge
    retval=unmerge("clean", [xsplit[0]])
  File "/usr/bin/emerge", line 2250, 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 2951, in unmerge
    mylink.unmerge(trimworld=mytrimworld,cleanup=1)
  File "/usr/lib/portage/pym/portage.py", line 6210, in unmerge
    spawn("bzip2 -d "+self.dbdir+"/environment.bz2",self.settings,free=1)
  File "/usr/lib/portage/pym/portage.py", line 1615, in spawn
    return portage_exec.spawn_bash(mystring,env=env,**keywords)
  File "/usr/lib/portage/pym/portage_exec.py", line 48, in spawn_bash
    return spawn(args,env=env,opt_name=opt_name,**keywords)
  File "/usr/lib/portage/pym/portage_exec.py", line 164, in spawn
    raise str(e)+":\n   "+myc+" "+string.join(myargs)
execve() arg 3 contains a non-string value:
   /bin/bash [isdn4k-utils-3.7_pre20050626] bash -c bzip2 -d /var/db/pkg/net-dialup/isdn4k-utils-3.7_pre20050626/environment.bz2
close failed: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "/usr/bin/emerge", line 3222, in ?
    mydepgraph.merge(pkglist)
  File "/usr/bin/emerge", line 1960, in merge
    retval=unmerge("clean", [xsplit[0]])
  File "/usr/bin/emerge", line 2250, 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 2951, in unmerge
    mylink.unmerge(trimworld=mytrimworld,cleanup=1)
  File "/usr/lib/portage/pym/portage.py", line 6221, in unmerge
    a=doebuild(myebuildpath,"prerm",self.myroot,self.settings,cleanup=cleanup,use_cache=0,tree=self.treetype)
  File "/usr/lib/portage/pym/portage.py", line 2651, in doebuild
    return spawn(EBUILD_SH_BINARY+" "+mydo,mysettings,debug=debug,free=1,logfile=logfile)
  File "/usr/lib/portage/pym/portage.py", line 1615, in spawn
    return portage_exec.spawn_bash(mystring,env=env,**keywords)
  File "/usr/lib/portage/pym/portage_exec.py", line 48, in spawn_bash
    return spawn(args,env=env,opt_name=opt_name,**keywords)
  File "/usr/lib/portage/pym/portage_exec.py", line 164, in spawn
    raise str(e)+":\n   "+myc+" "+string.join(myargs)
execve() arg 3 contains a non-string value:
   /bin/bash [isdn4k-utils-3.7_pre20050626] bash -c /usr/lib/portage/bin/ebuild.sh prerm
close failed: [Errno 9] Bad file descriptor
!!! FAILED prerm: 1
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-12-26 03:47:34 UTC
You neglected to post emerge --info output.
Comment 2 Dirk Olmes 2005-12-26 06:19:16 UTC
(s)xanthippe# emerge --info
Portage 2.0.53 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r2, 2.6.13-gentoo-r5 i686)
=================================================================
System uname: 2.6.13-gentoo-r5 i686 Celeron (Mendocino)
Gentoo Base System version 1.6.13
distcc 2.18.3 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks noinfo sandbox sfperms strict"
GENTOO_MIRRORS="ftp://pandemonium.tiscali.de/pub/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://linux.rz.ruhr-uni-bochum.de/gentoo-portage"
USE="x86 acl apache2 apm berkdb bitmap-fonts bzip2 cdb cdr crypt eds emboss expat foomaticdb gd gdbm gif gstreamer imagemagick imap imlib ipv6 jpeg libg++ libwww mhash mp3 ncurses nls nptl objc ogg pam pcre pdflib perl png python readline samba slang spell sse ssl tiff truetype-fonts type1-fonts udev vorbis xml2 zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS

Comment 3 Jakub Moc (RETIRED) gentoo-dev 2005-12-26 06:21:52 UTC
Reopen.
Comment 4 Alec Warner archtester Gentoo Infrastructure gentoo-dev Security 2006-01-03 21:13:03 UTC
Please check that /var/db/pkg/net-dialup/isdn4k-utils-3.8_pre20050821/CONTENTS is not corrupted.

See bug 46271.

If your CONTENTS file is not corrupted please re-open.

*** This bug has been marked as a duplicate of 46271 ***
Comment 5 Dirk Olmes 2006-01-03 22:14:13 UTC
Created attachment 76132 [details]
CONTENTS file after fresh emerge
Comment 6 Dirk Olmes 2006-01-03 22:14:53 UTC
It looks like the CONTENTS file is ok, AFAICT.
Comment 7 Stefan Schweizer (RETIRED) gentoo-dev 2006-02-04 13:31:04 UTC
fixed in portage
Comment 8 Stefan Schweizer (RETIRED) gentoo-dev 2006-02-04 13:31:42 UTC
oops, wrong bug, sry :(
Comment 9 Stefan Schweizer (RETIRED) gentoo-dev 2006-04-02 14:15:37 UTC
DO you still ahve this when rying to remerge?
Comment 10 Dirk Olmes 2006-04-02 22:55:58 UTC
Since the bug greport, I've upgraded to net-dialup/isdn4k-utils-3.9_pre20060124. While installing I had the same error again. I temporarily turned off autoclean in my make.conf and were able to upgrade. The bug is still there, though.

Sidenote: in the meantime I had the chance to install isdn4k-utils on a fresh gentoo system. The bug didn't show up there :-(
Comment 11 Wulf Krueger (RETIRED) gentoo-dev 2006-06-29 13:32:19 UTC
The same happened to me with sys-devel/autoconf-2.59d:

>>> Auto-cleaning packages...

 sys-devel/autoconf
    selected: 2.59d
   protected: 2.13 2.59-r7
     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/autoconf-2.59d...
No package files given... Grabbing a set.
execve() arg 3 contains a non-string value:
   /bin/bash -c bzip2 -d /var/db/pkg/sys-devel/autoconf-2.59d/environment.bz2
execve() arg 3 contains a non-string value:
   /bin/bash -c /usr/lib/portage/bin/ebuild.sh prerm
!!! FAILED prerm: 1 

Bug's 46271 comment 17 helped me find out that the KEYWORDS file got corrupted somehow with the following exact pattern that repeated itself 20 times or so: \x01p1I\x00\x00\x00\x00\x01\x109I\

Basically, lots of NULL chars - as in bug 46271. I solved it by copying the real keywords from the ebuild.

I'm adding this in the hope that it might help to locate the reason for the corruption.
Comment 12 Stefan Schweizer (RETIRED) gentoo-dev 2006-09-01 08:49:37 UTC
you can try to parse the CONTENTS file, remove all files in there, and remove the /var/db/pkg directory. Then you should have no more problems.

I suggest to close this bug, does not seem to be reproduceable.
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2006-10-29 07:16:43 UTC
Closing.