Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 218559 - Sandbox Access Violations using sqlite backend in portage
Summary: Sandbox Access Violations using sqlite backend in portage
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 216231
  Show dependency tree
 
Reported: 2008-04-20 12:31 UTC by emerald
Modified: 2008-04-21 21:37 UTC (History)
0 users

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


Attachments
emerge --info (emerge.info,17.48 KB, text/plain)
2008-04-20 12:32 UTC, emerald
Details
add write access to /var/cache/edb/dep when appropriate (sandbox.patch,901 bytes, patch)
2008-04-20 20:56 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description emerald 2008-04-20 12:31:54 UTC
emerge bails out with a sandbox violation:

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/var/log/sandbox/sandbox-419461.log"

open_wr:   /var/cache/edb/dep/usr/portage.sqlite
open_wr:   /var/cache/edb/dep/usr/portage/local/layman/java-overlay.sqlite
open_wr:   /var/cache/edb/dep/usr/portage/local/layman/toolchain.sqlite
open_wr:   /var/cache/edb/dep/usr/portage/local/layman/vmware.sqlite
open_wr:   /var/cache/edb/dep/usr/portage/local/layman/java-gcj-overlay.sqlite
open_wr:   /var/cache/edb/dep/usr/portage/local/layman/fry-overlay.sqlite
open_wr:   /var/cache/edb/dep/usr/portage/local/layman/sunrise.sqlite
open_wr:   /var/cache/edb/dep/usr/portage/local/layman/arcon.sqlite
open_wr:   /var/cache/edb/dep/usr/local/portage.sqlite
--------------------------------------------------------------------------------

I use the
   /etc/portage/modules
to change the cache module to sqlite:
   portdbapi.auxdbmodule = cache.sqlite.database

Actually, the sandbox access violation errors occur quite often recently. :(
Comment 1 emerald 2008-04-20 12:32:48 UTC
Created attachment 150384 [details]
emerge --info
Comment 2 emerald 2008-04-20 12:39:28 UTC
btw, compiling sandbox with plain CFLAGS (-march=athlon64 -O2) doesn't help anythign at all
Comment 3 emerald 2008-04-20 12:57:35 UTC
actually, it fails during src_unpack() already

 * Checking for at least 512MBytes RAM ...                                [ ok ]
 * Checking for at least 5120MBytes disk space at ${T} ...                [ ok ]
 * Using: sun-jdk-1.6
 * Found db version 4.5
>>> Unpacking source...
>>> Unpacking ooo-build-2.4.0.7.tar.gz to /home/tmp/portage/app-office/openoffice-2.4.0/work
 * Applying gentoo-2.4.0.diff ...                                         [ ok ]
 * Applying ooo-env_log.diff ...                                          [ ok ]
ACCESS DENIED  open_wr:   /var/cache/edb/dep/usr/portage.sqlite
ACCESS DENIED  open_wr:   /var/cache/edb/dep/usr/portage/local/layman/toolchain.sqlite
ACCESS DENIED  open_wr:   /var/cache/edb/dep/usr/portage/local/layman/vmware.sqlite
ACCESS DENIED  open_wr:   /var/cache/edb/dep/usr/portage/local/layman/fry-overlay.sqlite
ACCESS DENIED  open_wr:   /var/cache/edb/dep/usr/portage/local/layman/sunrise.sqlite
ACCESS DENIED  open_wr:   /var/cache/edb/dep/usr/portage/local/layman/arcon.sqlite
ACCESS DENIED  open_wr:   /var/cache/edb/dep/usr/local/portage.sqlite
 * Running eautoreconf in '/home/tmp/portage/app-office/openoffice-2.4.0/work/ooo' ...
 * Running aclocal ...                                                    [ ok ]
 * Running autoconf ...                                                   [ ok ]
 * Running automake --add-missing --copy ...                              [ ok ]
>>> Source unpacked.
Comment 4 Zac Medico gentoo-dev 2008-04-20 20:18:18 UTC
This seems to be triggered by the ebuild calling java-config which uses the portage api. We should be able to fix the portage api to detect potential sandbox violations like this and avoid them.
Comment 5 Zac Medico gentoo-dev 2008-04-20 20:56:39 UTC
Created attachment 150459 [details, diff]
add write access to /var/cache/edb/dep when appropriate

If this patch is saved as /tmp/sandbox.patch, then it can be applied as follows:

patch /usr/lib/portage/pym/portage.py /tmp/sandbox.patch
Comment 6 emerald 2008-04-20 21:20:58 UTC
the patch seems to have fixed this problem,
openoffice unpack and, i tested pdfbox, where i remeber the error occured too the problem doesn't occur anymore.
another thing still keeps popping up (i forgot to mention beforehand), when installing portage (most recent ~ version):

 * Generating api docs
ACCESS DENIED  open_wr:   /var/cache/edb/dep/usr/portage.sqlite
ACCESS DENIED  open_wr:   /var/cache/edb/dep/usr/portage/local/layman/toolchain.sqlite
ACCESS DENIED  open_wr:   /var/cache/edb/dep/usr/portage/local/layman/vmware.sqlite
ACCESS DENIED  open_wr:   /var/cache/edb/dep/usr/portage/local/layman/fry-overlay.sqlite
ACCESS DENIED  open_wr:   /var/cache/edb/dep/usr/portage/local/layman/sunrise.sqlite
ACCESS DENIED  open_wr:   /var/cache/edb/dep/usr/portage/local/layman/arcon.sqlite
ACCESS DENIED  open_wr:   /var/cache/edb/dep/usr/portage/local/layman/java-gcj-overlay.sqlite
ACCESS DENIED  open_wr:   /var/cache/edb/dep/usr/portage/local/layman/java-overlay.sqlite
ACCESS DENIED  open_wr:   /var/cache/edb/dep/usr/local/portage.sqlite
>>> Source compiled.
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/var/log/sandbox/sandbox-1599517.log"

open_wr:   /var/cache/edb/dep/usr/portage.sqlite
open_wr:   /var/cache/edb/dep/usr/portage/local/layman/toolchain.sqlite
open_wr:   /var/cache/edb/dep/usr/portage/local/layman/vmware.sqlite
open_wr:   /var/cache/edb/dep/usr/portage/local/layman/fry-overlay.sqlite
open_wr:   /var/cache/edb/dep/usr/portage/local/layman/sunrise.sqlite
open_wr:   /var/cache/edb/dep/usr/portage/local/layman/arcon.sqlite
open_wr:   /var/cache/edb/dep/usr/portage/local/layman/java-gcj-overlay.sqlite
open_wr:   /var/cache/edb/dep/usr/portage/local/layman/java-overlay.sqlite
open_wr:   /var/cache/edb/dep/usr/local/portage.sqlite
--------------------------------------------------------------------------------
Comment 7 Zac Medico gentoo-dev 2008-04-20 21:52:29 UTC
(In reply to comment #6)
> another thing still keeps popping up (i forgot to mention beforehand), when
> installing portage (most recent ~ version):

This is to be expected since none of the current ebuilds have this patch. If you copy the ebuild to overlay apply the patch to portage.py inside src_unpack(), it will solve the problem.
Comment 8 emerald 2008-04-20 22:02:19 UTC
ok, yes, the patched ebuild fixes this one too
thanks
Comment 9 Zac Medico gentoo-dev 2008-04-21 21:37:42 UTC
Thanks for testing. This is fixed in 2.1.5_rc6.