Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140436 - ACCESS VIOLATION caused by symlink for /var/tmp/portage
Summary: ACCESS VIOLATION caused by symlink for /var/tmp/portage
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-14 20:41 UTC by David Watzke
Modified: 2009-02-12 07:45 UTC (History)
2 users (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 David Watzke 2006-07-14 20:41:16 UTC
>>> checking ebuild checksums ;-)
>>> checking auxfile checksums ;-)
>>> checking miscfile checksums ;-)
>>> checking acct-6.3.5-ts02-12.tar.gz ;-)
ACCESS DENIED  open_wr:   /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
/usr/lib/portage/bin/ebuild.sh: line 1126: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log: Permission denied
ACCESS DENIED  open_wr:   /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
/usr/lib/portage/bin/ebuild.sh: line 1126: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log: Permission denied
ACCESS DENIED  open_wr:   /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
/usr/lib/portage/bin/ebuild.sh: line 1126: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log: Permission denied
ACCESS DENIED  open_wr:   /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
/usr/lib/portage/bin/ebuild.sh: line 1126: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log: Permission denied
ACCESS DENIED  mkdir:     /data/gentoo/var/tmp/portage/acct-6.3.5-r2/work
install: cannot create directory `/var/tmp/portage/acct-6.3.5-r2/work': Permission denied

!!! ERROR: sys-process/acct-6.3.5-r2 failed.
Call stack:
  ebuild.sh, line 1545:   Called dyn_unpack
  ebuild.sh, line 707:   Called die

!!! Failed to create dir '/var/tmp/portage/acct-6.3.5-r2/work'
!!! If you need support, post the topmost build error, and the call stack if relevant.

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/var/log/sandbox/sandbox-sys-process_-_acct-6.3.5-r2-3371.log"

VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: open_wr
S: deny
P: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
A: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
R: /data/gentoo/var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
C: /bin/bash /usr/lib/portage/bin/ebuild.sh unpack

F: chmod
S: deny
P: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
A: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
R: /data/gentoo/var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
C: chmod g+w /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log

F: open_wr
S: deny
P: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
A: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
R: /data/gentoo/var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
C: /bin/bash /usr/lib/portage/bin/ebuild.sh unpack

F: chmod
S: deny
P: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
A: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
R: /data/gentoo/var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
C: chmod g+w /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log

F: open_wr
S: deny
P: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
A: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
R: /data/gentoo/var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
C: /bin/bash /usr/lib/portage/bin/ebuild.sh unpack

F: chmod
S: deny
P: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
A: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
R: /data/gentoo/var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
C: chmod g+w /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log

F: open_wr
S: deny
P: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
A: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
R: /data/gentoo/var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
C: /bin/bash /usr/lib/portage/bin/ebuild.sh unpack

F: chmod
S: deny
P: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
A: /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
R: /data/gentoo/var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log
C: chmod g+w /var/tmp/portage/acct-6.3.5-r2/temp/eclass-debug.log

F: mkdir
S: deny
P: work
A: /data/gentoo/var/tmp/portage/acct-6.3.5-r2/work
R: /data/gentoo/var/tmp/portage/acct-6.3.5-r2/work
C: install -m0755 -d /var/tmp/portage/acct-6.3.5-r2/work
--------------------------------------------------------------------------------
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2006-07-15 02:42:47 UTC
Works fine here.  Please include emerge --info and some extra info if you have symlinks or bind mounts, etc for /var/tmp/portage.
Comment 2 David Watzke 2006-07-15 06:55:47 UTC
It was caused by symlink
cd /var/tmp
ln -s /data/gentoo/var/tmp/portage
Sorry :-(
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2006-07-15 07:11:32 UTC
Hmm, that should in theory be ok.  I will test that when I have some time here.
Comment 4 David Watzke 2006-07-15 08:46:21 UTC
Yes, it should. After changing PORTAGE_TMPDIR to /data/gentoo/var/tmp it's OK, but I think it was OK even with that symlink ... one time.

Anyway, changing summary...
Comment 5 David Watzke 2006-07-15 08:52:58 UTC
Btw, I have set ACL permissions on /data

$ getfacl /data
getfacl: Removing leading '/' from absolute path names
# file: data
# owner: dave
# group: home
user::rwx
user:dave:rwx
user:petr:rwx
group::rwx
mask::rwx
other::r-x
default:user::rwx
default:group::rwx
default:group:home:rwx
default:mask::rwx
default:other::r-x

But it should not have any effect to root, hm?
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2006-07-19 09:49:30 UTC
PS, I think I know what the issue is (ripping of PORTAGE_TMPDIR logic due to ferringb's insistance), but for the mean time you can do:

 # echo 'SANDBOX_WRITE="/data/gentoo/var/tmp/portage"' > /etc/sandbox.d/99mywrite

or something similar.
Comment 7 David Watzke 2006-07-19 12:22:28 UTC
True that. It works OK when:

# grep TMP /etc/make.conf
PORTAGE_TMPDIR=/data/gentoo/var/tmp

and

# grep TMP /etc/make.conf
PORTAGE_TMPDIR=/var/tmp
# cat /etc/sandbox.d/99mywrite
SANDBOX_WRITE="/data/gentoo/var/tmp/portage"
Comment 8 Jerome 2007-09-23 09:54:45 UTC
Hello,

I just had the following error message
by running "emerge -DNu world" (updating x11-libs/vte-0.16.8),
maybe it is related:
"""
ACCESS DENIED  unlink:    /usr/share/pygtk/2.0/codegen/argtypes.pyc
ACCESS DENIED  unlink:    /usr/share/pygtk/2.0/codegen/definitions.pyc
ACCESS DENIED  unlink:    /usr/share/pygtk/2.0/codegen/defsparser.pyc
ACCESS DENIED  unlink:    /usr/share/pygtk/2.0/codegen/scmexpr.pyc
ACCESS DENIED  unlink:    /usr/share/pygtk/2.0/codegen/override.pyc
ACCESS DENIED  unlink:    /usr/share/pygtk/2.0/codegen/reversewrapper.pyc
(...)
make[2]: Leaving directory `/var/tmp/portage/x11-libs/vte-0.16.8/work/vte-0.16.8/gnome-pty-helper'
make[2]: Entering directory `/var/tmp/portage/x11-libs/vte-0.16.8/work/vte-0.16.8'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/var/tmp/portage/x11-libs/vte-0.16.8/work/vte-0.16.8'
make[1]: Leaving directory `/var/tmp/portage/x11-libs/vte-0.16.8/work/vte-0.16.8'
>>> Source compiled.
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/var/log/sandbox/sandbox-x11-libs_-_vte-0.16.8-6280.log"

unlink:    /usr/share/pygtk/2.0/codegen/argtypes.pyc
unlink:    /usr/share/pygtk/2.0/codegen/definitions.pyc
unlink:    /usr/share/pygtk/2.0/codegen/defsparser.pyc
unlink:    /usr/share/pygtk/2.0/codegen/scmexpr.pyc
unlink:    /usr/share/pygtk/2.0/codegen/override.pyc
unlink:    /usr/share/pygtk/2.0/codegen/reversewrapper.pyc
--------------------------------------------------------------------------------
"""
Comment 9 David Watzke 2007-09-23 10:39:32 UTC
It's not related, your error is caused by broken ebuild, which is trying to delete some files from the live system.
Comment 10 SpanKY gentoo-dev 2009-02-12 07:07:52 UTC
i think the behavior we see in sandbox is correct and we dont want to change it

that means portage itself will have to detect the symlink and add an appropriate entry to SANDBOX_WRITE during its init steps ...
Comment 11 Zac Medico gentoo-dev 2009-02-12 07:45:18 UTC
This should already be solved on the portage side by resolving the symlink as part of the ebuild environment setup. Please reopen if necessary.