First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 40992
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: psk <gentoo@feeleas.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
libtool-1.5.2-r7-lockingfix.diff libtool-1.5.2-r7-lockingfix.diff patch Robin Johnson 2004-11-16 22:20 0000 490 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 40992 depends on: 19817 Show dependency tree
Bug 40992 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-02-09 11:44 0000
I was doing an emerge portage just after an emerge rsync.
   This computer was down for months, so, this is a major update.
   All is in the title

creating ./config.status
creating include/builddefs
creating include/config.h
=== include ===
rm -f attr
ln -s . attr
=== libmisc ===
/usr/bin/libtool --mode=compile /usr/bin/gcc -mcpu=athlon -march=athlon -O3 -pipe -z combreloc -fPIC -fomit-frame-pointer -msse -mmmx -m3dnow -g -DNDEBUG -funsigned-char -Wall -I./include -DVERSION=\"2.4.7\" -DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"attr\" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64  -g -DNDEBUG -funsigned-char -Wall -I../include -DVERSION=\"2.4.7\" -DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"attr\" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64   -D_REENTRANT -fno-strict-aliasing -c quote.c
Waiting for quote.o.lock to be removed
Waiting for quote.o.lock to be removed
Waiting for quote.o.lock to be removed
Waiting for quote.o.lock to be removed
Waiting for quote.o.lock to be removed
Waiting for quote.o.lock to be removed
Waiting for quote.o.lock to be removed
Waiting for quote.o.lock to be removed
....


   Here are informations about the computer :

 emerge info
Portage 2.0.49-r15 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.20-wolk4.9s)
=================================================================
System uname: 2.4.20-wolk4.9s i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.4.3.13
distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=athlon -march=athlon -O3 -pipe -z combreloc -fPIC -fomit-frame-pointer -msse -mmmx -m3dnow"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=athlon -march=athlon -O3 -pipe -z combreloc -fPIC -fomit-frame-pointer -msse -mmmx -m3dnow"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs sandbox ccache buildpkg clean"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="arts avi motif spell xv 3dnow acl -alsa -apm berkdb crypt cscope -cups -curl -debug -dga -directfb doc -dvb -dvd -emacs -encode -esd -ethereal fbcon -firebird -flash -foomaticdb -freewnn -gb gd gdbm -ggi gif -gnome -gphoto2 gpm -gps -gtk -gtk2 -gtkhtml guile imap imlib innodb -informix ipv6 -jack -java -jikes -joystick jpeg -junit -kde kerberos krb4 -ladcca lcms -ldap -leim libg++ -libgda libwww -lirc -mad maildir -matrox mbox mcal -mikmod mmx -mozilla -mpeg mpi -mule mysql -nas ncurses -nhc98 nls -oci8 -oggvorbis -opengl -oss pam pcmcia -pda -ppds -pdflib perl -plotutils png pnp postgres bindist prelude python -qt -quicktime readline ruby samba sasl scanner -sdl slang -slp snmp socks5 -spoell sse ssl -svga tcpd -tetex -tiff -truetype usb -voodoo3 wavelan -wmf -wxwindows -X -Xaw3d -xface -xinerama xml xml2 -xmms zlib x86"



Reproducible: Always
Steps to Reproduce:
just "emerge -uUvb portage"

Actual Results:  
The compiler loop on a warning message (Waiting for quote.o.lock to be removed)

Expected Results:  
attr must compile

------- Comment #1 From Marcus Spading 2004-02-14 09:43:35 0000 -------
I was just hit by this bug. After a little digging I found out, that this
error occurs if PORTAGE_TMPDIR is on a seperate partition. It tries to make
a hardlink which obviously does not work across partitions. 

As a workaround you can let point PORTAGE_TMPDIR to some dir on your root
partition.

------- Comment #2 From Jason Stubbs (RETIRED) 2004-04-10 01:09:55 0000 -------
portage-2.0.50-r3 and -r4 compile and install fine with /var/tmp (my
PORTAGE_TMPDIR) on tmpfs. Is it portage or another package causing this
problem? Please include the version of the problem package, too.

------- Comment #3 From Brian Harring 2004-08-22 05:17:39 0000 -------
Reopen with needed info please.

------- Comment #4 From Dinil Penne 2004-10-13 03:47:40 0000 -------
I'm having the same problem, with attr as well as acl. I tried downgrading 
portage from 2.0.51_rc9 to 2.0.50-r11 but that didn't help. I tried respecifying locatin of PORTAGE_TMP but didn't help.

/usr/portage is in it's own partition.

This is an installation killer.

