Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/build/builders: ARM builders #8647

Closed
bradfitz opened this issue Sep 4, 2014 · 41 comments
Closed

x/build/builders: ARM builders #8647

bradfitz opened this issue Sep 4, 2014 · 41 comments
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge
Milestone

Comments

@bradfitz
Copy link
Contributor

bradfitz commented Sep 4, 2014

This bug is about creating ARM qemu full-system-emulation environments for running Go
builds. This is part of http://golang.org/s/builderplan

For ARM5,
The versatilepb machine (ARM5?) is quite slow can can run "make.bash" is about
25 minutes:
https://people.debian.org/~aurel32/qemu/armel/

We could cross-compile make.bash from x86 and just shard (a subset of?) run.bash on
qemu-system-arm -M versatilepb.

For ARM7+, it seems qemu in recent versions supports newer CPUs and supports multiple
cores as well? That might help.

In any case, this will be slow, and will depend on being able to shard tests out over
perhaps hundreds of CPUs (each running a full Linux kernel + tiny userspace which we
control, doing nothing but running our builders).

It'd be nice if the tiny userspace running inside the qemu-system-arm ran Docker, so
then we'd have a snapshotting filesystem which we could send around the network, which
we'll want for sharding.

We can use this bug to discuss and collect notes.
@gopherbot
Copy link

Comment 1 by AndrewChamberss:

Saving for reference - https://wiki.ubuntu.com/ARM/RootfsFromScratch/QemuDebootstrap
I'll test this out for building an ARM debian rootfs entirely from within docker.

@gopherbot
Copy link

Comment 2 by AndrewChamberss:

https://wiki.ubuntu.com/ARM/RootfsFromScratch
The Debootstrap page actually suggested other methods from this page, rootstock looks
promising.

@bradfitz
Copy link
Contributor Author

bradfitz commented Sep 4, 2014

Comment 3:

I'm glad you're working on this. :)

@gopherbot
Copy link

Comment 4 by AndrewChamberss:

https://wiki.ubuntu.com/Core
more reference. 
No problem :) I wish gc had mips support too since I actually have the hardware.

@gopherbot
Copy link

Comment 5 by AndrewChamberss:

One final reference for buildroot:
http://buildroot.uclibc.org/
http://git.buildroot.net/buildroot/tree/board/qemu/arm-versatile/readme.txt
Buildroot isn't a full distro (it uses busybox etc) and everything is built from source.
If I mirror the tarballs that our config needs, then it is really versatile as you can
easily swap kernel versions and the compiled images are under 20 megs.
What building a filesystem looks like in buildroot:
make goarmbuilder_defconfig
make
I'll hopefully get a prototype Dockerfile running tonight (New Zealand time).

@minux
Copy link
Member

minux commented Sep 4, 2014

Comment 6:

i'm not against this idea, but previous experiences
showed that qemu-system doesn't do well at exciting
concurrent code paths, so we will still need real
hardware to catch, e.g., sync/atomic and runtime
problems.

@gopherbot
Copy link

Comment 7 by AndrewChamberss:

Yeah, this is really trying to be a sanity test and a way for people to get a working
arm build to debug things.
more notes:
debootstrap and cdebootstrap are failing on the most recent ubuntu version and docker.
I'll need to investigate those further.
Buildroot worked well until I realized they removed support for installing a gcc
toolchain in the built filesystem. I need to configure my own way to cross compile gcc
to run on arm before I can use it.

@bradfitz
Copy link
Contributor Author

bradfitz commented Sep 4, 2014

Comment 8:

Labels changed: added builder.

@gopherbot
Copy link

Comment 9 by AndrewChamberss:

