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

gomobile init fatal error: MSpanList_Insert #18544

Closed
jpsim opened this issue Jan 6, 2017 · 4 comments
Closed

gomobile init fatal error: MSpanList_Insert #18544

jpsim opened this issue Jan 6, 2017 · 4 comments

Comments

@jpsim
Copy link

jpsim commented Jan 6, 2017

In following the steps from the "Mobile" tutorial on this repo's wiki, I got the following crash. Please let me know if there's other useful information I could provide to help troubleshoot.


Go Version: go1.6 darwin/amd64
Environment:

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/jp/golang/"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.6/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.6/libexec/pkg/tool/darwin_amd64"
GO15VENDOREXPERIMENT="1"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"

What did you do?

$ go get golang.org/x/mobile/cmd/gomobile
$ gomobile init
gomobile: go install -gcflags=-shared -ldflags=-shared -pkgdir=/Users/jp/golang/pkg/gomobile/pkg_android_amd64 std failed: exit status 2
# internal/race
failed MSpanList_Insert 0xafb7d8 0x1160d92510f72 0x0 0x0
fatal error: MSpanList_Insert

runtime stack:
runtime.throw(0x46e5c0, 0x10)
	/usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:530 +0x90
runtime.(*mSpanList).insert(0x983d48, 0xafb7d8)
	/usr/local/Cellar/go/1.6/libexec/src/runtime/mheap.go:933 +0x293
runtime.(*mheap).freeSpanLocked(0x983540, 0xafb7d8, 0x100, 0x0)
	/usr/local/Cellar/go/1.6/libexec/src/runtime/mheap.go:809 +0x4be
runtime.(*mheap).grow(0x983540, 0x8, 0x0)
	/usr/local/Cellar/go/1.6/libexec/src/runtime/mheap.go:675 +0x2a0
runtime.(*mheap).allocSpanLocked(0x983540, 0x1, 0xafb760)
	/usr/local/Cellar/go/1.6/libexec/src/runtime/mheap.go:553 +0x4e3
runtime.(*mheap).alloc_m(0x983540, 0x1, 0x10, 0xafb760)
	/usr/local/Cellar/go/1.6/libexec/src/runtime/mheap.go:437 +0x119
runtime.(*mheap).alloc.func1()
	/usr/local/Cellar/go/1.6/libexec/src/runtime/mheap.go:502 +0x41
runtime.systemstack(0x7fff5fbff008)
	/usr/local/Cellar/go/1.6/libexec/src/runtime/asm_amd64.s:307 +0xab
runtime.(*mheap).alloc(0x983540, 0x1, 0x10000000010, 0xeb4f)
	/usr/local/Cellar/go/1.6/libexec/src/runtime/mheap.go:503 +0x63
runtime.(*mcentral).grow(0x984f10, 0x0)
	/usr/local/Cellar/go/1.6/libexec/src/runtime/mcentral.go:209 +0x93
runtime.(*mcentral).cacheSpan(0x984f10, 0xc8200101b0)
	/usr/local/Cellar/go/1.6/libexec/src/runtime/mcentral.go:89 +0x47d
runtime.(*mcache).refill(0xaf5000, 0x10, 0xc820010180)
	/usr/local/Cellar/go/1.6/libexec/src/runtime/mcache.go:119 +0xcc
runtime.mallocgc.func2()
	/usr/local/Cellar/go/1.6/libexec/src/runtime/malloc.go:642 +0x2b
runtime.systemstack(0x974d00)
	/usr/local/Cellar/go/1.6/libexec/src/runtime/asm_amd64.s:291 +0x79
runtime.mstart()
	/usr/local/Cellar/go/1.6/libexec/src/runtime/proc.go:1048

goroutine 1 [running]:
runtime.systemstack_switch()
	/usr/local/Cellar/go/1.6/libexec/src/runtime/asm_amd64.s:245 fp=0xc8200c55b8 sp=0xc8200c55b0
runtime.mallocgc(0xf0, 0x4386e0, 0x0, 0x0)
	/usr/local/Cellar/go/1.6/libexec/src/runtime/malloc.go:643 +0x869 fp=0xc8200c5690 sp=0xc8200c55b8
runtime.newobject(0x4386e0, 0x0)
	/usr/local/Cellar/go/1.6/libexec/src/runtime/malloc.go:781 +0x42 fp=0xc8200c56b8 sp=0xc8200c5690
