* [gentoo-embedded] locales / sandbox violations
@ 2011-03-22 10:26 Martin Gysel
2011-03-22 13:30 ` Kfir Lavi
2011-03-22 14:18 ` Mike Frysinger
0 siblings, 2 replies; 3+ messages in thread
From: Martin Gysel @ 2011-03-22 10:26 UTC (permalink / raw
To: gentoo-embedded
Hi
I installed a dev chroot on 2 different systems each, both x64, one
gentoo, one ubuntu as host. in both chroots I created a x-compiler using
crossdev. in the first one I downloaded a prebuilt armv5tel stage and
rebuilt it so it uses my USE flags using the x-compiler and qemu
(depending on pkg). everything went fine so far. in the second chroot I
used the binpkg from the first one to set up the arm sysroot/root. now
if I chroot into the sysroot on the second using qemu I get some access
violations from the sandbox:
ACCESS DENIED open_wr: /dev/null
/usr/lib/portage/bin/ebuild.sh: line 1558: /dev/null: Permission denied
<snip>
--------------------------- ACCESS VIOLATION SUMMARY
---------------------------
LOG FILE "/var/log/sandbox/sandbox-10088.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: /dev/null
A: /dev/null
R: /dev/null
C: /qemu-wrapper -cpu arm926 /bin/bash /usr/lib/portage/bin/ebuild.sh unpack
after some googling I found a forum thread saying it's a locale issue.
so I tried to play with the locale settings. now depending on the locale
it stop at different stages during emerge. switching of the sandbox also
works... (which I sometimes need to do anyway as the there's a
sandbox/qemu 'malloc' issue)
has someone experienced a similar behavior or knows a solution for this?
does it help if I try to rebuild everything with my 'new' locale
settings? can it be a problem to have not set the same locales in the
'sysroot/qemu chroot' than for the x-compiler?
btw, the glibc natively built using qemu dosen't work but the x-compiled
works fine...
thanks
martin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-embedded] locales / sandbox violations
2011-03-22 10:26 [gentoo-embedded] locales / sandbox violations Martin Gysel
@ 2011-03-22 13:30 ` Kfir Lavi
2011-03-22 14:18 ` Mike Frysinger
1 sibling, 0 replies; 3+ messages in thread
From: Kfir Lavi @ 2011-03-22 13:30 UTC (permalink / raw
To: gentoo-embedded
[-- Attachment #1: Type: text/plain, Size: 2514 bytes --]
On Tue, Mar 22, 2011 at 12:26 PM, Martin Gysel <m.gysel@gmx.ch> wrote:
> Hi
>
> I installed a dev chroot on 2 different systems each, both x64, one
> gentoo, one ubuntu as host. in both chroots I created a x-compiler using
> crossdev. in the first one I downloaded a prebuilt armv5tel stage and
> rebuilt it so it uses my USE flags using the x-compiler and qemu
> (depending on pkg). everything went fine so far. in the second chroot I
> used the binpkg from the first one to set up the arm sysroot/root. now
> if I chroot into the sysroot on the second using qemu I get some access
> violations from the sandbox:
> ACCESS DENIED open_wr: /dev/null
> /usr/lib/portage/bin/ebuild.sh: line 1558: /dev/null: Permission denied
> <snip>
> --------------------------- ACCESS VIOLATION SUMMARY
> ---------------------------
> LOG FILE "/var/log/sandbox/sandbox-10088.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: /dev/null
> A: /dev/null
> R: /dev/null
> C: /qemu-wrapper -cpu arm926 /bin/bash /usr/lib/portage/bin/ebuild.sh
> unpack
>
> after some googling I found a forum thread saying it's a locale issue.
> so I tried to play with the locale settings. now depending on the locale
> it stop at different stages during emerge. switching of the sandbox also
> works... (which I sometimes need to do anyway as the there's a
> sandbox/qemu 'malloc' issue)
> has someone experienced a similar behavior or knows a solution for this?
> does it help if I try to rebuild everything with my 'new' locale
> settings? can it be a problem to have not set the same locales in the
> 'sysroot/qemu chroot' than for the x-compiler?
>
> btw, the glibc natively built using qemu dosen't work but the x-compiled
> works fine...
>
> thanks
> martin
>
> If I'm understanding correctly, when you chroot on your Gentoo machine,
everything goes fine.
If you chroot on the Ubuntu machine, you get this problem.
Is that correct?
chroot also depends on the kernel running. On the Ubuntu, the kernel will be
the Ubuntu kernel. Is there
any diffs between the Gentoo kernel and the Ubuntu kernel?
Version of qemu, are close or the Ubuntu one is old?
I can't see why locales are involved here. Can you post the link to the
forum thread that state this?
Is 'ls -l /dev/null' the same in each chroot environment (after you bind
/dev)?
Kfir
[-- Attachment #2: Type: text/html, Size: 3057 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-embedded] locales / sandbox violations
2011-03-22 10:26 [gentoo-embedded] locales / sandbox violations Martin Gysel
2011-03-22 13:30 ` Kfir Lavi
@ 2011-03-22 14:18 ` Mike Frysinger
1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2011-03-22 14:18 UTC (permalink / raw
To: gentoo-embedded; +Cc: Martin Gysel
On Tue, Mar 22, 2011 at 6:26 AM, Martin Gysel wrote:
> now if I chroot into the sysroot on the second using qemu I get some
> access violations from the sandbox:
i doubt qemu handles ptrace and sandbox correctly. probably saner to
just disable sandbox when chrooting via qemu.
-mike
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-22 15:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-22 10:26 [gentoo-embedded] locales / sandbox violations Martin Gysel
2011-03-22 13:30 ` Kfir Lavi
2011-03-22 14:18 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox