On Sun, Apr 29, 2018 at 7:12 PM, Theodore Y. Ts'o <ty...@mit.edu> wrote:
>
> Hi, I'm having trouble building syzkaller (which is primarily written
> in Go) in a Debian schroot for amd64 using qemu emulation.  That is,
> I'm using a chroot filled with arm64 binaries, running them on an
> x86_64 system using a setup such as described in [1].  The specific
> chroot I am using can be set up using the setup-buildchroot[2] which
> is part of the xfstests-bld repository.
>
> [1] https://wiki.debian.org/QemuUserEmulation
> [2] https://github.com/tytso/xfstests-bld/blob/master/setup-buildchroot
>
> The goal of this exercise is to create an android-xfstests[3] test
> appliance using a x86_64 based build machine (because good luck
> finding a performant armhf or arm64 build system) which includes
> syzkaller.
>
> [3] https://thunk.org/android-xfstests
>
> When I run make in a Debian stretch-arm64 chroot, while trying to
> build syzkaller, I get the following failure messages.  (See
> attached).  Running make and gcc and binutils using arm64 to run the
> arm64 binaries work just fine; I assume this is some kind of
> go-specific runtime issue?
>
> Any help or suggestions would be greatly appreciated.

I have no idea why this is failing.

Have you tried using the current Go release, 1.10.1?

The error means that the `clone` system call returned EINVAL.

I'm a little confused by your description of the environment.  The
stack trace below shows that you are running a version of Go that was
built to run on an arm64 host.  You mention amd64 a few times above,
though.  I gather that you are running this version of Go on amd64
hardware using QEMU to run arm64 binaries?  If that is the case then
my first guess would be that QEMU does not fully implement the clone
system call.  The code (runtime·clone in
src/runtime/sys_linux_arm64.s) passes flags in x0 (CLONE_VM | CLONE_FS
| CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD) and the child stack
address in x1.  Registers x2, x3, and x4 are not set to anything in
particular, as the flags are such that they are not needed.  With
those arguments the clone system call, presumably as executed by QEMU,
is returning EINVAL.

That's all I can see.  Hope that helps.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to