My plan is to generate an arm ubuntu or debian base image, install ssh + ssh keys into
the image, run the image with qemu-system-arm in docker, then forward commands and scp
files from docker to it using qemu userspace tcp redirection. I'm still trying to find a
reliable image building system we can use.
My next bet to get a vexpress arm ubuntu image is following this guide:
https://wiki.ubuntu.com/Kernel/Dev/QemuARMVexpress.
The problem with this is that docker build can't mount loop devices (only run
--privileged) and I haven't yet tested qemu user mode emulation inside docker which does
something to install itself into the system elf execution.
Maybe building the arm image base to the point it can run ssh may need to be a different
script (possibly with vagrant vm if docker can't do it well enough.).
The output of this script is a kernel + initrd + ext filesystem, which can be saved and
the docker file consumes it.

@gopherbot
Copy link

Comment 10 by AndrewChamberss:

Can someone try this docker file out:
https://github.com/andrewchambers/golang-armbuilder-tests
It runs a single core arm7 processor with debian using the aurel32 armhf images. I don't
really know how to setup and test the builder, but this docker image at least lets you
ssh in so it can be used as a starting point. 
I worry that the debian apt-get install gcc might stop working if it gets out of date
and the aurel32 person hasn't updated the images in a while, it might be worth hosting
our own image with everything needed preinstalled.
I also created a vagrant file and some scripts following
https://wiki.ubuntu.com/Kernel/Dev/QemuARMVexpress which can generate a dual core ubuntu
arm image:
https://github.com/andrewchambers/arm-vexpress-dualcore-image
Unfortunately it seems really unstable, and randomly fails to boot/hangs with kernel
errors.

@bradfitz bradfitz changed the title builders: ARM qemu builders builders: ARM builders Jan 3, 2015
@bradfitz
Copy link
Contributor Author

bradfitz commented Jan 3, 2015

I'm making this bug a bit more general about updating all our ARM builders in the new http://golang.org/s/builderplan world, be it emulated, real hardware, or an ARM hosting service like http://labs.online.net/ ... I imagine we'll do all three.

For real hardware I want to use Docker, which means we'll need an ARM distro that does Docker. I hear Arch does it.

/cc @minux

@bradfitz
Copy link
Contributor Author

bradfitz commented Jan 3, 2015

Online.net's API: https://doc.cloud.online.net/api/

@sdouche
Copy link

sdouche commented Jan 4, 2015

Testing Go on the new ARM online.net server (Ubuntu 14.10, GNU/Linux 3.17.0-119 armv7l, Marvell a Cortex A9 ARM, 2Gb RAM, 20Gb LSSD).

root@gobuilder:~# cat /proc/cpuinfo 
processor   : 0
model name  : ARMv7 Processor rev 2 (v7l)
Features    : half thumb fastmult vfp edsp thumbee vfpv3 tls idiva idivt vfpd32 lpae 
CPU implementer : 0x56
CPU architecture: 7
CPU variant : 0x2
CPU part    : 0x584
CPU revision    : 2
...

Go compilation (tip) :

root@gobuilder:~/src/go/src# time ./all.bash
##### Building C bootstrap tool.
cmd/dist

##### Building compilers and Go bootstrap tool for host, linux/arm.
lib9
libbio
liblink
cmd/gc
cmd/5l
cmd/5a
cmd/5g
runtime
errors
sync/atomic
sync
io
unicode
unicode/utf8
unicode/utf16
bytes
math
strings
strconv
bufio
sort
container/heap
encoding/base64
syscall
time
os
reflect
fmt
encoding
encoding/json
flag
path/filepath
path
io/ioutil
log
regexp/syntax
regexp
go/token
go/scanner
go/ast
go/parser
os/exec
os/signal
net/url
text/template/parse
text/template
go/doc
go/build
cmd/go

##### Building packages and commands for linux/arm.
runtime
errors
sync/atomic
unicode
unicode/utf8
math
sync
sort
io
syscall
hash
container/heap
encoding
unicode/utf16
hash/crc32
container/list
crypto/subtle
crypto/cipher
bytes
strings
bufio
time
text/tabwriter
path
crypto/hmac
internal/syscall
html
compress/bzip2
hash/adler32
container/ring
hash/crc64
hash/fnv
image/color
runtime/race
image/color/palette
strconv
math/rand
math/cmplx
os
reflect
regexp/syntax
crypto
crypto/md5
path/filepath
encoding/base64
net/url
io/ioutil
os/exec
crypto/aes
crypto/rc4
crypto/sha1
crypto/sha256
crypto/sha512
encoding/pem
os/signal
encoding/ascii85
regexp
encoding/base32
image
fmt
encoding/binary
image/draw
crypto/des
cmd/pprof/internal/svg
image/jpeg
index/suffixarray
cmd/internal/goobj
cmd/internal/rsc.io/arm/armasm
cmd/internal/rsc.io/x86/x86asm
debug/dwarf
debug/gosym
debug/plan9obj
debug/elf
debug/macho
debug/pe
flag
log
go/token
encoding/json
encoding/xml
go/scanner
go/ast
cmd/internal/objfile
text/template/parse
cmd/addr2line
go/parser
go/printer
text/template
compress/flate
math/big
cmd/cgo
go/format
go/doc
cmd/fix
compress/gzip
crypto/elliptic
go/build
encoding/asn1
crypto/rand
crypto/rsa
crypto/ecdsa
crypto/dsa
crypto/x509/pkix
encoding/hex
mime
mime/internal/quotedprintable
net/http/internal
runtime/pprof
cmd/link
cmd/nm
cmd/gofmt
cmd/objdump
runtime/cgo
cmd/pack
cmd/pprof/internal/profile
html/template
cmd/pprof/internal/tempfile
cmd/yacc
net
cmd/pprof/internal/plugin
cmd/pprof/internal/symbolizer
cmd/pprof/internal/symbolz
archive/tar
cmd/pprof/internal/report
archive/zip
compress/lzw
compress/zlib
database/sql/driver
encoding/csv
cmd/pprof/internal/commands
encoding/gob
database/sql
cmd/pprof/internal/driver
image/gif
image/png
os/user
runtime/debug
testing
testing/iotest
testing/quick
text/scanner
crypto/x509
net/textproto
log/syslog
mime/multipart
net/mail
crypto/tls
net/http
net/smtp
cmd/go
cmd/pprof/internal/fetch
expvar
net/http/cgi
cmd/pprof
net/http/cookiejar
net/http/fcgi
net/http/httptest
net/http/httputil
net/http/pprof
net/rpc
net/rpc/jsonrpc

##### Testing packages.
ok      cmd/addr2line   3.862s
?       cmd/cgo [no test files]
ok      cmd/fix 0.252s
ok      cmd/go  0.114s
ok      cmd/gofmt   0.624s
ok      cmd/link    0.277s
ok      cmd/nm  3.862s
ok      cmd/objdump 9.926s
ok      cmd/pack    26.201s
?       cmd/pprof   [no test files]
?       cmd/yacc    [no test files]
ok      archive/tar 0.125s
ok      archive/zip 6.412s
ok      bufio   4.172s
ok      bytes   0.949s
ok      cmd/internal/goobj  0.019s
?       cmd/internal/objfile    [no test files]
?       cmd/pprof/internal/commands [no test files]
?       cmd/pprof/internal/driver   [no test files]
?       cmd/pprof/internal/fetch    [no test files]
?       cmd/pprof/internal/plugin   [no test files]
?       cmd/pprof/internal/profile  [no test files]
?       cmd/pprof/internal/report   [no test files]
?       cmd/pprof/internal/svg  [no test files]
?       cmd/pprof/internal/symbolizer   [no test files]
?       cmd/pprof/internal/symbolz  [no test files]
?       cmd/pprof/internal/tempfile [no test files]
ok      compress/bzip2  0.341s
ok      compress/flate  6.499s
ok      compress/gzip   0.130s
ok      compress/lzw    0.731s
ok      compress/zlib   13.404s
ok      container/heap  0.027s
ok      container/list  0.025s
ok      container/ring  0.133s
?       crypto  [no test files]
ok      crypto/aes  0.114s
ok      crypto/cipher   0.053s
ok      crypto/des  0.172s
ok      crypto/dsa  0.082s
ok      crypto/ecdsa    0.185s
ok      crypto/elliptic 0.356s
ok      crypto/hmac 0.035s
ok      crypto/md5  0.050s
ok      crypto/rand 0.126s
ok      crypto/rc4  0.688s
ok      crypto/rsa  2.401s
ok      crypto/sha1 0.032s
ok      crypto/sha256   0.057s
ok      crypto/sha512   0.056s
ok      crypto/subtle   0.065s
ok      crypto/tls  24.682s
ok      crypto/x509 14.392s
?       crypto/x509/pkix    [no test files]
ok      database/sql    0.553s
ok      database/sql/driver 0.024s
ok      debug/dwarf 0.101s
ok      debug/elf   0.158s
ok      debug/gosym 0.022s
ok      debug/macho 0.039s
ok      debug/pe    0.169s
ok      debug/plan9obj  0.023s
?       encoding    [no test files]
ok      encoding/ascii85    0.050s
ok      encoding/asn1   0.054s
ok      encoding/base32 0.051s
ok      encoding/base64 0.057s
ok      encoding/binary 0.042s
ok      encoding/csv    0.074s
ok      encoding/gob    0.853s
ok      encoding/hex    0.039s
ok      encoding/json   1.376s
ok      encoding/pem    0.035s
ok      encoding/xml    0.186s
ok      errors  0.020s
ok      expvar  0.054s
ok      flag    0.041s
ok      fmt 0.487s
ok      go/ast  0.071s
ok      go/build    1.933s
ok      go/doc  0.703s
ok      go/format   0.130s
ok      go/parser   0.440s
ok      go/printer  4.384s
ok      go/scanner  0.063s
ok      go/token    0.430s
?       hash    [no test files]
ok      hash/adler32    0.061s
ok      hash/crc32  0.022s
ok      hash/crc64  0.029s
ok      hash/fnv    0.021s
ok      html    0.046s
ok      html/template   0.550s
ok      image   1.084s
ok      image/color 0.044s
?       image/color/palette [no test files]
ok      image/draw  0.750s
ok      image/gif   0.514s
ok      image/jpeg  1.984s
ok      image/png   0.397s
ok      index/suffixarray   0.159s
?       internal/syscall    [no test files]
ok      io  0.073s
ok      io/ioutil   0.030s
ok      log 0.117s
ok      log/syslog  2.214s
ok      math    0.030s
ok      math/big    5.797s
ok      math/cmplx  0.027s
ok      math/rand   2.816s
ok      mime    0.071s
ok      mime/internal/quotedprintable   28.850s
ok      mime/multipart  0.549s
ok      net 7.374s
ok      net/http    16.751s
ok      net/http/cgi    1.860s
ok      net/http/cookiejar  0.092s
ok      net/http/fcgi   0.063s
ok      net/http/httptest   0.065s
ok      net/http/httputil   0.170s
ok      net/http/internal   0.049s
?       net/http/pprof  [no test files]
ok      net/mail    0.037s
ok      net/rpc 0.166s
ok      net/rpc/jsonrpc 0.073s
ok      net/smtp    0.677s
ok      net/textproto   0.050s
ok      net/url 0.059s
ok      os  2.597s
ok      os/exec 1.457s
ok      os/signal   2.887s
ok      os/user 0.028s
ok      path    0.032s
ok      path/filepath   0.307s
ok      reflect 0.918s
ok      regexp  2.520s
ok      regexp/syntax   3.040s
ok      runtime 89.916s
?       runtime/cgo [no test files]
ok      runtime/debug   0.087s
ok      runtime/pprof   10.919s
?       runtime/race    [no test files]
ok      sort    0.522s
ok      strconv 2.105s
ok      strings 0.877s
ok      sync    0.636s
ok      sync/atomic 1.821s
ok      syscall 0.060s
ok      testing 1.380s
?       testing/iotest  [no test files]
ok      testing/quick   0.460s
ok      text/scanner    0.076s
ok      text/tabwriter  0.057s
ok      text/template   0.359s
ok      text/template/parse 0.124s
ok      time    5.907s
ok      unicode 0.034s
ok      unicode/utf16   0.020s
ok      unicode/utf8    0.105s
?       unsafe  [no test files]

real    4m31.736s
user    12m22.860s
sys 1m29.250s

##### GOMAXPROCS=2 runtime -cpu=1,2,4
ok      runtime 246.842s

##### sync -cpu=10
ok      sync    0.677s

##### ../misc/cgo/stdio

##### ../misc/cgo/life

##### ../misc/cgo/test
testLibgcc is disabled on ARM because 5l cannot handle thumb library.
testLibgcc is disabled on ARM because 5l cannot handle thumb library.
testLibgcc is disabled on ARM because 5l cannot handle thumb library.
testLibgcc is disabled on ARM because 5l cannot handle thumb library.
testLibgcc is disabled on ARM because 5l cannot handle thumb library.
scatter = 0x154b0
hello from C
sqrt is: 0
PASS
ok      _/root/src/go/misc/cgo/test 2.553s
testLibgcc is disabled on ARM because 5l cannot handle thumb library.
testLibgcc is disabled on ARM because 5l cannot handle thumb library.
testLibgcc is disabled on ARM because 5l cannot handle thumb library.
testLibgcc is disabled on ARM because 5l cannot handle thumb library.
testLibgcc is disabled on ARM because 5l cannot handle thumb library.
scatter = 0x16e838
hello from C
sqrt is: 0
PASS
ok      _/root/src/go/misc/cgo/test 2.590s
testLibgcc is disabled on ARM because 5l cannot handle thumb library.
testLibgcc is disabled on ARM because 5l cannot handle thumb library.
testLibgcc is disabled on ARM because 5l cannot handle thumb library.
testLibgcc is disabled on ARM because 5l cannot handle thumb library.
testLibgcc is disabled on ARM because 5l cannot handle thumb library.
scatter = 0x154b0
hello from C
sqrt is: 0
PASS
ok      _/root/src/go/misc/cgo/test 2.588s
ok      _/root/src/go/misc/cgo/testtls  0.018s
ok      _/root/src/go/misc/cgo/testtls  0.019s
ok      _/root/src/go/misc/cgo/testtls  0.021s
ok      _/root/src/go/misc/cgo/nocgo    0.014s
ok      _/root/src/go/misc/cgo/nocgo    0.018s
ok      _/root/src/go/misc/cgo/nocgo    0.018s

##### ../misc/cgo/testgodefs

##### ../misc/cgo/testso

##### ../misc/cgo/errors

##### ../doc/progs

real    0m52.941s
user    0m43.540s
sys 0m5.390s

##### ../doc/codewalk

real    0m10.916s
user    0m9.890s
sys 0m0.710s

##### ../test/bench/go1
ok      _/root/src/go/test/bench/go1    9.838s

##### ../test

real    5m15.189s
user    13m14.820s
sys 2m0.840s

+pkg encoding/base64, const NoPadding = -1
+pkg encoding/base64, const NoPadding int32
+pkg encoding/base64, const StdPadding = 61
+pkg encoding/base64, const StdPadding int32
+pkg encoding/base64, method (Encoding) WithPadding(int32) *Encoding
+pkg encoding/base64, var RawStdEncoding *Encoding
+pkg encoding/base64, var RawURLEncoding *Encoding
+pkg net/smtp, method (*Client) TLSConnectionState() (tls.ConnectionState, bool)
+pkg runtime, func GCendtimes()
+pkg runtime, func GCprinttimes()
+pkg runtime, func GCstarttimes(int64)

real    1m38.612s
user    1m34.890s
sys 0m4.830s

ALL TESTS PASSED

---
Installed Go for linux/arm in /root/src/go
Installed commands in /root/src/go/bin
*** You need to add /root/src/go/bin to your PATH.

real    27m52.102s
user    44m31.530s
sys 5m22.980s

Docker doesn't work :

root@gobuilder:~/src/go/src# docker version
Client version: 1.2.0
Client API version: 1.14
Go version (client): go1.2.1
Git commit (client): fa7b24f
OS/Arch (client): linux/arm
Server version: 1.2.0
Server API version: 1.14
Go version (server): go1.2.1
Git commit (server): fa7b24f

root@gobuilder:~# docker run -i -t --rm ubuntu /bin/bash
exec format error2015/01/04 01:15:02 Error response from daemon: Cannot start container 8c852d587baaa4210067c64e308faaea23eeef9097cb90d49f3af82449fd8f09: exec format error

@bradfitz, ping me if you want a access to a server (beta service).

@minux
Copy link
Member

minux commented Jan 4, 2015

If we want maximum speed, i think we can wait a little bit for
commercial arm64 hosting services.

and arm64 should all have very good virtualization support
(not that docker requires hardware virtualization support though.)

the only problem is that you can't run 32-bit kernel on arm64
processors, so some might argue that we're not really testing
for linux/arm. (but arm64 kernel should support arm binaries
exactly as an 32-bit arm kernel does.)

@bradfitz
Copy link
Contributor Author

bradfitz commented Jan 4, 2015

@sdouche, I have an online.net account and have used it. Docker should work if you use an ARM image. Are you sure your "ubuntu" isn't using an x86 ubuntu image?

@sdouche
Copy link

sdouche commented Jan 4, 2015

@bradfitz ok. And you're right, ubuntu is only for x86. Online provides Docker images.

root@gobuilder:~#  docker search onlinelabs                                                                                                                                                
NAME                                     DESCRIPTION   STARS     OFFICIAL   AUTOMATED
onlinelabs/armhf-dockerfile-ubuntu                     1                    
onlinelabs/armhf-ubuntu                                0                    
onlinelabs/debian                                      0                    
onlinelabs/dockerfile-ubuntu                           0                    
onlinelabs/dockerfile-supervisor                       0                    
onlinelabs/dockerfile-python                           0                    
onlinelabs/armhf-dockerfile-python                     0                    
onlinelabs/wordpress                                   0                    
onlinelabs/dockerfile-go                               0                    
onlinelabs/busybox                                     0                    
onlinelabs/armel-ubuntu                                0                    
onlinelabs/armhf-debian                                0                    
onlinelabs/armhf-dockerfile-go                         0                    
onlinelabs/armhf-dockerfile-supervisor                 0                    
onlinelabs/dockerfile-nodejs                           0                    
onlinelabs/training-postgres                           0                    
onlinelabs/armhf-dockerfile-nodejs                     0                    
onlinelabs/armhf-orchadup-postgresql                   0                    
onlinelabs/doc.cloud.online.net                        0                    
onlinelabs/dockerfile-ruby                             0                    
onlinelabs/buildpack-deps                              0                    
onlinelabs/dockerfile-java                             0                    
onlinelabs/armhf-busybox                               0                    
onlinelabs/registry                                    0                    
onlinelabs/ubuntu                                      0           

@bradfitz
Copy link
Contributor Author

Now that we have trybots, and trybots require VMs, this bug is now high priority, so we're able to get ARM-based trybots.

Test sharding is coming soon, too, so I don't care much about speed.

I also found https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Virtual_ARM_Linux_environment which is basically what I did before (and I lost my old notes) but uses the Cortex A9 processor. Maybe it's faster.

I would now like to see a Dockerfile which generates an x86 Debian or Ubuntu container which is bootable using docker2boot (like our Linux VMs), which uses qemu-system-arm to then boot an ARM system (can also be Debian, or whatever) that then downloads the buildlet from the GCE metadata service and runs it.

So the coordinator will also be interacting with an emulated buildlet. I hope that's fast enough.

Or since we have to do OS X differently anyway, maybe we focus on OS X first (which will connect to the coordinator to register idle VMs) and then have ARM do the same thing as OS X, but use a bunch of real ARM machines (I have some idle ones), or ARM machines on online.net, and then we make the coordinator just send VM create/destroy requests to online.net as needed.

But if somebody wants to work on the GCE qemu-system-arm thing, I would love it. Even if you get it to the point of working mostly in Docker, I can do the docker2boot + buildlet-downloading parts. Just make sure to make the ARM filesystem have curl installed already, and configure the ARM system to run a shell script at boot, and I can take it from there.

/cc @adg

@bradfitz
Copy link
Contributor Author

Also, @davecheney, maybe you could provide input or help on this stuff. You also have an interest in seeing ARM tested more.

@davecheney
Copy link
Contributor

Thanks @bradfitz.

If I have been following correctly, integrating OS X builders will work by
running an agent process on the machine which will register the machine as
capable of running builds for things that need darwin. This is different
from a (legacy) builder which only runs builds for its specific build key.

If this is right then adding a pool of ARM capable machines should be
similar, but with the added benefit that we also get docker containers.

My personal opinion is qemu-arm is more trouble than it's worth, compared
to a pool of real arm hardware which will give us coverage for nacl/arm and
linux/arm.

Freebsd/arm is something I'd like to revive, I hope before the close of
1.5, but that will probably remain with a legacy builder for the moment.

On Fri, Feb 13, 2015 at 11:06 AM, Brad Fitzpatrick <notifications@github.com

wrote:

Also, @davecheney https://github.com/davecheney, maybe you could
provide input or help on this stuff. You also have an interest in seeing
ARM tested more.


Reply to this email directly or view it on GitHub
#8647 (comment).

@crawshaw
Copy link
Member

As I'll probably be the one managing the Google-run ARM hardware (I had a corp lab setup for the android builder), I would like reliable hardware. Does any exist?

@davecheney
Copy link
Contributor

The new raspberry Pi 2, although not yet proven should be a good first port
of call, at least they are cheap.

Others disagree, but my 3 year old pandaboard has always been very reliable
for me.

Outside my price range are blade chassis type systems intended for VPS
hosts from HP and Dell.

On Fri, Feb 13, 2015 at 10:35 PM, David Crawshaw notifications@github.com
wrote:

As I'll probably be the one managing the Google-run ARM hardware (I had a
corp lab setup for the android builder), I would like reliable hardware.
Does any exist?


