Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 100309 - recent portage/sandbox changes seem to cause access voilation
Summary: recent portage/sandbox changes seem to cause access voilation
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: PPC64 Linux
: High normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-25 18:37 UTC by Cameron Blackwood
Modified: 2005-07-27 11:05 UTC (History)
1 user (show)

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 Cameron Blackwood 2005-07-25 18:37:09 UTC
Until last week, things were great with portage, but recently ive been getting
lots of ACCESS VIOLATIONs while ebuilding. Initially I thought it was just
e2fsprogs, but im getting it on other packages too (like xorg).

Winding back portage _fixes_ the problem.
Most recent portage with all versions of sandbox _dont_ fix it.
Building with -sandbox fixes the problem, but it isnt really a solution.

Manually making the required paths fixes some of the problems...

Reproducible: Always
Steps to Reproduce:
1. emerge e2fsprogs

gives:

(build is ok upto....)
make[1]: Leaving directory `/rest/portage/build_tmp/portage/e2fsprogs-1.38/work/
e2fsprogs-1.38/lib/uuid'
making install-shlibs in lib/blkid
make[1]: Entering directory `/rest/portage/build_tmp/portage/e2fsprogs-1.38/work
/e2fsprogs-1.38/lib/blkid'
        MKINSTALLDIRS /usr/lib /usr/lib
        INSTALL-ELF-LIB /usr/lib/libblkid.so.1.0
        SYMLINK /usr/lib/libblkid.so.1
        SYMLINK /usr/lib/libblkid.so
        LDCONFIG
make[1]: Leaving directory `/rest/portage/build_tmp/portage/e2fsprogs-1.38/work/
e2fsprogs-1.38/lib/blkid'
making install-shlibs in intl
make[1]: Entering directory `/rest/portage/build_tmp/portage/e2fsprogs-1.38/work
/e2fsprogs-1.38/intl'
make[1]: Nothing to be done for `install-shlibs'.
make[1]: Leaving directory `/rest/portage/build_tmp/portage/e2fsprogs-1.38/work/
e2fsprogs-1.38/intl'
make[1]: Entering directory `/rest/portage/build_tmp/portage/e2fsprogs-1.38/work
/e2fsprogs-1.38/doc'
ACCESS DENIED   unlink:    /portage/build_tmp/portage/e2fsprogs-1.38/image/usr/s
hare/info/libext2fs.info*
/bin/rm: cannot remove `/portage/build_tmp/portage/e2fsprogs-1.38/image//usr/sha
re/info/libext2fs.info*': Permission denied
make[1]: *** [install-doc-libs] Error 1
make[1]: Leaving directory `/rest/portage/build_tmp/portage/e2fsprogs-1.38/work/
e2fsprogs-1.38/doc'
make: [install-doc-libs] Error 2 (ignored)
make install-libs
make[1]: Entering directory `/rest/portage/build_tmp/portage/e2fsprogs-1.38/work
/e2fsprogs-1.38'
making install in lib/e2p

(This is because /portage/build_tmp/portage/e2fsprogs-1.38/image/usr/s
hare/info doesnt exist... if I mkdir -p this directory before it gets here, this
one goes away)

continuing on...

make[2]: Leaving directory
`/rest/portage/build_tmp/portage/e2fsprogs-1.38/work/e2fsprogs-1.38/intl'      
       
make[1]: Leaving directory
`/rest/portage/build_tmp/portage/e2fsprogs-1.38/work/e2fsprogs-1.38'           
       
ACCESS DENIED   symlink:  
/portage/build_tmp/portage/e2fsprogs-1.38/image/usr/lib/lib/libcom_err.a       
       
ln: creating symbolic link
`/portage/build_tmp/portage/e2fsprogs-1.38/image/usr/lib/lib/libcom_err.a' to
`//usr/lib/libcom_err.a': Permission denied
man:                              
gzipping man page: e2fsck.8       
fixing man page symlink: fsck.ext2.8.gz
removing old symlink: fsck.ext2.8 
fixing man page symlink: fsck.ext3.8.gz
removing old symlink: fsck.ext3.8 
gzipping man page: debugfs.8      
gzipping man page: tune2fs.8      
gzipping man page: mklost+found.8 
gzipping man page: mke2fs.8       
gzipping man page: dumpe2fs.8     
gzipping man page: badblocks.8    
gzipping man page: e2label.8      
gzipping man page: findfs.8       


