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

build: crashes during compilation on mips64le hw #16848

Closed
fejsov opened this issue Aug 23, 2016 · 13 comments
Closed

build: crashes during compilation on mips64le hw #16848

fejsov opened this issue Aug 23, 2016 · 13 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@fejsov
Copy link

fejsov commented Aug 23, 2016

I'm using go version devel +392bf3a (Tue Aug 9 00:43:25 2016 +0000 linux/mips64le).
I have build bootstrap for mips64le on intel, copied it to mips board, and then started compiling with following command:
GOROOT_BOOTSTRAP=/home/nikola/go/ GOROOT_FINAL=/home/nikola/go_final ./make.bash
Here's what I get:

Building Go bootstrap tool.

cmd/dist

Building Go toolchain using /home/nikola/go.

runtime: newstack sp=0xc42003f448 stack=[0xc42003e000, 0xc42003ffc0]
morebuf={pc:0x52edc sp:0xc42003f448 lr:0x0}
sched={pc:0x525b4 sp:0xc42003f448 lr:0x52edc ctxt:0x0}
strings.Join(0xc420403000, 0x6c7, 0x6c7, 0x0, 0x0, 0x0, 0x0)
/home/nikola/go_final/src/strings/strings.go:364 +0x170
main.bootstrapFixImports(0xc420440000, 0x8031, 0xc420345350, 0x2c, 0x0, 0x0)
/opt/go/src/cmd/dist/buildtool.go:156 +0x2c8
main.bootstrapBuildTools()
/opt/go/src/cmd/dist/buildtool.go:92 +0x8ac
main.cmdbootstrap()
/opt/go/src/cmd/dist/build.go:1022 +0x2f8
main.xmain()
/opt/go/src/cmd/dist/main.go:43 +0x28c
main.main()
/opt/go/src/cmd/dist/util.go:496 +0x708
fatal error: runtime: stack split at bad time

runtime stack:
runtime.throw(0x1c9d8b, 0x20)
/home/nikola/go_final/src/runtime/panic.go:566 +0xb8
runtime.newstack()
/home/nikola/go_final/src/runtime/stack.go:951 +0x600
runtime.morestack()
/home/nikola/go_final/src/runtime/asm_mips64x.s:275 +0x60

goroutine 1 [syscall]:
runtime.notetsleep_internal(0x27a670, 0xffffffffffffffff, 0xc42003f4a8)
/home/nikola/go_final/src/runtime/lock_futex.go:159 +0x44 fp=0xc42003f478 sp=0xc42003f448
runtime.notetsleepg(0x27a670, 0xffffffffffffffff, 0xc420018000)
/home/nikola/go_final/src/runtime/lock_futex.go:206 +0x90 fp=0xc42003f4a0 sp=0xc42003f478
runtime.gcBgMarkStartWorkers()
/home/nikola/go_final/src/runtime/mgc.go:1341 +0xfc fp=0xc42003f4d8 sp=0xc42003f4a0
runtime.gcStart(0x0, 0xc42044a000)
/home/nikola/go_final/src/runtime/mgc.go:949 +0x1fc fp=0xc42003f500 sp=0xc42003f4d8
runtime.mallocgc(0xa000, 0x196080, 0xc42007a401, 0xc42007a4d0)
/home/nikola/go_final/src/runtime/malloc.go:752 +0x5d8 fp=0xc42003f5b0 sp=0xc42003f500
runtime.makeslice(0x196080, 0x80c9, 0x80c9, 0x0, 0x0, 0x0)
/home/nikola/go_final/src/runtime/slice.go:57 +0xf0 fp=0xc42003f600 sp=0xc42003f5b0
strings.Join(0xc420403000, 0x6c7, 0x6c7, 0x0, 0x0, 0x0, 0x0)
/home/nikola/go_final/src/strings/strings.go:364 +0x170 fp=0xc42003f730 sp=0xc42003f600
main.bootstrapFixImports(0xc420440000, 0x8031, 0xc420345350, 0x2c, 0x0, 0x0)
/opt/go/src/cmd/dist/buildtool.go:156 +0x2c8 fp=0xc42003f858 sp=0xc42003f730
main.bootstrapBuildTools()
/opt/go/src/cmd/dist/buildtool.go:92 +0x8ac fp=0xc42003fbc8 sp=0xc42003f858
main.cmdbootstrap()
/opt/go/src/cmd/dist/build.go:1022 +0x2f8 fp=0xc42003fcf8 sp=0xc42003fbc8
main.xmain()
/opt/go/src/cmd/dist/main.go:43 +0x28c fp=0xc42003fdf0 sp=0xc42003fcf8
main.main()
/opt/go/src/cmd/dist/util.go:496 +0x708 fp=0xc42003ff50 sp=0xc42003fdf0
runtime.main()
/home/nikola/go_final/src/runtime/proc.go:183 +0x2f4 fp=0xc42003ff98 sp=0xc42003ff50
runtime.goexit()
/home/nikola/go_final/src/runtime/asm_mips64x.s:875 +0x4 fp=0xc42003ff98 sp=0xc42003ff98

goroutine 6 [select]:
main.bghelper()
/opt/go/src/cmd/dist/util.go:150 +0x200
created by main.bginit
/opt/go/src/cmd/dist/util.go:143 +0x98