Portage 2.0.50-r11 (default-x86-2004.2, gcc-3.4.2, glibc-2.3.4.20041006-r0, 2.6.7-ALThardened-r8)
=================================================================
System uname: 2.6.7-ALThardened-r8 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.5.3
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe -march=pentium4 -mfpmath=sse -maccumulate-outgoing-args -mmmx -msse -msse2 -ftracer -fomit-frame-pointer -fstack-protector -fPIC -fPIE -DPIC"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/share/config:/usr/kde/3.3/env:/usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/fax /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/qmail/alias /var/qmail/control /var/spool/fax/etc /var/vpopmail/domains /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=pentium4 -mfpmath=sse -maccumulate-outgoing-args -mmmx -msse -msse2 -ftracer -fomit-frame-pointer -fstack-protector -fPIC -fPIE -DPIC"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache sandbox userpriv"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/usr/portage/tmp"
PORTDIR="/usr/portage/ports"
PORTDIR_OVERLAY="/usr/portage/local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X509 acl berkdb chroot crypt doc erandom f77 gcj gdbm hardened ipv6 ithreads kerberos ldap ncurses nls no-old-linux nptl objc pam pcre pic pie pwdb python readline sftplogging skey ssl ssp tcpd x86 zlib"

------- Comment #5 From Diego Chantrain 2004-10-13 08:19:41 0000 -------
I was also hit by this bug. Setting PORTAGE_TMPDIR="/root/portage_temp" solved
the problem. Here's my info.

Portage 2.0.50-r11 (default-x86-2004.0, gcc-3.3.4, glibc-2.3.3.20040420-r1,
2.6.7-gentoo-r12)
=================================================================
System uname: 2.6.7-gentoo-r12 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz
Gentoo Base System version 1.4.16
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.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/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/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache prelink sandbox"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/
http://trumpetti.atm.tut.fi/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa apm audiofile avi berkdb bitmap-fonts bonobo cdr crypt cups
divx4linux dvd dvdr encode esd ethereal evo f77 fbcon flac foomaticdb gdbm gif
gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml icq imap imlib java joystick jpeg
libg++ libwww lirc mad mikmod motif mozilla mpeg msn ncurses nls offensive
oggvorbis opengl oss pam pdflib perl pic png python quicktime readline samba
sdl slang spell ssl svga tcltk tcpd tetex tiff truetype unicode usb videos x
x86 xml2 xmms xprint xv xvid yahoo zlib"

------- Comment #6 From Dinil Penne 2004-10-15 08:10:02 0000 -------
I tried setting PORTAGE_TMPDIR to /root/portage_tmp but got the same errors. 
Thanks for the tip tho.

Then I noticed that my brand spankin new install of glibc was using pthreads
as the default threading model, despite my use of the nptl USE flag. This is
not good!! I appreciate glibc building both pthreads & nptl by default, but
if I have nptl in my use flags, I expect the default to be NPTL threads.

So perhaps the quote.o.lock problem has something to do with this. Tryng to
restart install, this time with the nptlonly flag, and if I hit the same
problem again, I'll post a new bug report.

I have some knowledge of Gentoo, and I'm updating Gentoo using a chroot 
within Gentoo, but I can't even imagine how a new potential gentoo user
(as in me 4 months ago) would try and resolve this.

------- Comment #7 From Dinil Penne 2004-10-15 16:22:12 0000 -------
In case anyone else hits this problem with acl or attr getting stuck in a lock,
here's the fix, or what worked for me.

Start acl/attr emerge. It'll go into a recursive loop at some point, giving a
message - "Waiting for quote.o.lock to be removed"

Kill the merge using Ctrl-C or Ctrl-Z.

cd $PORTAGE_TMPDIR/portage/acl-<version>/work/acl-<version>

edit file include/builddefs, changing one line 
    from: DEBUG = -DNDEBUG 
    to:   DEBUG = -DDEBUG 

run 'make'

cd $PORTAGE_DIR/sys-app/acl/

ebuild acl-<version>.ebuild package merge clean

That's it!

Works for both acl & attr. I have no idea about the how or why's of this, just
thought I'd post my solution to save the next poor soul who gets hit with this
bug some time.

------- Comment #8 From Robin Johnson 2004-11-16 22:13:41 0000 -------
reopening as I've found the cause of this - libtool!

libtool tries to run:
until $run ln "$0" "$lockfile" 2>/dev/null; do
$show "Waiting for $lockfile to be removed"
sleep 2
done

if lockfile resides on a different partition to libtool, then this fails in an infinite loop without any message as to why.
taking out the 2>/dev/null, we get this message:
ln: creating hard link `quote.o.lock' to `/usr/bin/libtool': Invalid cross-device link

this affects any package that uses libtool for compiling if the user has /usr/bin and /var/tmp/portage on different partitions.

here it was discussed inconclusively on the libtool mailing list:
http://lists.gnu.org/archive/html/bug-libtool/2003-02/msg00010.html

