-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
Comments
Hi @fejsov, does your bootstrap Go work? Maybe run some simple program like |
Hi @cherrymui , I can run hello.go without problems. Sure, I used this command: |
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? |
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. |
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. Building Go toolchain using /home/nikola/go-linux-mips64le-bootstrap. Building go_bootstrap for host, linux/mips64le. Building packages and commands for linux/mips64le. cmd/fixruntime: s.allocCount= 77 s.nelems= 102 goroutine 1 [running]: cmd/distfatal error: unexpected signal during runtime execution goroutine 1 [running]: cmd/docunexpected fault address 0xc42081b870 goroutine 1 [running, locked to thread]: cmd/asmfatal error: unexpected signal during runtime execution goroutine 1 [running]: cmd/compile/internal/ssaruntime: s.allocCount= 16 s.nelems= 28 goroutine 1 [running]: netpanic: runtime error: index out of range goroutine 1 [running]: |
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
|
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. |
Is it the bootstrap Go? Could you paste the stack trace? That could be helpful. |
Hm... Now I got floating point exception. Here are the strace logs. |
Hi @cherrymui. I think I found the problem. We have updated kernel (from 4.1 to 4.8) and it works as expected now. |
Do you know the exact kernel problem that the kernel update fixes?
FTR, my mips64le builder machine (loongson 2F notebook) is running
stock linux kernel 3.12.22, and it can bootstrap and test Go fine.
I'd like to know the problem of older kernel for mips64le machines so
that we can update golang.org/wiki/MinimumRequirements. Thanks.
|
@minux, I don't know exact kernel problem. Building bootstrap on my board was giving different unexpected results (segfaults, floating point errors). |
I put 4.8 on golang.org/wiki/MinimumRequirements for linux/mips64le. |
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
The text was updated successfully, but these errors were encountered: