Skip to content

tests: math/rand and sync/atomic fail on ARM in Go 1 #3425

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

Closed
gopherbot opened this issue Mar 29, 2012 · 3 comments
Closed

tests: math/rand and sync/atomic fail on ARM in Go 1 #3425

gopherbot opened this issue Mar 29, 2012 · 3 comments

Comments

@gopherbot
Copy link
Contributor

by [email protected]:

nfa@b3:~$ hg clone -u release https://code.google.com/p/go
warning: code.google.com certificate with fingerprint
e2:9e:46:29:a0:fd:3c:57:a0:68:30:c5:0a:45:97:63:bf:8d:75:fc not verified (check
hostfingerprints or web.cacerts config setting)
destination directory: go
requesting all changes
adding changesets
adding manifests
adding file changes
added 12873 changesets with 49167 changes to 7114 files (+5 heads)
updating to branch release-branch.go1
3205 files updated, 0 files merged, 0 files removed, 0 files unresolved
nfa@b3:~$ cd go/src
nfa@b3:~/go/src$ ./all.bash
# Building C bootstrap tool.
cmd/dist

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

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

# Testing packages.
ok      cmd/api 0.496s
?       cmd/cgo [no test files]
ok      cmd/fix 26.493s
ok      cmd/go  0.259s
?       cmd/godoc   [no test files]
ok      cmd/gofmt   1.092s
?       cmd/vet [no test files]
?       cmd/yacc    [no test files]
ok      archive/tar 0.197s
ok      archive/zip 1.775s
ok      bufio   9.001s
ok      bytes   3.662s
ok      compress/bzip2  1.426s
ok      compress/flate  7.919s
ok      compress/gzip   0.772s
ok      compress/lzw    0.698s
ok      compress/zlib   6.301s
ok      container/heap  0.186s
ok      container/list  0.153s
ok      container/ring  0.358s
?       crypto  [no test files]
ok      crypto/aes  0.290s
ok      crypto/cipher   0.159s
ok      crypto/des  0.656s
ok      crypto/dsa  0.709s
ok      crypto/ecdsa    0.703s
ok      crypto/elliptic 0.357s
ok      crypto/hmac 0.260s
ok      crypto/md5  0.259s
ok      crypto/rand 1.215s
ok      crypto/rc4  0.149s
ok      crypto/rsa  10.328s
ok      crypto/sha1 0.192s
ok      crypto/sha256   0.170s
ok      crypto/sha512   0.379s
ok      crypto/subtle   0.356s
ok      crypto/tls  24.265s
ok      crypto/x509 31.260s
?       crypto/x509/pkix    [no test files]
ok      database/sql    0.441s
ok      database/sql/driver 0.152s
ok      debug/dwarf 0.551s
ok      debug/elf   0.457s
ok      debug/gosym 0.157s
ok      debug/macho 0.206s
ok      debug/pe    0.335s
ok      encoding/ascii85    0.285s
ok      encoding/asn1   0.183s
ok      encoding/base32 0.297s
ok      encoding/base64 0.265s
ok      encoding/binary 0.275s
ok      encoding/csv    0.293s
ok      encoding/gob    1.054s
ok      encoding/hex    0.158s
ok      encoding/json   2.306s
ok      encoding/pem    0.280s
ok      encoding/xml    0.579s
ok      errors  0.151s
ok      expvar  0.271s
ok      flag    0.155s
ok      fmt 1.402s
ok      go/ast  0.183s
ok      go/build    37.577s
ok      go/doc  1.730s
ok      go/parser   1.342s
ok      go/printer  8.732s
ok      go/scanner  0.515s
ok      go/token    1.375s
?       hash    [no test files]
ok      hash/adler32    0.175s
ok      hash/crc32  0.151s
ok      hash/crc64  0.150s
ok      hash/fnv    0.156s
ok      html    0.330s
ok      html/template   1.406s
ok      image   1.766s
ok      image/color 0.202s
ok      image/draw  0.926s
?       image/gif   [no test files]
ok      image/jpeg  1.197s
ok      image/png   1.668s
ok      index/suffixarray   0.575s
ok      io  0.283s
ok      io/ioutil   0.173s
ok      log 0.289s
ok      log/syslog  0.397s
ok      math    0.733s
ok      math/big    8.071s
ok      math/cmplx  0.250s
panic: test timed out

goroutine 8 [running]:
testing.alarm()
    /home/nfa/go/src/pkg/testing/testing.go:436 +0x5c
created by time.goFunc
    /home/nfa/go/src/pkg/time/sleep.go:94 +0x5c

goroutine 1 [chan receive]:
testing.RunTests(0x10c00, 0x17a7e0, 0x6, 0x6, 0xffffff01, ...)
    /home/nfa/go/src/pkg/testing/testing.go:350 +0x8b4