cmd/compile/internal/gc.structfield(0xc8200f7950, 0xc8200fdef0)
	/usr/local/Cellar/go/1.6/libexec/src/cmd/compile/internal/gc/dcl.go:779 +0x10a fp=0xc8200c5790 sp=0xc8200c56b8
cmd/compile/internal/gc.tofunargs(0xc8200fa3c0, 0xc8200fdc20)
	/usr/local/Cellar/go/1.6/libexec/src/cmd/compile/internal/gc/dcl.go:883 +0xb3 fp=0xc8200c57d0 sp=0xc8200c5790
cmd/compile/internal/gc.functype0(0xc8200fda40, 0x0, 0xc8200fa3a0, 0xc8200fa3e0)
	/usr/local/Cellar/go/1.6/libexec/src/cmd/compile/internal/gc/dcl.go:1188 +0xc9 fp=0xc8200c5810 sp=0xc8200c57d0
cmd/compile/internal/gc.functype(0x0, 0xc8200fa3a0, 0xc8200fa3e0, 0x5)
	/usr/local/Cellar/go/1.6/libexec/src/cmd/compile/internal/gc/dcl.go:1173 +0x8d fp=0xc8200c5850 sp=0xc8200c5810
cmd/compile/internal/gc.(*parser).hidden_fndcl(0x973b80, 0x0)
	/usr/local/Cellar/go/1.6/libexec/src/cmd/compile/internal/gc/parser.go:2161 +0x2f7 fp=0xc8200c5930 sp=0xc8200c5850
cmd/compile/internal/gc.(*parser).hidden_import(0x973b80)
	/usr/local/Cellar/go/1.6/libexec/src/cmd/compile/internal/gc/parser.go:3017 +0x15a fp=0xc8200c5a58 sp=0xc8200c5930
cmd/compile/internal/gc.(*parser).hidden_import_list(0x973b80)
	/usr/local/Cellar/go/1.6/libexec/src/cmd/compile/internal/gc/parser.go:3462 +0x28 fp=0xc8200c5a80 sp=0xc8200c5a58
cmd/compile/internal/gc.(*parser).import_there(0x973b80)
	/usr/local/Cellar/go/1.6/libexec/src/cmd/compile/internal/gc/parser.go:503 +0x26 fp=0xc8200c5aa8 sp=0xc8200c5a80
cmd/compile/internal/gc.(*parser).loadsys(0x973b80)
	/usr/local/Cellar/go/1.6/libexec/src/cmd/compile/internal/gc/parser.go:77 +0x96 fp=0xc8200c5ad0 sp=0xc8200c5aa8
cmd/compile/internal/gc.parse_file()
	/usr/local/Cellar/go/1.6/libexec/src/cmd/compile/internal/gc/parser.go:54 +0x3a fp=0xc8200c5ae0 sp=0xc8200c5ad0
cmd/compile/internal/gc.Main()
	/usr/local/Cellar/go/1.6/libexec/src/cmd/compile/internal/gc/lex.go:345 +0x1d44 fp=0xc8200c5e00 sp=0xc8200c5ae0
cmd/compile/internal/amd64.Main()
	/usr/local/Cellar/go/1.6/libexec/src/cmd/compile/internal/amd64/galign.go:127 +0x58d fp=0xc8200c5e68 sp=0xc8200c5e00
main.main()
	/usr/local/Cellar/go/1.6/libexec/src/cmd/compile/main.go:32 +0x395 fp=0xc8200c5f40 sp=0xc8200c5e68
runtime.main()
	/usr/local/Cellar/go/1.6/libexec/src/runtime/proc.go:188 +0x2b0 fp=0xc8200c5f90 sp=0xc8200c5f40
runtime.goexit()
	/usr/local/Cellar/go/1.6/libexec/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc8200c5f98 sp=0xc8200c5f90
@bradfitz
Copy link
Contributor

bradfitz commented Jan 6, 2017

Your Go version is too old for Sierra.

@bradfitz
Copy link
Contributor

bradfitz commented Jan 6, 2017

Update to Go 1.7.4.

Dup of #16570, #18380, etc.

@bradfitz bradfitz closed this as completed Jan 6, 2017
@jpsim
Copy link
Author

jpsim commented Jan 6, 2017

Excellent, thanks for the quick response. Perhaps this could be reflected in the wiki, where it says:

Note: You need to have Go 1.5 or above to install mobile tools.

Simply adding "Or Go 1.7.4 or above if using macOS Sierra or later" would've been helpful.

Thanks again.

@bradfitz
Copy link
Contributor

bradfitz commented Jan 6, 2017

@jpsim, done.

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