Closed tjyang closed 9 years ago
Hello, Thanks for testing Go on a Pi. What does your swap configuration look like, 190mb of ram is close to enough to run the package tests, but will probably swap your machine into submission during the gc tests, (where it says # ../test). As a consolation, you can rerun most of the build phases independently. ie, to rerun the package tests go test std -test.short You can also rerun the gc tests, but be ready with your console cable or reset button as some require a lot of memory to run cd $GOROOT/test; go run run.go The math/rand timeout is an unfortunate side-effect of using the soft float emulation. If you apply, http://golang.org/cl/5987063/ and remove the GOARM environment variable, this will enable the hardware floating point support, and the test will likely pass. If this works for you, please, comment on the issue.
Thanks for the pointers for go test and patches. I am using this ticket as a place for my note taking, sorry for the details. 0. apply patch from http://golang.org/cl/5987063/ 0.5 cd go/src;./all.bash 1. hmm, swap partition got commented out by default from debian 6.0 for raspberrypi. gobuild@raspberrypi:~$ more /etc/fstab proc /proc proc defaults 0 0 /dev/mmcblk0p1 /boot vfat defaults 0 0 #/dev/mmcblk0p3 none swap sw 0 0 /dev/sda1 /usbpub ext4 rw,nosuid,nodev,uhelper=udisks 0 0 gobuild@raspberrypi:~$ 2. take out comment line from /etc/fstab 3. now I am getting 195M swap space. gobuild@raspberrypi:~$ swapon -s Filename Type Size Used Priority /dev/mmcblk0p3 partition 195580 0 -1 gobuild@raspberrypi:~$ 4. "cd $GOROOT/test; go run run.go" and run top to observe memory usage. I see no memory deprivation from top output. gobuild@raspberrypi:~/go/test$ cd $GOROOT/test; go run run.go run map.go : incorrect output float32 map allows NaN lookup (a) float32 map should have 5 entries: map[NaN:<nil> -0:-0 +Inf:NaN NaN:<nil>] complex64 map allows NaN lookup (a) complex64 map should have 5 entries: map[(5+Infi):NaN (+5+NaNi):<nil> (+0-0i):-0 (+5+NaNi):<nil>] exit status 1 gobuild@raspberrypi:~/go/test$ 5. Above "exit status 1" happened when I tried to build "programming in go" examples in another vt100 session. 6. Decided to run "all.bash" again without other load on Pi. Only see fmt test failed. gobuild@raspberrypi:~/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 crypto/ecdsa encoding/asn1 crypto/x509/pkix encoding/pem crypto/x509 runtime/cgo 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/sha256 crypto/sha512 database/sql/driver database/sql debug/gosym encoding/ascii85 encoding/base32 encoding/csv encoding/hex exp/ebnf exp/ebnflint exp/types exp/gotype exp/html/atom exp/html exp/inotify exp/norm exp/locale/collate hash/fnv exp/locale/collate/build exp/proxy exp/utf8string hash/crc64 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 old/netchan os/signal os/user testing testing/iotest testing/quick # Testing packages. ok cmd/api 0.258s ? cmd/cgo [no test files] ok cmd/fix 30.181s ok cmd/go 0.462s ? cmd/godoc [no test files] ok cmd/gofmt 1.056s ? cmd/vet [no test files] ? cmd/yacc [no test files] ok archive/tar 0.124s ok archive/zip 1.053s ok bufio 3.561s ok bytes 1.602s ok compress/bzip2 1.302s ok compress/flate 14.474s ok compress/gzip 0.351s ok compress/lzw 2.069s ok compress/zlib 28.182s ok container/heap 0.114s ok container/list 0.109s ok container/ring 0.354s ? crypto [no test files] ok crypto/aes 0.318s ok crypto/cipher 0.120s ok crypto/des 0.680s ok crypto/dsa 0.427s ok crypto/ecdsa 0.709s ok crypto/elliptic 0.283s ok crypto/hmac 0.137s ok crypto/md5 0.156s ok crypto/rand 0.526s ok crypto/rc4 0.108s ok crypto/rsa 6.472s ok crypto/sha1 0.157s ok crypto/sha256 0.171s ok crypto/sha512 0.228s ok crypto/subtle 0.271s ok crypto/tls 5.596s ok crypto/x509 30.364s ? crypto/x509/pkix [no test files] ok database/sql 0.315s ok database/sql/driver 0.112s ok debug/dwarf 0.276s ok debug/elf 0.299s ok debug/gosym 0.116s ok debug/macho 0.157s ok debug/pe 0.135s ok encoding/ascii85 0.189s ok encoding/asn1 0.158s ok encoding/base32 0.264s ok encoding/base64 0.157s ok encoding/binary 0.167s ok encoding/csv 0.159s ok encoding/gob 0.972s ok encoding/hex 0.115s ok encoding/json 1.450s ok encoding/pem 0.186s ok encoding/xml 0.391s ok errors 0.113s ok exp/ebnf 0.116s ok exp/ebnflint 0.241s ok exp/gotype 10.574s ok exp/html 4.622s ok exp/html/atom 0.111s ok exp/inotify 1.151s ok exp/locale/collate 0.639s ok exp/locale/collate/build 0.182s ok exp/norm 27.133s ok exp/proxy 0.141s ok exp/types 4.356s ok exp/utf8string 0.118s ok expvar 0.192s ok flag 0.116s --- FAIL: TestNaN (0.00 seconds) scan_test.go:459: didn't get NaNs scanning "nan nan nan": got NaN +Inf NaN scan_test.go:459: didn't get NaNs scanning "NAN NAN NAN": got NaN +Inf NaN scan_test.go:459: didn't get NaNs scanning "NaN NaN NaN": got NaN +Inf NaN FAIL FAIL fmt 0.883s ok go/ast 0.158s ok go/build 6.186s ok go/doc 1.756s ok go/parser 1.048s ok go/printer 8.737s ok go/scanner 0.181s ok go/token 1.338s ? hash [no test files] ok hash/adler32 0.626s ok hash/crc32 0.108s ok hash/crc64 0.107s ok hash/fnv 0.109s ok html 0.119s ok html/template 1.106s ok image 1.903s ok image/color 0.201s ok image/draw 0.909s ? image/gif [no test files] ok image/jpeg 1.335s ok image/png 1.239s ok index/suffixarray 0.375s ok io 0.170s ok io/ioutil 0.116s ok log 0.168s ok log/syslog 0.351s ok math 0.142s ok math/big 5.688s ok math/cmplx 0.119s ok math/rand 3.262s ok mime 0.134s ok mime/multipart 1.974s ok net 2.516s ok net/http 26.383s ok net/http/cgi 4.920s ok net/http/fcgi 0.232s ok net/http/httptest 0.195s ok net/http/httputil 0.319s ? net/http/pprof [no test files] ok net/mail 0.153s ok net/rpc 0.874s ok net/rpc/jsonrpc 0.257s ok net/smtp 0.169s ok net/textproto 0.185s ok net/url 0.164s ok old/netchan 0.423s ok os 0.446s ok os/exec 2.340s ok os/signal 0.109s ok os/user 0.119s ok path 0.117s ok path/filepath 6.386s ok reflect 0.189s ok regexp 2.983s ok regexp/syntax 24.790s ok runtime 24.170s ? runtime/cgo [no test files] ok runtime/debug 0.156s ok runtime/pprof 4.396s ok sort 1.302s ok strconv 13.797s ok strings 0.250s ok sync 0.823s ok sync/atomic 0.325s ok syscall 0.287s ? testing [no test files] ? testing/iotest [no test files] ok testing/quick 0.863s ok text/scanner 0.192s ok text/tabwriter 0.184s ok text/template 0.502s ok text/template/parse 0.226s ok time 16.504s ok unicode 0.121s ok unicode/utf16 0.108s ok unicode/utf8 0.178s ? unsafe [no test files] gobuild@raspberrypi:~/go/src$
1. swapping onto an sd card will be quite slow and will prematurely age your card. 2. I can't reproduce the fmt failure with that patch applied on my pandaboard so this is either an unrelated failure, or some quirk of the Pi's VFP2 floating point hardware. Please comment on the CL so the original author can address it.
I am at the current tip and I also experienced the --- FAIL: TestNaN (0.00 seconds) scan_test.go:459: didn't get NaNs scanning "nan nan nan": got NaN +Inf NaN scan_test.go:459: didn't get NaNs scanning "NAN NAN NAN": got NaN +Inf NaN scan_test.go:459: didn't get NaNs scanning "NaN NaN NaN": got NaN +Inf NaN FAIL FAIL fmt 0.889s ok go/ast 0.181s I also applied the http://golang.org/cl/5987063 before I recompiled. I don't think the TestNaN failed before I applied that patch, as I compiled a recent tip without the failure, but with GOARM=5 set.
Hello, Thank you for the feedback. I would like to suggest that this issue be closed as there are a number of problems going on here, and the fix to one causes another, making it hard to determine a clear path to resolution. In its place, with your permission, I would like to open two new issues; 1. Address the test timeout with math/rand using softfloat. 2. Address the unsupported VPF3 floating point instruction on the Pi. How does this sound ? Cheers Dave
Owner changed to @davecheney.
Status changed to WaitingForReply.
@tjyang2001 https://golang.org/issue/3740 addresses the test timeout with soft float enabled. Could you please attempt a run with GOARM unset to generate the illegal instruction failure and log a new issue. I would do it myself but I don't have a copy of the build failure in my email. Cheers Dave