Reply to this email directly or view it on GitHub
#8647 (comment).

@saljam
Copy link
Contributor

saljam commented Feb 13, 2015

What's the craic on this? I've been working on something similar. I have a little script which builds an arm image based on ubuntu-core (not snappy), and an amd64 Dockerfile which runs the arm image on qemu on boot.

It can also run the official Docker binaries, so I'm happy to massage the script to produce an image to run on real hardware.

@saljam
Copy link
Contributor

saljam commented Feb 13, 2015

Here's a starting point: https://go-review.googlesource.com/4812

I've updated it to run the buildlet's stage0 on boot.

(Also, I now know what the craic is. I had this tab open since yesterday and forgot to refresh before posting.)

@minux
Copy link
Member

minux commented Feb 14, 2015 via email

@bradfitz
Copy link
Contributor Author

@saljam's qemu ARM builders are running and catching up. They take about 50 minutes for a full make.bash currently, but will be faster later once we do test sharding over N VMs. (which is #10029)

@bradfitz
Copy link
Contributor Author

Re-opening, because the builders all failed, like:

http://build.golang.org/log/c165b6945c12d6c8f1f73aff54b99da6bf0e3651

...

##### Building packages and commands for linux/arm.
cmd/internal/obj
cmd/internal/asm
cmd/internal/obj/arm
cmd/5a
archive/tar
compress/flate
...
cmd/internal/gc
go build cmd/internal/gc: /tmp/buildlet-scatch651157207/go/pkg/tool/linux_arm/5g: signal: killed
cmd/internal/obj/x86
cmd/6a
...