goroutine 7 [select]:
main.bghelper()
/opt/go/src/cmd/dist/util.go:150 +0x200
created by main.bginit
/opt/go/src/cmd/dist/util.go:143 +0x98

goroutine 8 [select]:
main.bghelper()
/opt/go/src/cmd/dist/util.go:150 +0x200
created by main.bginit
/opt/go/src/cmd/dist/util.go:143 +0x98

goroutine 9 [select]:
main.bghelper()
/opt/go/src/cmd/dist/util.go:150 +0x200
created by main.bginit
/opt/go/src/cmd/dist/util.go:143 +0x98

@ianlancetaylor ianlancetaylor changed the title GO crashes during compilation on mips64le hw build: crashes during compilation on mips64le hw Aug 23, 2016
@ianlancetaylor ianlancetaylor added this to the Go1.8 milestone Aug 23, 2016
@cherrymui
Copy link
Member

Hi @fejsov, does your bootstrap Go work? Maybe run some simple program like
GOROOT=/home/nikola/go /home/nikola/go/bin/go run hello.go
Could you tell some detail about how you built the bootstrap Go? Noticed /opt/go in the stack trace.

@fejsov
Copy link
Author

fejsov commented Aug 23, 2016

Hi @cherrymui , I can run hello.go without problems. Sure, I used this command:
GOARCH=mips64le GOOS=linux GOROOT_FINAL=/home/nikola/go ./bootstrap.bash
As for /opt/go, my src is located there.

@fejsov
Copy link
Author

fejsov commented Aug 24, 2016

Hi @cherrymui, one thing I noticed this morning... Code generated for mips64le is actually MIPS-III version 1, not Mips64 rel 2. Maybe this caused error?

@cherrymui
Copy link
Member

MIPS-III should not be a problem. This is for compatibility with more hardware. Indeed the bootstrap Go is also a MIPS-III binary. What machine/OS are you running on?

I tried to bootstrap with the same commit you used and it succeeded. So I don't know where I should look. Could you try a different version, say Go 1.6 and 1.7 release? If there is any difference, we can go from there.

@fejsov
Copy link
Author

fejsov commented Aug 26, 2016

I use Cavium Octeon II V0.9 EP6300C (CN6335p2.1-1250-AAP). It's running Linux. I tried to use Go1.6 and 1.7 release. It seemed to be working, but crashed again (this time, after a lot of things done successfully). Here's the output:

Building Go bootstrap tool.
cmd/dist

Building Go toolchain using /home/nikola/go-linux-mips64le-bootstrap.
bootstrap/internal/sys
bootstrap/internal/bio
bootstrap/internal/gcprog
bootstrap/asm/internal/flags
bootstrap/compile/internal/big
bootstrap/internal/obj
bootstrap/internal/obj/arm
bootstrap/internal/obj/arm64
bootstrap/internal/obj/mips
bootstrap/internal/obj/ppc64
bootstrap/internal/obj/s390x
bootstrap/internal/obj/x86
bootstrap/asm/internal/lex
bootstrap/link/internal/ld
bootstrap/compile/internal/ssa
bootstrap/asm/internal/arch
bootstrap/asm/internal/asm
bootstrap/asm
bootstrap/link/internal/arm
bootstrap/link/internal/arm64
bootstrap/link/internal/amd64
bootstrap/link/internal/mips64
bootstrap/link/internal/ppc64
bootstrap/link/internal/s390x
bootstrap/link/internal/x86
bootstrap/link
bootstrap/compile/internal/gc
bootstrap/compile/internal/amd64
bootstrap/compile/internal/arm
bootstrap/compile/internal/arm64
bootstrap/compile/internal/mips64
bootstrap/compile/internal/ppc64
bootstrap/compile/internal/s390x
bootstrap/compile/internal/x86
bootstrap/compile

Building go_bootstrap for host, linux/mips64le.
runtime/internal/sys
runtime/internal/atomic
runtime
internal/syscall/windows/sysdll
math
unicode/utf16
unicode
sync/atomic
sort
errors
internal/race
unicode/utf8
encoding
sync
container/heap
internal/singleflight
io
syscall
hash
hash/adler32
strings
bytes
strconv
bufio
path
encoding/base64
reflect
regexp/syntax
crypto
crypto/sha1
internal/syscall/windows
internal/syscall/windows/registry
time
regexp
os
encoding/binary
os/signal
path/filepath
fmt
io/ioutil
log
go/token
flag
debug/dwarf
encoding/json
compress/flate
text/template/parse
context
net/url
go/scanner
os/exec
go/ast
compress/zlib
text/template
debug/macho
debug/elf
go/parser
go/doc
go/build
cmd/go