(this one is because its a symlink to libcom_err.a that is done in the ebuild
which is:
    ln -s "${ROOT}"/usr/$(get_libdir)/libcom_err.a lib/libcom_err.a
    ln -s "${ROOT}"/usr/$(get_libdir)/libcom_err.so lib/libcom_err.so
)

(note get_libdir expands to lib/lib?)

(Anyway /portage/build_tmp/portage/e2fsprogs-1.38/image/usr/lib/lib doesnt exist.)

The emerge ends with:making executable: /usr/lib/libblkid.so
making executable: /usr/lib/libe2p.so
making executable: /usr/lib/libext2fs.so
making executable: /usr/lib/libuuid.so
>>> Completed installing e2fsprogs-1.38 into
/portage/build_tmp/portage/e2fsprogs-1.38/image/

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-sys-fs_-_e2fsprogs-1.38-30407.log"

unlink:   
/portage/build_tmp/portage/e2fsprogs-1.38/image/usr/share/info/libext2fs.info*
symlink:   /portage/build_tmp/portage/e2fsprogs-1.38/image/usr/lib/lib/libcom_err.a
--------------------------------------------------------------------------------

and doesnt actually install the package.

Reverting to an old portage fixes the problem.
Reverting to any version of sandbox with the current portage doesnt.
Adding "-sandbox" to features fixes the problem.


Expected Results:  
Installed correctly like older versions of portage.

root@kali /etc/X11/app-defaults # epm -q sandbox
sandbox-1.2.9
root@kali /etc/X11/app-defaults # epm -q portage
portage-2.0.51.22-r2

root@kali /etc/X11/app-defaults # emerge info
Portage 2.0.51.22-r2 (!/usr/portage/profiles/default-linux/ppc64/2004.3, gcc-3.4
.4, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r8 ppc64)
=================================================================
System uname: 2.6.11-gentoo-r8 ppc64 PPC970, altivec supported
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.9
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.5
sys-devel/binutils:  2.15.90.0.3-r5
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="ppc64"
AUTOCLEAN="yes"
CBUILD="powerpc64-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=G5 -pipe -maltivec -mabi=altivec -fno-strict-aliasing
-mpowerpc-gfxopt -mmultiple -mstring"
CHOST="powerpc64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=G5 -pipe -maltivec -mabi=altivec -fno-strict-aliasing
-mpowerpc-gfxopt -mmultiple -mstring"
DISTDIR="/portage/distfiles"
FEATURES="autoconfig ccache distlocks nostrip sandbox sfperms strict"
GENTOO_MIRRORS="http://kali.cs.mu.oz.au/gentoo/ http://rahu.cs.mu.oz.au/gentoo/
http://ftp.monash.edu.au/pub/linux/gentoo/ http://128.213.5.34/gentoo/
http://mirror.datapipe.net/gentoo http://gentoo.eliteitminds.com
http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ http://gentoo.llarian.net/
ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/
ftp://mirror.pacific.net.au/linux/Gentoo"
MAKEOPTS="-j3"
PKGDIR="/portage/packages"
PORTAGE_TMPDIR="/portage/build_tmp"
PORTDIR="/portage/portage_tree"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rahu.cs.mu.oz.au/gentoo-portage"
USE="ppc64 X alsa berkdb bitmap-fonts cdr crypt dvdr emboss escreen esd fam
fbcon font-server fortran gdbm gif gpm gtk jpeg motif mozcalendar mozilla
ncurses nls opengl pam perl png python readline sdk slang ssl tcpd terminfo
threads tiff truetype truetype-fonts type1-fonts unicode xinerama xml2 xv zlib
video_cards_riva userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS

This happens under my ppc64 system.
Also my chrooted ppc32 install (on the same machine, but different install
obviously)

It clags up my emerge's no end, but as it only seems to be me, its not critical.

It happens on other packages too, so im not sure if its a problem with:

  * my system only (just happens to effect my ppc64 and ppc32 since the last
portage update) (Maybe something is wrong with my portage tree, although I have
resynced it)

  * the lastest portage and lots of ebuilds (wouldnt other people have seen this
too then?)

  * ppc64 sandbox or portage? (Doubtful, as wouldnt other people have seen it)

Im not sure why other people havnt seen this too... ?

Help! :)
Comment 1 Cameron Blackwood 2005-07-25 18:41:41 UTC
Note, where I said: 
  (note get_libdir expands to lib/lib?)
thats wrong.. it seems that the current directory where the ebuild could be
/portage/build_tmp/portage/e2fsprogs-1.38/image/usr/lib/ ??