@bradfitz bradfitz reopened this Feb 27, 2015
@bradfitz
Copy link
Contributor Author

Salman, any ideas?

Which GCE instance size did you use?

@minux
Copy link
Member

minux commented Feb 27, 2015 via email

@bradfitz
Copy link
Contributor Author

But Salman said it worked for him.

We need to increase the memory for the VM.

The VM host or the qemu VM in the VM? I think the latter. But I also thought QEMU only let you have 1GB of memory available for the emulated ARM machine.

I see in Salman's CL:

/usr/bin/qemu-system-arm -M vexpress-a9 -cpu cortex-a9 -nographic -no-reboot -sd /arm/root.img -kernel /arm/vmlinuz -append "root=/dev/mmcblk0 console=ttyAMA0 rw rootwait" -m 512 -redir tcp:80::80 -redir tcp:443::443 -redir tcp:5936::5936

... which is only 512 MB.

But https://wiki.linaro.org/PeterMaydell/QemuVersatileExpress shows using that board with 1024 at least.

Can we go higher than 1024 even? http://fedoraproject.org/wiki/Architectures/ARM/Versatile_Express suggests 1GB might be the limit.

Salman, why did you make it 512 MB? And why did you have more success with the builds than me? Maybe you were only building Go 1.4.2 and the builders are running tip, which takes more memory?

@saljam
Copy link
Contributor

saljam commented Feb 27, 2015

It does look like an OOM that I thought I no longer got since I upped it to
512MB... I've increased it to 1GB in https://go-review.googlesource.com/6264
but I've not tested it yet.

On 27 February 2015 at 21:58, Brad Fitzpatrick notifications@github.com
wrote:

Salman, any ideas?

Which GCE instance size did you use?


Reply to this email directly or view it on GitHub
#8647 (comment).

سلمان

@saljam
Copy link
Contributor

saljam commented Feb 27, 2015

And yes, qemu refuses anything more than 1GB.

I successfully ran 1.4 make.bash with only 256MB, so I also suspect this has to do with with tip's 5g. (It's now in go, right?)

@minux
Copy link
Member

minux commented Feb 27, 2015 via email

@saljam
Copy link
Contributor

saljam commented Feb 28, 2015

Ok, the pprof tests are now failing on qemu. Any ideas?

ok      runtime 217.172s
?       runtime/cgo [no test files]
ok      runtime/debug   0.207s
--- FAIL: TestCPUProfileMultithreaded (0.63s)
    pprof_test.go:167: runtime/pprof_test.cpuHog1: 0
    pprof_test.go:167: runtime/pprof_test.cpuHog2: 33
    pprof_test.go:181: runtime/pprof_test.cpuHog1 has 0 samples out of 33, want at least 1, ideally 16
FAIL
FAIL    runtime/pprof   19.933s
?       runtime/race    [no test files]

@minux
Copy link
Member

minux commented Feb 28, 2015 via email

@bradfitz
Copy link
Contributor Author

Yes, let's do that.

@minux
Copy link
Member

minux commented Feb 28, 2015 via email

@saljam
Copy link
Contributor

saljam commented Feb 28, 2015

It's already got the gdb package, which includes the python bindings afaik.

On 1 March 2015 at 00:53, Minux Ma notifications@github.com wrote:

Does the qemu-arm builder have gdb (with python binding) installed?
If not, we should add gdb to the debootstrap command line.


Reply to this email directly or view it on GitHub
#8647 (comment).

سلمان

@saljam
Copy link
Contributor

saljam commented Mar 1, 2015

Ah! I see, this is actually #9605. (I'm a bit slow, sorry!)

https://go-review.googlesource.com/6384

bradfitz added a commit to golang/build that referenced this issue Mar 31, 2015
This starts the process of making the coordinator about to use the
buildlet on things other than GCE.

Update golang/go#8647 (ARM, reverse proxy or online.net)
Update golang/go#10267 (windows 2003 on AWS)
Update golang/go#9495 (OS X VMWare VMs on racked Mac Minis)

Change-Id: I5df79ea67e0ececba8b880e81bd93d4c80897455
Reviewed-on: https://go-review.googlesource.com/8198
Reviewed-by: David Crawshaw <crawshaw@golang.org>
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc removed accepted labels Apr 14, 2015
@rsc rsc changed the title builders: ARM builders x/build/builders: ARM builders Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the builder label Apr 14, 2015
@bradfitz
Copy link
Contributor Author

Status update: we're now running 20 machines on Scaleway (previously online.net) using the new "reverse buildlet pool" in the coordinator.

They take 30 minutes to run all.bash, or 60 minutes for GOARM=5. We still don't have sharding. Once we have sharding, qemu might be a good option again (especially if it can emulate GOARM=5 better than Scaleway, with more alignment strictness), but real hardware is nice too.

@gopherbot
Copy link

CL https://golang.org/cl/10052 mentions this issue.

bradfitz added a commit to golang/build that referenced this issue May 14, 2015
…caleway

This is what I used to start the ARM scaleway servers.

I forgot to mail it out. I'd like to submit this before I tweak it
further.

Updates golang/go#8647

Change-Id: Icf789de4e3acae8084fd75151ef5ef02d8073b73
Reviewed-on: https://go-review.googlesource.com/10052
Reviewed-by: Andrew Gerrand <adg@golang.org>
@rsc rsc added the Builders x/build issues (builders, bots, dashboards) label Jun 11, 2015
@bradfitz
Copy link
Contributor Author

Closing this. We can open up new bugs for ARM64.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

8 participants