Building packages and commands for linux/mips64le.
runtime/internal/sys
runtime/internal/atomic
runtime
errors
internal/race
sync/atomic
unicode
unicode/utf8
math
sort
container/list
sync
container/ring
crypto/subtle
internal/nettrace
container/heap
encoding
io
syscall
internal/singleflight
unicode/utf16
image/color
internal/syscall/windows/sysdll
runtime/race
hash
crypto/cipher
hash/adler32
hash/crc32
bytes
strings
crypto/hmac
strconv
math/rand
hash/crc64
hash/fnv
bufio
text/tabwriter
image/color/palette
path
vendor/golang_org/x/net/lex/httplex
html
reflect
regexp/syntax
compress/bzip2
time
crypto
crypto/aes
internal/syscall/unix
crypto/sha512
crypto/md5
crypto/rc4
crypto/sha1
crypto/sha256
encoding/base64
encoding/ascii85
encoding/base32
image
encoding/pem
regexp
runtime/trace
math/cmplx
cmd/compile/internal/test
os
cmd/vet/internal/whitelist
image/internal/imageutil
cmd/internal/pprof/svg
image/draw
image/jpeg
path/filepath
runtime/debug
os/signal
fmt
encoding/binary
io/ioutil
cmd/internal/sys
crypto/des
index/suffixarray
log
flag
debug/dwarf
compress/flate
debug/gosym
debug/plan9obj
cmd/vendor/golang.org/x/arch/arm/armasm
cmd/vendor/golang.org/x/arch/x86/x86asm
cmd/internal/obj
archive/tar
compress/zlib
archive/zip
debug/elf
debug/macho
debug/pe
cmd/internal/goobj
compress/gzip
compress/lzw
context
math/big
encoding/hex
go/token
os/exec
database/sql/driver
cmd/internal/objfile
encoding/csv
go/scanner
encoding/gob
database/sql
encoding/json
go/ast
cmd/addr2line
encoding/xml
vendor/golang_org/x/net/http2/hpack
crypto/dsa
encoding/asn1
crypto/elliptic
crypto/rand
go/parser
crypto/rsa
go/printer
mime
crypto/x509/pkix
crypto/ecdsa
mime/quotedprintable
net/http/internal
net/url
text/template/parse
go/constant
text/scanner
image/gif
image/png
runtime/pprof
internal/trace
go/types
cmd/cgo
go/format
text/template
testing
net/internal/socktest
testing/iotest
testing/quick
cmd/internal/obj/arm
cmd/internal/obj/arm64
internal/testenv
cmd/internal/obj/mips
go/doc
html/template
go/build
cmd/internal/obj/ppc64
cmd/internal/obj/s390x
cmd/internal/obj/x86
cmd/asm/internal/flags
cmd/asm/internal/lex
go/internal/gccgoimporter
go/internal/gcimporter
runtime/cgo
cmd/api
cmd/internal/bio
cmd/compile/internal/big
cmd/compile/internal/ssa
go/importer
cmd/internal/gcprog
cmd/cover
cmd/asm/internal/arch
net
os/user
cmd/asm/internal/asm
cmd/dist
cmd/doc
cmd/asm
cmd/fix

cmd/fix

runtime: s.allocCount= 77 s.nelems= 102
fatal error: s.allocCount != s.nelems && freeIndex == s.nelems

goroutine 1 [running]:
runtime.throw(0x6ad9e3, 0x31)
/home/nikola/go_final/src/runtime/panic.go:566 +0xb8 fp=0xc420411110 sp=0xc4204110f8
runtime.(_mcache).nextFree(0xffee4cc000, 0x6, 0x0, 0xffee47ecd8, 0x0)
/home/nikola/go_final/src/runtime/malloc.go:502 +0x178 fp=0xc420411158 sp=0xc420411110
runtime.mallocgc(0x50, 0x684920, 0x1, 0x1)
/home/nikola/go_final/src/runtime/malloc.go:658 +0xdc0 fp=0xc420411228 sp=0xc420411158
runtime.newobject(0x684920, 0xc420464148)
/home/nikola/go_final/src/runtime/malloc.go:785 +0x50 fp=0xc420411250 sp=0xc420411228
bootstrap/compile/internal/gc.typ(0xc420464121, 0x1)
/opt/go/src/cmd/compile/internal/gc/type.go:377 +0x44 fp=0xc4204112a8 sp=0xc420411250
bootstrap/compile/internal/gc.typFuncArgs(0xc42045f860, 0xc42047a230)
/opt/go/src/cmd/compile/internal/gc/type.go:475 +0x40 fp=0xc4204112e0 sp=0xc4204112a8
bootstrap/compile/internal/gc.dowidth(0xc42045f860)
/opt/go/src/cmd/compile/internal/gc/align.go:279 +0x980 fp=0xc420411418 sp=0xc4204112e0
bootstrap/compile/internal/gc.resumecheckwidth()
/opt/go/src/cmd/compile/internal/gc/align.go:376 +0x12c fp=0xc420411448 sp=0xc420411418
bootstrap/compile/internal/gc.Import(0xc42005a300)
/opt/go/src/cmd/compile/internal/gc/bimport.go:194 +0xabc fp=0xc420411768 sp=0xc420411448
bootstrap/compile/internal/gc.importfile(0xc4203fc8e0, 0x0, 0x0, 0x0)
/opt/go/src/cmd/compile/internal/gc/main.go:843 +0x10ec fp=0xc420411a40 sp=0xc420411768
bootstrap/compile/internal/gc.(_parser).importdcl(0xc4203fc8c0)
/opt/go/src/cmd/compile/internal/gc/parser.go:341 +0x1f8 fp=0xc420411ac0 sp=0xc420411a40
bootstrap/compile/internal/gc.(parser).import(0xc4203fc8c0)
/opt/go/src/cmd/compile/internal/gc/parser.go:300 +0xc4 fp=0xc420411ae8 sp=0xc420411ac0
bootstrap/compile/internal/gc.(_parser).file(0xc4203fc8c0)
/opt/go/src/cmd/compile/internal/gc/parser.go:268 +0x88 fp=0xc420411b68 sp=0xc420411ae8
bootstrap/compile/internal/gc.parse_file(0xc42005a240)
/opt/go/src/cmd/compile/internal/gc/parser.go:31 +0x60 fp=0xc420411b98 sp=0xc420411b68
bootstrap/compile/internal/gc.Main()
/opt/go/src/cmd/compile/internal/gc/main.go:334 +0x2038 fp=0xc420411e30 sp=0xc420411b98
bootstrap/compile/internal/mips64.Main()
/opt/go/src/cmd/compile/internal/mips64/galign.go:65 +0x4b0 fp=0xc420411e70 sp=0xc420411e30
main.main()
/opt/go/src/cmd/compile/main.go:39 +0x67c fp=0xc420411f38 sp=0xc420411e70
runtime.main()
/home/nikola/go_final/src/runtime/proc.go:183 +0x388 fp=0xc420411f88 sp=0xc420411f38
runtime.goexit()
/home/nikola/go_final/src/runtime/asm_mips64x.s:875 +0x4 fp=0xc420411f88 sp=0xc420411f88
cmd/gofmt