Actually, I think i give up trying to work out where:
ln: creating symbolic link
`/portage/build_tmp/portage/e2fsprogs-1.38/image/usr/lib/lib/libcom_err.a' to
`//usr/lib/libcom_err.a': Permission denied

is coming from.. 
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-07-26 00:07:47 UTC
Upgrade sandbox to 1.2.11 and try again. Reopen if you still have problems with
that version.
Comment 3 Cameron Blackwood 2005-07-26 05:58:02 UTC
Didnt fix it. Already tried that...

"Most recent portage with all versions of sandbox _dont_ fix it."
Someone on @gentoo-ppc suggested I wind back portage (which fixed it) and then
put back the most recent portage and try winding back sandbox.

portage-2.0.51.22-r2.ebuild DOES NOT work with any version of sandbox I tried.
sandbox-1.2.10.ebuild failed
sandbox-1.2.11.ebuild failed
sandbox-1.2.9.ebuild failed

portage-2.0.51.19.ebuild works fine, but I gather that doesnt use the seperate
sandbox package. This only started happenening in the last week or so, which is
(from memory) when most recent portage/sandbox went in.

Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-26 06:30:55 UTC
The only real issue I can see, is that the path's that works starts with:

  /rest/portage/build_tmp

and those that fails starts with:

  /portage/build_tmp

Do you have symlinks or some other weird setup there ??
Comment 5 Cameron Blackwood 2005-07-26 09:01:55 UTC
Yep, its a link...

korg@kali portage/sys-apps/sandbox $ ls -l /portage
lrwxrwxrwx  1 root root 13 Jun 21 18:16 /portage -> /rest/portage


One of the errors: 
ACCESS DENIED   unlink:   
/portage/build_tmp/portage/e2fsprogs-1.38/image/usr/share/info/libext2fs.info*

is being cause because there is _no_
/portage/build_tmp/portage/e2fsprogs-1.38/image/usr/share/info/

I can make the directory (if im quick at the right stage of the ebuild) and that
fixes it, but the previous version of portage doesnst have this problem and it
actually installs it ok.Using the older portage to install e2fsprogs, I have a
file: 
-rw-r--r--  1 root root 12112 Jul 25 13:26 /usr/share/info/libext2fs.info.gz
so doesnt that indicate that something is odd/wrong with sandbox? (Or sandbox on
my system, anyway)

I assume using portage-2.0.51.22-r2 and sandbox-1.2.11 you can emerge
e2fsprogs-1.38 with no problems at all?
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-26 12:15:15 UTC
(In reply to comment #5)
> Yep, its a link...
> 
> korg@kali portage/sys-apps/sandbox $ ls -l /portage
> lrwxrwxrwx  1 root root 13 Jun 21 18:16 /portage -> /rest/portage
> 

Can you try to set PORTAGE_TMPDIR to "/rest/portage" rather and see if that
changes anything ?

> 
> One of the errors: 
> ACCESS DENIED   unlink:   
> /portage/build_tmp/portage/e2fsprogs-1.38/image/usr/share/info/libext2fs.info*
> 
> is being cause because there is _no_
> /portage/build_tmp/portage/e2fsprogs-1.38/image/usr/share/info/
> 
> I can make the directory (if im quick at the right stage of the ebuild) and that
> fixes it, but the previous version of portage doesnst have this problem and it
> actually installs it ok.Using the older portage to install e2fsprogs, I have a
> file: 
> -rw-r--r--  1 root root 12112 Jul 25 13:26 /usr/share/info/libext2fs.info.gz
> so doesnt that indicate that something is odd/wrong with sandbox? (Or sandbox on
> my system, anyway)
> 
> I assume using portage-2.0.51.22-r2 and sandbox-1.2.11 you can emerge
> e2fsprogs-1.38 with no problems at all?
> 

Yup.  I think the whole issue is related to PORTAGE_TMPDIR pointing to a symlink
... just want to verify that it fixes the issue before I start digging into it.
Comment 7 Cameron Blackwood 2005-07-26 17:38:45 UTC
Ooooooooooooook.... that fixes it. Yep, its PORTAGE_TMPDIR (and not any of the
others) pointing to a link.

Maybe emerge should check for that? That has to save lots of these bug requests.
:) :) :)

Anyway, thanks.

(Im not sure about marking it as FIXED, so Ill leave that upto you.)
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-27 11:05:34 UTC
Found the issue .. it was sandbox that tried to be clever, and did not leave
resolving symlinks to libsandbox.  Will be fixed in next version.