------- Comment #9 From Robin Johnson 2004-11-16 22:20:26 0000 -------
Created an attachment (id=44138) [edit]
libtool-1.5.2-r7-lockingfix.diff

attached is a patch for libtool-1.5.2-r7 that fixes the problem.

------- Comment #10 From SpanKY 2004-11-16 22:28:59 0000 -------
and if you read the forum link provided, we knew libtool was the problem ...

no one posted a patch though, just to fix your tmp dirs

where did said patch come from ?

------- Comment #11 From SpanKY 2004-11-16 22:32:16 0000 -------
try libtool-1.5.10

they re-wrote the locking code with that version

------- Comment #12 From Robin Johnson 2004-11-16 23:39:05 0000 -------
i cooked up the patch myself.
i actually independantly ran into this problem, and traced it down to libtool, and then came to file a bug for the libtool folk, but found this one existing already.

------- Comment #13 From SpanKY 2004-11-17 08:50:56 0000 -------
you still havent answered my question ;)

does 1.5.10 resolve the locking problem ?

i'm inclined to move 1.5.2-r7 to stable and 1.5.10 into unstable rather than develop another unstable ebuild with this patch

------- Comment #14 From SpanKY 2004-11-19 22:51:25 0000 -------
well i'm going to assume 1.5.10 handles the locking properly which means the
patch wont be added to 1.5.2

------- Comment #15 From Robin Johnson 2004-11-20 00:05:43 0000 -------
for having supposedly re-written locking code in 1.5.10, it's surprisingly
functionally identical in 1.5.10, and still has the bug.

see line 1172 in the 1.5.10 /usr/bin/libtool

my patch will apply perfectly on the new version, and work if you do:
sed 's,$0,$progpath,g' -i patchfile

(they renamed one variable).

------- Comment #16 From SpanKY 2004-11-21 15:37:10 0000 -------
ok, the claim that they re-wrote the locking code was simply my glancing at the
two side by side

i'll see about adding the patch to 1.5.10

------- Comment #17 From SpanKY 2004-11-29 20:01:10 0000 -------
1.5.10 is now in unstable and has this patch

------- Comment #18 From SpanKY 2004-12-23 14:33:37 0000 -------
ok, proposed patch doesnt work ... test ebuild is parted-1.6.18 ...

with patch we get this (without patch, it works fine):

Making all in fs_ext2
make[3]: Entering directory `/var/tmp/portage/parted-1.6.18/work/parted-1.6.18/libparted/fs_ext2'
source='ext2.c' object='ext2.lo' libtool=yes \
depfile='.deps/ext2.Plo' tmpdepfile='.deps/ext2.TPlo' \
depmode=gcc3 /bin/sh ../../depcomp \
/bin/sh ../../libtool --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include     -pipe -march=pentium4 -O2 -frename-registers -fomit-frame-pointer -mmmx -msse -msse2 -fdelete-null-pointer-checks -funroll-loops -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=no -DLOCALEDIR="\"/usr/share/locale\"" -DLOCALEDIR="\"/usr/share/locale\"" -W -Wall -Wno-unused -Wno-switch -Wno-format -c -o ext2.lo `test -f 'ext2.c' || echo './'`ext2.c
Waiting for ext2.o.lock to be removed
Waiting for ext2.o.lock to be removed
Waiting for ext2.o.lock to be removed
Waiting for ext2.o.lock to be removed

------- Comment #19 From Robin Johnson 2004-12-23 15:28:29 0000 -------
vapier: I can't reproduce that on the new libtool, but I can reproduce it on
the old one.

------- Comment #20 From SpanKY 2004-12-23 17:37:48 0000 -------
weird, all i have to do is `emerge libtool parted` (1.5.10-r2) and the bug
crops up

however, my /var/tmp/portage is on a diff partition than libtool (which is
where this bug crops up anyways)

/dev/hda4 on / type ext3 (rw)
/dev/hdd4 on /mnt/space type ext3 (rw)
/mnt/space/tmp on /var/tmp/portage type none (rw,bind)

my /usr/bin/libtool resides on hda4 while parted is being built on hdd4

------- Comment #21 From Robin Johnson 2004-12-23 20:42:26 0000 -------
emerge --sync && FEATURES="-ccache" PORTAGE_TMPDIR=/dev/shm emerge libtool
parted

and it works perfectly fine on my test box. I just turned off ccache to be damn
sure. Even if I use an actual disk instead of tmpfs, it still builds.

------- Comment #22 From SpanKY 2005-01-02 21:47:04 0000 -------
ah well whatever, i guess we'll just close this until someone else can
reproduce it :P

------- Comment #23 From SpanKY 2005-04-23 00:04:22 0000 -------
*** Bug 73721 has been marked as a duplicate of this bug. ***

First Last Prev Next    No search results available      Search page      Enter new bug