cmd/dist

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x42fb0]

goroutine 1 [running]:
runtime.throw(0x6abaea, 0x2a)
/home/nikola/go_final/src/runtime/panic.go:566 +0xb8 fp=0xc421d727e8 sp=0xc421d727d0
runtime.sigpanic()
/home/nikola/go_final/src/runtime/sigpanic_unix.go:12 +0x7c fp=0xc421d72838 sp=0xc421d727e8
runtime.stkbucket(0x1, 0x44000, 0xc421d72948, 0x20, 0x20, 0x1, 0x0)
/home/nikola/go_final/src/runtime/mprof.go:168 +0x1f8 fp=0xc421d72900 sp=0xc421d72840
runtime.mProf_Malloc(0xc421e20000, 0x44000)
/home/nikola/go_final/src/runtime/mprof.go:238 +0x184 fp=0xc421d72a80 sp=0xc421d72900
runtime.profilealloc(0xc42002c400, 0xc421e20000, 0x44000)
/home/nikola/go_final/src/runtime/malloc.go:808 +0x64 fp=0xc421d72a98 sp=0xc421d72a80
runtime.mallocgc(0x44000, 0x66d500, 0xc41ff35801, 0xc400000002)
/home/nikola/go_final/src/runtime/malloc.go:740 +0x998 fp=0xc421d72b68 sp=0xc421d72a98
runtime.newarray(0x66d500, 0x400, 0x42aba50c)
/home/nikola/go_final/src/runtime/malloc.go:798 +0xcc fp=0xc421d72ba8 sp=0xc421d72b68
runtime.hashGrow(0x656bc0, 0xc4200164b0)
/home/nikola/go_final/src/runtime/hashmap.go:824 +0xbc fp=0xc421d72bd8 sp=0xc421d72ba8
runtime.mapassign1(0x656bc0, 0xc4200164b0, 0xc421d72d30, 0xc421d72d20)
/home/nikola/go_final/src/runtime/hashmap.go:522 +0x9e8 fp=0xc421d72cd8 sp=0xc421d72bd8
bootstrap/compile/internal/gc.internString(0xc421d72e18, 0xc, 0x14, 0x0, 0x0)
/opt/go/src/cmd/compile/internal/gc/lex.go:856 +0x140 fp=0xc421d72d50 sp=0xc421d72cd8
bootstrap/compile/internal/gc.(_Pkg).LookupBytes(0xc420014500, 0xc421d72e18, 0xc, 0x14, 0x0)
/opt/go/src/cmd/compile/internal/gc/subr.go:281 +0xf4 fp=0xc421d72da0 sp=0xc421d72d50
bootstrap/compile/internal/gc.LookupBytes(0xc421d72e18, 0xc, 0x14, 0x7b4)
/opt/go/src/cmd/compile/internal/gc/subr.go:237 +0x5c fp=0xc421d72dd0 sp=0xc421d72da0
bootstrap/compile/internal/gc.LookupN(0x697bfc, 0x8, 0x7b4, 0xc42181af30)
/opt/go/src/cmd/compile/internal/gc/subr.go:246 +0x14c fp=0xc421d72e88 sp=0xc421d72dd0
bootstrap/compile/internal/gc.Tempname(0xc421d72f08, 0xc420e89d60)
/opt/go/src/cmd/compile/internal/gc/gen.go:689 +0x198 fp=0xc421d72ef0 sp=0xc421d72e88
bootstrap/compile/internal/gc.temp(0xc420e89d60, 0xc420016540)
/opt/go/src/cmd/compile/internal/gc/gen.go:709 +0x94 fp=0xc421d72f98 sp=0xc421d72ef0
bootstrap/compile/internal/gc.slicelit(0x0, 0xc42181a5a0, 0xc42181aab0, 0xc421d74940)
/opt/go/src/cmd/compile/internal/gc/sinit.go:785 +0xcb4 fp=0xc421d730c8 sp=0xc421d72f98
bootstrap/compile/internal/gc.anylit(0x0, 0xc42181a5a0, 0xc42181aab0, 0xc421d74940)
/opt/go/src/cmd/compile/internal/gc/sinit.go:1106 +0x750 fp=0xc421d731c0 sp=0xc421d730c8
bootstrap/compile/internal/gc.walkexpr(0xc42181a5a0, 0xc421d74940, 0xc42181a5a0)
/opt/go/src/cmd/compile/internal/gc/walk.go:1572 +0x7384 fp=0xc421d73868 sp=0xc421d731c0
bootstrap/compile/internal/gc.mkdotargslice(0xc420af06d8, 0x3, 0x5, 0xc4211fd640, 0x3, 0x4, 0xc420c1ea00, 0x0, 0xc421d74940, 0xc420ee3560, ...)
/opt/go/src/cmd/compile/internal/gc/walk.go:1774 +0x42c fp=0xc421d738f0 sp=0xc421d73868
bootstrap/compile/internal/gc.ascompatte(0xc420aed31e, 0xc420ada3f0, 0x0, 0xc420c20280, 0xc420af06d8, 0x3, 0x5, 0x0, 0xc421d74940, 0x0, ...)
/opt/go/src/cmd/compile/internal/gc/walk.go:1878 +0x8f4 fp=0xc421d73b40 sp=0xc421d738f0
bootstrap/compile/internal/gc.walkexpr(0xc420ada3f0, 0xc421d74940, 0xc420a42600)
/opt/go/src/cmd/compile/internal/gc/walk.go:713 +0x53cc fp=0xc421d741e8 sp=0xc421d73b40
bootstrap/compile/internal/gc.walkexpr(0xc420adac60, 0xc421d74940, 0x0)
/opt/go/src/cmd/compile/internal/gc/walk.go:735 +0x23b4 fp=0xc421d74890 sp=0xc421d741e8
bootstrap/compile/internal/gc.walkstmt(0xc420adac60, 0xc421311c20)
/opt/go/src/cmd/compile/internal/gc/walk.go:192 +0x338 fp=0xc421d74ac0 sp=0xc421d74890
bootstrap/compile/internal/gc.walkstmtlist(0xc421acc6c0, 0x6, 0x8)
/opt/go/src/cmd/compile/internal/gc/walk.go:80 +0x8c fp=0xc421d74af0 sp=0xc421d74ac0
bootstrap/compile/internal/gc.walkstmt(0xc420a43cb0, 0xc420a435f0)
/opt/go/src/cmd/compile/internal/gc/walk.go:282 +0x1980 fp=0xc421d74d20 sp=0xc421d74af0
bootstrap/compile/internal/gc.walkstmtlist(0xc421924300, 0x11, 0x20)
/opt/go/src/cmd/compile/internal/gc/walk.go:80 +0x8c fp=0xc421d74d50 sp=0xc421d74d20
bootstrap/compile/internal/gc.walkstmt(0xc4209dd710, 0xc4208e67e0)
/opt/go/src/cmd/compile/internal/gc/walk.go:281 +0x1918 fp=0xc421d74f80 sp=0xc421d74d50
bootstrap/compile/internal/gc.walkstmtlist(0xc4203b40f0, 0x1e, 0x1e)
/opt/go/src/cmd/compile/internal/gc/walk.go:80 +0x8c fp=0xc421d74fb0 sp=0xc421d74f80
bootstrap/compile/internal/gc.(_exprSwitch).walk(0xc421d75120, 0xc4207517a0)
/opt/go/src/cmd/compile/internal/gc/swt.go:290 +0x950 fp=0xc421d75100 sp=0xc421d74fb0
bootstrap/compile/internal/gc.walkswitch(0xc4207517a0)
/opt/go/src/cmd/compile/internal/gc/swt.go:211 +0x174 fp=0xc421d75130 sp=0xc421d75100
bootstrap/compile/internal/gc.walkstmt(0xc4207517a0, 0xc4207514d0)
/opt/go/src/cmd/compile/internal/gc/walk.go:358 +0x26ec fp=0xc421d75360 sp=0xc421d75130
bootstrap/compile/internal/gc.walkstmtlist(0xc4211c2000, 0x16, 0x16)
/opt/go/src/cmd/compile/internal/gc/walk.go:80 +0x8c fp=0xc421d75390 sp=0xc421d75360
bootstrap/compile/internal/gc.(*exprSwitch).walk(0xc421d75500, 0xc4205df050)
/opt/go/src/cmd/compile/internal/gc/swt.go:290 +0x950 fp=0xc421d754e0 sp=0xc421d75390
bootstrap/compile/internal/gc.walkswitch(0xc4205df050)
/opt/go/src/cmd/compile/internal/gc/swt.go:211 +0x174 fp=0xc421d75510 sp=0xc421d754e0
bootstrap/compile/internal/gc.walkstmt(0xc4205df050, 0xc4205de3f0)
/opt/go/src/cmd/compile/internal/gc/walk.go:358 +0x26ec fp=0xc421d75740 sp=0xc421d75510
bootstrap/compile/internal/gc.walkstmtlist(0xc421924100, 0x20, 0x20)
/opt/go/src/cmd/compile/internal/gc/walk.go:80 +0x8c fp=0xc421d75770 sp=0xc421d75740
bootstrap/compile/internal/gc.walk(0xc42040f7a0)
/opt/go/src/cmd/compile/internal/gc/walk.go:65 +0x474 fp=0xc421d758c8 sp=0xc421d75770
bootstrap/compile/internal/gc.compile(0xc42040f7a0)
/opt/go/src/cmd/compile/internal/gc/pgen.go:391 +0xa18 fp=0xc421d75b00 sp=0xc421d758c8
bootstrap/compile/internal/gc.funccompile(0xc42040f7a0)
/opt/go/src/cmd/compile/internal/gc/dcl.go:1287 +0x200 fp=0xc421d75b78 sp=0xc421d75b00
bootstrap/compile/internal/gc.Main()
/opt/go/src/cmd/compile/internal/gc/main.go:467 +0x2b78 fp=0xc421d75e10 sp=0xc421d75b78
bootstrap/compile/internal/mips64.Main()
/opt/go/src/cmd/compile/internal/mips64/galign.go:65 +0x4b0 fp=0xc421d75e50 sp=0xc421d75e10
main.main()
/opt/go/src/cmd/compile/main.go:39 +0x67c fp=0xc421d75f18 sp=0xc421d75e50
runtime.main()
/home/nikola/go_final/src/runtime/proc.go:183 +0x388 fp=0xc421d75f68 sp=0xc421d75f18
runtime.goexit()
/home/nikola/go_final/src/runtime/asm_mips64x.s:875 +0x4 fp=0xc421d75f68 sp=0xc421d75f68
cmd/internal/pprof/profile

cmd/doc

unexpected fault address 0xc42081b870
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x1 addr=0xc42081b870 pc=0x1b668]

goroutine 1 [running, locked to thread]:
runtime.throw(0x26259f, 0x5)
/home/nikola/go_final/src/runtime/panic.go:566 +0xb8 fp=0xc42003dcd0 sp=0xc42003dcb8
runtime.sigpanic()
/home/nikola/go_final/src/runtime/sigpanic_unix.go:27 +0x40c fp=0xc42003dd20 sp=0xc42003dcd0
runtime.mapassign1(0x235e60, 0xc4200180c0, 0x280940, 0x280950)
/home/nikola/go_final/src/runtime/hashmap.go:485 +0x2f8 fp=0xc42003de28 sp=0xc42003dd28
time.init()
/home/nikola/go_final/src/time/format.go:1184 +0x2a8 fp=0xc42003de80 sp=0xc42003de28
os.init()
/home/nikola/go_final/src/os/wait_waitid.go:41 +0xc0 fp=0xc42003deb8 sp=0xc42003de80
fmt.init()
/home/nikola/go_final/src/fmt/scan.go:1198 +0xc0 fp=0xc42003def0 sp=0xc42003deb8
log.init()
/home/nikola/go_final/src/log/log.go:347 +0xb0 fp=0xc42003df38 sp=0xc42003def0
bootstrap/internal/obj.init()
/opt/go/src/cmd/internal/obj/zbootstrap.go:16 +0xb0 fp=0xc42003df40 sp=0xc42003df38
main.init()
/opt/go/src/cmd/link/main.go:41 +0xb0 fp=0xc42003df48 sp=0xc42003df40
runtime.main()
/home/nikola/go_final/src/runtime/proc.go:172 +0x330 fp=0xc42003df98 sp=0xc42003df48
runtime.goexit()
/home/nikola/go_final/src/runtime/asm_mips64x.s:875 +0x4 fp=0xc42003df98 sp=0xc42003df98
cmd/internal/pprof/tempfile
go build cmd/gofmt: /opt/go/pkg/tool/linux_mips64le/compile: signal: segmentation fault
cmd/link/internal/ld
go build cmd/internal/pprof/profile: /opt/go/pkg/tool/linux_mips64le/compile: signal: segmentation fault
cmd/nm
go build cmd/internal/pprof/tempfile: /opt/go/pkg/tool/linux_mips64le/compile: signal: segmentation fault
cmd/objdump
go build cmd/link/internal/ld: /opt/go/pkg/tool/linux_mips64le/compile: signal: segmentation fault
cmd/pack
go build cmd/nm: /opt/go/pkg/tool/linux_mips64le/compile: signal: segmentation fault
cmd/vet/internal/cfg

cmd/asm

fatal error: unexpected signal during runtime execution
[signal SIGBUS: bus error code=0x80 addr=0x0 pc=0x42eb8]

goroutine 1 [running]:
runtime.throw(0x26cb4a, 0x2a)
/home/nikola/go_final/src/runtime/panic.go:566 +0xb8 fp=0xc42003cbd0 sp=0xc42003cbb8
runtime.sigpanic()
/home/nikola/go_final/src/runtime/sigpanic_unix.go:12 +0x7c fp=0xc42003cc20 sp=0xc42003cbd0
runtime.stkbucket(0x1, 0xe6000, 0xc42003cd30, 0xb, 0x20, 0xc42006c101, 0xc420656000)
/home/nikola/go_final/src/runtime/mprof.go:168 +0x1f8 fp=0xc42003cce8 sp=0xc42003cc28
runtime.mProf_Malloc(0xc420982000, 0xe6000)
/home/nikola/go_final/src/runtime/mprof.go:238 +0x184 fp=0xc42003ce68 sp=0xc42003cce8
runtime.profilealloc(0xc420058000, 0xc420982000, 0xe6000)
/home/nikola/go_final/src/runtime/malloc.go:808 +0x64 fp=0xc42003ce80 sp=0xc42003ce68
runtime.mallocgc(0xe6000, 0x22aa20, 0x1, 0x1000)
/home/nikola/go_final/src/runtime/malloc.go:740 +0x998 fp=0xc42003cf50 sp=0xc42003ce80
runtime.makeslice(0x22aa20, 0xe54f7, 0xe54f7, 0x0, 0x0, 0x0)
/home/nikola/go_final/src/runtime/slice.go:57 +0x128 fp=0xc42003cfa0 sp=0xc42003cf50
bootstrap/link/internal/ld.(_objReader).readSlices(0xc42003d350)
/opt/go/src/cmd/link/internal/ld/objfile.go:235 +0x68 fp=0xc42003d070 sp=0xc42003cfa0
bootstrap/link/internal/ld.(_objReader).loadObjFile(0xc42003d350)
/opt/go/src/cmd/link/internal/ld/objfile.go:208 +0x3e8 fp=0xc42003d2a0 sp=0xc42003d070
bootstrap/link/internal/ld.LoadObjFile(0xc4204ae000, 0xc4204c2260, 0x262ddf, 0x7, 0x1b175e, 0xc4204ce4e0, 0x2c)
/opt/go/src/cmd/link/internal/ld/objfile.go:161 +0x260 fp=0xc42003d460 sp=0xc42003d2a0
bootstrap/link/internal/ld.ldobj(0xc4204c2260, 0x262ddf, 0x7, 0x1b1819, 0xc4204ce4e0, 0x2c, 0xc420018390, 0x24, 0x1, 0x0)
/opt/go/src/cmd/link/internal/ld/lib.go:1428 +0xda8 fp=0xc42003d648 sp=0xc42003d460
bootstrap/link/internal/ld.objfile(0xc42004e1c0)
/opt/go/src/cmd/link/internal/ld/lib.go:861 +0xe68 fp=0xc42003d8f0 sp=0xc42003d648
bootstrap/link/internal/ld.loadlib()
/opt/go/src/cmd/link/internal/ld/lib.go:526 +0x64c fp=0xc42003dc28 sp=0xc42003d8f0
bootstrap/link/internal/ld.Ldmain()
/opt/go/src/cmd/link/internal/ld/pobj.go:189 +0x1c80 fp=0xc42003de78 sp=0xc42003dc28
bootstrap/link/internal/mips64.Main()
/opt/go/src/cmd/link/internal/mips64/obj.go:45 +0x3c fp=0xc42003de80 sp=0xc42003de78
main.main()
/opt/go/src/cmd/link/main.go:34 +0x64c fp=0xc42003df48 sp=0xc42003de80
runtime.main()
/home/nikola/go_final/src/runtime/proc.go:183 +0x388 fp=0xc42003df98 sp=0xc42003df48
runtime.goexit()
/home/nikola/go_final/src/runtime/asm_mips64x.s:875 +0x4 fp=0xc42003df98 sp=0xc42003df98
cmd/yacc
go build cmd/objdump: /opt/go/pkg/tool/linux_mips64le/compile: signal: segmentation fault
go build cmd/pack: /opt/go/pkg/tool/linux_mips64le/compile: signal: segmentation fault
go build cmd/yacc: /opt/go/pkg/tool/linux_mips64le/compile: signal: segmentation fault
go build cmd/vet/internal/cfg: /opt/go/pkg/tool/linux_mips64le/compile: signal: segmentation fault