testing.Main(0x10c00, 0x17a7e0, 0x6, 0x6, 0x17a720, ...)
    /home/nfa/go/src/pkg/testing/testing.go:285 +0x70
main.main()
    /tmp/go-build770188874/math/rand/_test/_testmain.go:63 +0x88

goroutine 2 [syscall]:
created by runtime.main
    /home/nfa/go/src/pkg/runtime/proc.c:221

goroutine 3 [timer goroutine (idle)]:
created by addtimer
    /home/nfa/go/src/pkg/runtime/ztime_arm.c:69

goroutine 9 [runnable]:
testing.tRunner(0x1061eac0, 0x17a810, 0x0)
    /home/nfa/go/src/pkg/testing/testing.go:256
created by testing.RunTests
    /home/nfa/go/src/pkg/testing/testing.go:349 +0x894
FAIL    math/rand   129.866s
ok      mime    0.180s
ok      mime/multipart  3.571s
ok      net 2.680s
ok      net/http    30.493s
ok      net/http/cgi    3.718s
ok      net/http/fcgi   0.415s
ok      net/http/httptest   0.315s
ok      net/http/httputil   0.362s
?       net/http/pprof  [no test files]
ok      net/mail    0.270s
ok      net/rpc 0.662s
ok      net/rpc/jsonrpc 0.240s
ok      net/smtp    0.180s
ok      net/textproto   0.274s
ok      net/url 0.375s
ok      os  0.789s
ok      os/exec 6.158s
ok      os/signal   0.152s
ok      os/user 0.158s
ok      path    0.162s
ok      path/filepath   0.319s
ok      reflect 0.324s
ok      regexp  4.495s
ok      regexp/syntax   16.072s
ok      runtime 61.095s
ok      runtime/debug   0.281s
ok      runtime/pprof   4.174s
ok      sort    1.104s
ok      strconv 11.263s
ok      strings 0.401s
ok      sync    0.604s
SIGILL: illegal instruction
PC=0xc233c

sync/atomic.armAddUint64(0x106001a8, 0x1, 0x0, 0x10600198, 0x54c34, ...)
    /home/nfa/go/src/pkg/sync/atomic/asm_arm.s:66 +0x8
sync/atomic_test._func_008(0x0, 0x0)
    /home/nfa/go/src/pkg/sync/atomic/atomic_test.go:37 +0x84
sync/atomic_test.init()
    /home/nfa/go/src/pkg/sync/atomic/atomic_test.go:39 +0x78
main.init()
    /tmp/go-build770188874/sync/atomic/_test/_testmain.go:102 +0x70

goroutine 2 [runnable]:
created by runtime.main
    /home/nfa/go/src/pkg/runtime/proc.c:221

trap    0x6
error   0x0
oldmask 0x0
r0      0x0
r1      0xa
r2      0x106001a8
r3      0x594ba8
r4      0x4cdd0
r5      0x401a9f70
r6      0xa
r7      0x10620520
r8      0xefc0a940
r9      0x186c64
r10     0x10624000
fp      0xfffffff8
ip      0xcafebabe
sp      0x401a9f6c
lr      0xc2384
pc      0xc233c
cpsr    0x60000010
fault   0x0
FAIL    sync/atomic 0.155s
?       syscall [no test files]
?       testing [no test files]
?       testing/iotest  [no test files]
ok      testing/quick   0.904s
ok      text/scanner    0.296s
ok      text/tabwriter  0.289s
ok      text/template   0.573s
ok      text/template/parse 0.306s
ok      time    20.035s
ok      unicode 0.160s
ok      unicode/utf16   0.151s
ok      unicode/utf8    0.281s
?       unsafe  [no test files]
nfa@b3:~/go/src$
@davecheney
Copy link
Contributor

Comment 1:

What type of arm system are you installing on. The atomic uint64 tests fail on arm5
because there is no way to do that on these systems. 
It wasn't clear from the original error report if you were passing GOARM=5

@gopherbot
Copy link
Contributor Author

Comment 2 by [email protected]:

GOARM is set to 5.
Answer to your first question:
nfa@b3:~/development/go/tut1$ cat /proc/cpuinfo
Processor   : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS    : 1199.30
Features    : swp half thumb fastmult edsp 
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant : 0x2
CPU part    : 0x131
CPU revision    : 1
Hardware    : BUBBA3 Kirkwood based miniserver
Revision    : 0000
Serial      : 0000000000000000

@minux
Copy link
Member

minux commented Mar 29, 2012

Comment 3:

The math/rand test failure is not fatal, you can verify that by 'go test -short
math/rand' manually.
The sync/atomic test failure is a real issue, but it's a dup of issue #3331.
Thanks for reporting.

Status changed to Duplicate.

Merged into issue #3331.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants