Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 30613

Summary: Severe problems with lockfiles in -r9
Product: Portage Development Reporter: Joe Kallar (RETIRED) <blademan>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Status: VERIFIED FIXED    
Severity: blocker CC: dave, hertog, robbat2, sparc
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Joe Kallar (RETIRED) gentoo-dev 2003-10-07 17:28:32 UTC
Emerge fluxbox results in an odd emerge. The emerge fails with an error, but not
the form of a typical error. An 'emerge -u fluxbox' picks up at the next package
in the list.

This also occured this morning during the initial 'emerge system' of a SPARC
install. Using 'emerge -u system', I was able to emerge 1 pacakge at a time,
emerge dies, retry. After 10 or so attempts I assumed that the install was crap
and blew it away. Then 12 hrs later it started happening on x86.

Reproducible: Always
Steps to Reproduce:
1. emerge fluxbox
2. emerge -u fluxbox
3. repeat

Actual Results:  
(snip)
19:32:15] <Blademan> strip:
[19:32:15] <Blademan> >>> Completed installing into
/var/tmp/portage/commonbox-styles-0.6/image/
[19:32:15] <Blademan>
[19:32:15] <Blademan> Base path does not exist '/var/db/pkg/x11-themes'
[19:32:15] <Blademan> >>> Merging x11-themes/commonbox-styles-0.6 to /
(snip)
[19:32:51] <Blademan> Traceback (most recent call last):
[19:32:51] <Blademan>   File "/usr/bin/emerge", line 2149, in ?
[19:32:51] <Blademan>     mydepgraph.merge(mydepgraph.altlist())
[19:32:51] <Blademan>   File "/usr/bin/emerge", line 1356, in merge
[19:32:51] <Blademan>     retval=portage.doebuild(y,"merge",myroot,edebug)
[19:32:51] <Blademan>   File "/usr/lib/python2.2/site-packages/portage.py", line
1821, in doebuild
[19:32:51] <Blademan>     return
merge(settings["CATEGORY"],settings["PF"],settings["D"],settings["BUILDDIR"]+"/build-info",myroot,myebuild=settings["EBUILD"])
[19:32:51] <Blademan>   File "/usr/lib/python2.2/site-packages/portage.py", line
1940, in merge
[19:32:51] <Blademan>     return mylink.merge(pkgloc,infloc,myroot,myebuild)
[19:32:51] <Blademan>   File "/usr/lib/python2.2/site-packages/portage.py", line
5018, in merge
[19:32:51] <Blademan>     return self.treewalk(mergeroot,myroot,inforoot,myebuild)
[19:32:51] <Blademan>   File "/usr/lib/python2.2/site-packages/portage.py", line
4708, in treewalk
[19:32:51] <Blademan>     unlockdir(mytmpdir_lock)
[19:32:51] <Blademan>   File "/usr/lib/python2.2/site-packages/portage.py", line
5527, in unlockdir
[19:32:51] <Blademan>     return unlockfile(mylock)
[19:32:51] <Blademan>   File "/usr/lib/python2.2/site-packages/portage.py", line
5568, in unlockfile
[19:32:51] <Blademan>     lockfilename,myfd,unlinkfile = mytuple
[19:32:51] <Blademan> TypeError: unpack non-sequence

an 'emerge -s' showed:
[19:39:06] <Blademan> *  x11-themes/commonbox-styles
[19:39:06] <Blademan>       Latest version available: 0.6
[19:39:06] <Blademan>       !!! Invalid db entry:
/var/db/pkg/x11-themes/commonbox-styles-0.6.portage_lockfile
[19:39:06] <Blademan> Latest version installed: 0.6
[19:39:06] <Blademan>       Size of downloaded files: 103 kB
[19:39:06] <Blademan>       Homepage:    http://gentoo.mkeadle.org/
[19:39:06] <Blademan>       Description: Common styles for fluxbox, blackbox,
and openbox.

I rm'ed the offending lockfile and tried again. Then the exact same thing
happened to the next package in the list.

(snip)
strip:
strip:
   usr/bin/fluxbox
   usr/bin/fbrun
>>> Completed installing into /var/tmp/portage/fluxbox-0.1.14-r2/image/

Base path does not exist '/var/db/pkg/x11-wm'
>>> Merging x11-wm/fluxbox-0.1.14-r2 to /
--- /usr/
--- /usr/share/
--- /usr/share/commonbox/
>>> /usr/share/commonbox/init
(snip)
>>> /etc/X11/Sessions/fluxbox

Traceback (most recent call last):
  File "/usr/bin/emerge", line 2149, in ?
    mydepgraph.merge(mydepgraph.altlist())
  File "/usr/bin/emerge", line 1356, in merge
    retval=portage.doebuild(y,"merge",myroot,edebug)
  File "/usr/lib/python2.2/site-packages/portage.py", line 1821, in doebuild
    return
merge(settings["CATEGORY"],settings["PF"],settings["D"],settings["BUILDDIR"]+"/build-info",myroot,myebuild=settings["EBUILD"])
  File "/usr/lib/python2.2/site-packages/portage.py", line 1940, in merge
    return mylink.merge(pkgloc,infloc,myroot,myebuild)
  File "/usr/lib/python2.2/site-packages/portage.py", line 5018, in merge
    return self.treewalk(mergeroot,myroot,inforoot,myebuild)
  File "/usr/lib/python2.2/site-packages/portage.py", line 4708, in treewalk
    unlockdir(mytmpdir_lock)
  File "/usr/lib/python2.2/site-packages/portage.py", line 5527, in unlockdir
    return unlockfile(mylock)
  File "/usr/lib/python2.2/site-packages/portage.py", line 5568, in unlockfile
    lockfilename,myfd,unlinkfile = mytuple
TypeError: unpack non-sequence

# emerge -s fluxbox
Searching...
[ Results for search key : fluxbox ]
[ Applications found : 1 ]

*  x11-wm/fluxbox
      Latest version available: 0.1.14-r2
      !!! Invalid db entry: /var/db/pkg/x11-wm/fluxbox-0.1.14-r2.portage_lockfile
Latest version installed: 0.1.14-r2
      Size of downloaded files: 366 kB
      Homepage:    http://fluxbox.sf.net
      Description: Window manager based on Blackbox -- has tabs.

Expected Results:  
emerge normally

# emerge info
!!! Invalid db entry: /var/db/pkg/x11-wm/fluxbox-0.1.14-r2.portage_lockfile
Portage 2.0.49-r9 (default-x86-1.4, gcc-3.3.1, glibc-2.3.2-r1, 2.4.22)
=================================================================
System uname: 2.4.22 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.3.10p1
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox autoaddcvs ccache"
GENTOO_MIRRORS="ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo
ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://mirrors.tds.net/gentoo
http://adelie.polymtl.ca/ http://gentoo.seren.com/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="x86 oss apm encode foomaticdb gpm libg++ libwww mad mikmod nls spell xv
zlib directfb gtkhtml gdbm berkdb slang readline bonobo svga tcpd pam imlib
oggvorbis gtk motif -3dnow X kde -gnome acpi acpi4linux alsa apache2 arts avi
crypt cups emacs emacs-w3 esd evo flash gd gif icc java jikes jpeg kerberos mmx
mpeg mozilla moznomail moznocompose ncurses opengl pdflib perl png python qt
quicktime samba sdl sse ssl stroke tiff truetype usb xml xml2 xmms offensive"
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2003-10-07 17:31:10 UTC
*** Bug 30582 has been marked as a duplicate of this bug. ***
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2003-10-07 17:32:23 UTC
Nick, this has to be fixed before r9 can go stable.
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2003-10-07 17:56:20 UTC
It also gives weird output on parallel emerge runs (I know, it's not recommended).
I unmerged several kernel versions in one term and emerged something in another
term, on auto-cleaning portage printed:


>>> clean: No packages selected for removal.

>>> Regenerating /etc/ld.so.cache...
 * Caching service dependencies...                                      
                [ ok ]
>>> Auto-cleaning packages ...
['sys-kernel/mm-sources', '2.6.0_beta4', 'r6.portage_lockfile'] ['sys-kernel/mm-sources-2.6.0_b
eta4-r6.portage_lockfile', 'sys-kernel/mm-sources-2.6.0_beta4-r6', 'sys-kernel/mm-sources-2.6.0
_beta5-r1', 'sys-kernel/mm-sources-2.6.0_beta5-r4', 'sys-kernel/mm-sources-2.6.0_beta6-r1',
'sy
s-kernel/mm-sources-2.6.0_beta6-r2', 'sys-kernel/mm-sources-2.6.0_beta6-r4']
!!! COUNTER file is missing for sys-kernel/mm-sources-2.6.0_beta4-r6.portage_lockfile
in /var/d
b.
!!! Please run /usr/lib/portage/bin/fix-db.pl or remerge the package.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-10-07 20:09:50 UTC
I've got this happening as well if more error output is needed.
Comment 5 Joe Kallar (RETIRED) gentoo-dev 2003-10-07 22:17:13 UTC
Confirmed in a fresh SPARC install:

>>> /usr/share/doc/perl-5.8.1-r2/AUTHORS.gz
>>> /usr/share/doc/perl-5.8.1-r2/Todo.micro.gz

Traceback (most recent call last):
  File "/usr/bin/emerge", line 2149, in ?
    mydepgraph.merge(mydepgraph.altlist())
(snip, same as above)
Comment 6 Nicholas Jones (RETIRED) gentoo-dev 2003-10-08 00:13:27 UTC
Ok. Should have this one cleared up in -r10.
The categories were missing. Only happens on new category merges.
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-10-08 13:55:54 UTC
I confirm it is fixed now, but I had to merge -r12 _twice_ for 'emerge info'
to actually tell me I had -r12 and not your testing -r58 still.
Comment 8 Marius Mauch (RETIRED) gentoo-dev 2003-10-08 16:58:18 UTC
*** Bug 30706 has been marked as a duplicate of this bug. ***