cmd/compile/internal/ssa

runtime: s.allocCount= 16 s.nelems= 28
fatal error: s.allocCount != s.nelems && freeIndex == s.nelems

goroutine 1 [running]:
runtime.throw(0x6ad9e3, 0x31)
/home/nikola/go_final/src/runtime/panic.go:566 +0xb8 fp=0xc42519efb0 sp=0xc42519ef98
runtime.(_mcache).nextFree(0xfff76814b0, 0x12, 0x0, 0xfff7211368, 0xc4250ead00)
/home/nikola/go_final/src/runtime/malloc.go:502 +0x178 fp=0xc42519eff8 sp=0xc42519efb0
runtime.mallocgc(0x120, 0x6885a0, 0x1, 0x0)
/home/nikola/go_final/src/runtime/malloc.go:658 +0xdc0 fp=0xc42519f0c8 sp=0xc42519eff8
runtime.newobject(0x6885a0, 0x29fa44)
/home/nikola/go_final/src/runtime/malloc.go:785 +0x50 fp=0xc42519f0f0 sp=0xc42519f0c8
bootstrap/internal/obj.(_Link).NewProg(0xc420124000, 0x40)
/opt/go/src/cmd/internal/obj/util.go:183 +0x114 fp=0xc42519f110 sp=0xc42519f0f0
bootstrap/compile/internal/gc.addmove(0xc424fdc098, 0xb3, 0x3406, 0x1)
/opt/go/src/cmd/compile/internal/gc/reg.go:225 +0x48 fp=0xc42519f1e0 sp=0xc42519f110
bootstrap/compile/internal/gc.paint3(0xc424fdc098, 0xb3, 0x40, 0x3406)
/opt/go/src/cmd/compile/internal/gc/reg.go:910 +0x7e8 fp=0xc42519f2b8 sp=0xc42519f1e0
bootstrap/compile/internal/gc.paint3(0xc424fdb490, 0xb3, 0x40, 0x3406)
/opt/go/src/cmd/compile/internal/gc/reg.go:928 +0xa00 fp=0xc42519f390 sp=0xc42519f2b8
bootstrap/compile/internal/gc.paint3(0xc424fdadb0, 0xb3, 0x40, 0x3406)
/opt/go/src/cmd/compile/internal/gc/reg.go:928 +0xa00 fp=0xc42519f468 sp=0xc42519f390
bootstrap/compile/internal/gc.regopt(0xc420124278)
/opt/go/src/cmd/compile/internal/gc/reg.go:1364 +0x26b8 fp=0xc42519f878 sp=0xc42519f468
bootstrap/compile/internal/gc.genlegacy(0xc420124278, 0xc421a35f80, 0xc421a22000)
/opt/go/src/cmd/compile/internal/gc/pgen.go:535 +0x414 fp=0xc42519f8a8 sp=0xc42519f878
bootstrap/compile/internal/gc.compile(0xc42121e120)
/opt/go/src/cmd/compile/internal/gc/pgen.go:485 +0x13ac fp=0xc42519fae0 sp=0xc42519f8a8
bootstrap/compile/internal/gc.funccompile(0xc42121e120)
/opt/go/src/cmd/compile/internal/gc/dcl.go:1287 +0x200 fp=0xc42519fb58 sp=0xc42519fae0
bootstrap/compile/internal/gc.Main()
/opt/go/src/cmd/compile/internal/gc/main.go:467 +0x2b78 fp=0xc42519fdf0 sp=0xc42519fb58
bootstrap/compile/internal/mips64.Main()
/opt/go/src/cmd/compile/internal/mips64/galign.go:65 +0x4b0 fp=0xc42519fe30 sp=0xc42519fdf0
main.main()
/opt/go/src/cmd/compile/main.go:39 +0x67c fp=0xc42519fef8 sp=0xc42519fe30
runtime.main()
/home/nikola/go_final/src/runtime/proc.go:183 +0x388 fp=0xc42519ff48 sp=0xc42519fef8
runtime.goexit()
/home/nikola/go_final/src/runtime/asm_mips64x.s:875 +0x4 fp=0xc42519ff48 sp=0xc42519ff48

net

panic: runtime error: index out of range

goroutine 1 [running]:
panic(0x657800, 0xc42000e150)
/home/nikola/go_final/src/runtime/panic.go:500 +0x4c4
bootstrap/compile/internal/gc.onebitlivepointermap(0xc420e4d420, 0xc400000008, 0xc4220a54d0, 0x1, 0x1, 0xc42203d480, 0x8, 0x8, 0x5, 0xc4220a54fc, ...)
/opt/go/src/cmd/compile/internal/gc/plive.go:973 +0xc4
bootstrap/compile/internal/gc.livenessepilogue(0xc420e4d420)
/opt/go/src/cmd/compile/internal/gc/plive.go:1267 +0xf88
bootstrap/compile/internal/gc.liveness(0xc420bfc510, 0xc4200da278, 0xc420e4c7e0, 0xc420e4c9a0)
/opt/go/src/cmd/compile/internal/gc/plive.go:1748 +0x33c
bootstrap/compile/internal/gc.genlegacy(0xc4200da278, 0xc420e4c7e0, 0xc420e4c9a0)
/opt/go/src/cmd/compile/internal/gc/pgen.go:550 +0x39c
bootstrap/compile/internal/gc.compile(0xc420bfc510)
/opt/go/src/cmd/compile/internal/gc/pgen.go:485 +0x13ac
bootstrap/compile/internal/gc.funccompile(0xc420bfc510)
/opt/go/src/cmd/compile/internal/gc/dcl.go:1287 +0x200
bootstrap/compile/internal/gc.Main()
/opt/go/src/cmd/compile/internal/gc/main.go:467 +0x2b78
bootstrap/compile/internal/mips64.Main()
/opt/go/src/cmd/compile/internal/mips64/galign.go:65 +0x4b0
main.main()
/opt/go/src/cmd/compile/main.go:39 +0x67c

@cherrymui
Copy link
Member

If you run with the same commit multiple times, do you get same failure? If not, one possibility could be the atomic operation is not really atomic on your machine. Could you run sync/atomic test with the bootstrap Go?

GOROOT=/home/nikola/go-linux-mips64le-bootstrap /home/nikola/go-linux-mips64le-bootstrap/bin/go test sync/atomic

@fejsov
Copy link
Author

fejsov commented Aug 29, 2016

After first try, I got OK for atomic. After that, I tried to compile Go on the board. I got different error than previously described. Again, I tried to run atomic test, but got Segmentation fault message.

@cherrymui
Copy link
Member

Again, I tried to run atomic test, but got Segmentation fault message.

Is it the bootstrap Go? Could you paste the stack trace? That could be helpful.

@fejsov
Copy link
Author

fejsov commented Aug 31, 2016

Hm... Now I got floating point exception. Here are the strace logs.
atomic_bad.txt
atomic_good.txt
make.bash.txt
First, I run atomic (atomic_good).
Then, make.bash, and finally atomic again (atomic_bad).

@fejsov
Copy link
Author

fejsov commented Sep 27, 2016

Hi @cherrymui. I think I found the problem. We have updated kernel (from 4.1 to 4.8) and it works as expected now.

@minux
Copy link
Member

minux commented Sep 27, 2016 via email

@fejsov
Copy link
Author

fejsov commented Sep 27, 2016

@minux, I don't know exact kernel problem. Building bootstrap on my board was giving different unexpected results (segfaults, floating point errors).

@quentinmit quentinmit added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 5, 2016
@rsc
Copy link
Contributor

rsc commented Oct 21, 2016

I put 4.8 on golang.org/wiki/MinimumRequirements for linux/mips64le.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

7 participants