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

runtime: fatal error: MSpanList_Insert #17492

Closed
willfaught opened this issue Oct 17, 2016 · 7 comments

Comments

Projects
None yet
5 participants
@willfaught
Copy link
Contributor

commented Oct 17, 2016

What version of Go are you using (go version)?

go version go1.7.1 darwin/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/will.faught/Developer/go:/Users/will.faught/Developer/devbox/codebases/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.7.1/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.7.1/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/jt/c0hjffqj6gxbhy00gm0btzkr79h225/T/go-build911082165=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

What did you do?

Ran docker:

$ docker

Docker version: Docker version 1.7.1, build 786b29d

What did you expect to see?

Normal help output.

What did you see instead?

failed MSpanList_Insert 0x755588 0xcbde9d7ef878 0x0
fatal error: MSpanList_Insert

runtime stack:
runtime.MSpanList_Insert(0x6c5b58, 0x755588)
    /usr/local/go/src/runtime/mheap.c:692 +0x8f
runtime.MHeap_Free(0x6c5a80, 0x755588, 0xc200000000)
    /usr/local/go/src/runtime/mheap.c:500 +0x5b
runtime.MCentral_FreeSpan(0x6cd7f8, 0x755588, 0x1c, 0xc2080b6000, 0xc2080b7e60, 0x1000, 0x64)
    /usr/local/go/src/runtime/mcentral.c:181 +0x1bb
runtime.MSpan_Sweep(0x755588, 0x2d00000000, 0x1)
    /usr/local/go/src/runtime/mgc0.c:1099 +0x477
runtime.MHeap_Alloc(0x6c5a80, 0x1, 0x1000000000a, 0x110c9)
    /usr/local/go/src/runtime/mheap.c:240 +0x66
runtime.MCentral_CacheSpan(0x6ccef8, 0x755248)
    /usr/local/go/src/runtime/mcentral.c:85 +0x167
runtime.MCache_Refill(0x750000, 0xa, 0x755248)
    /usr/local/go/src/runtime/mcache.c:90 +0xa0

goroutine 1 [running]:
runtime.switchtoM()
    /usr/local/go/src/runtime/asm_amd64.s:198 fp=0xc2080f4c40 sp=0xc2080f4c38
runtime.mallocgc(0x90, 0x351f00, 0xc200000001, 0xc20808def0)
    /usr/local/go/src/runtime/malloc.go:178 +0x849 fp=0xc2080f4cf0 sp=0xc2080f4c40
runtime.newarray(0x351f00, 0x11, 0xc20808def0)
    /usr/local/go/src/runtime/malloc.go:365 +0xc1 fp=0xc2080f4d28 sp=0xc2080f4cf0
runtime.makeslice(0x46d900, 0x11, 0x11, 0x0, 0x0, 0x0)
    /usr/local/go/src/runtime/slice.go:32 +0x15c fp=0xc2080f4d70 sp=0xc2080f4d28
math/big.nat.divLarge(0xc208064c80, 0x10, 0x25, 0xc2080a4a20, 0x20, 0x24, 0xc2080a5b00, 0x20, 0x24, 0xc2080a0160, ...)
    /usr/local/go/src/math/big/nat.go:541 +0x2d0 fp=0xc2080f4f08 sp=0xc2080f4d70
math/big.nat.div(0xc208064c80, 0x10, 0x25, 0xc2080a4a20, 0x20, 0x24, 0xc2080a5b00, 0x20, 0x24, 0xc2080a0160, ...)
    /usr/local/go/src/math/big/nat.go:519 +0x35a fp=0xc2080f4fb0 sp=0xc2080f4f08
math/big.nat.expNNWindowed(0xc2080a5b00, 0x20, 0x24, 0xc2080632c0, 0x10, 0x14, 0xc208062e60, 0x10, 0x14, 0xc2080a0160, ...)
    /usr/local/go/src/math/big/nat.go:1361 +0xdd7 fp=0xc2080f5240 sp=0xc2080f4fb0
math/big.nat.expNN(0xc2080a4a20, 0x10, 0x24, 0xc2080632c0, 0x10, 0x14, 0xc208062e60, 0x10, 0x14, 0xc2080a0160, ...)
    /usr/local/go/src/math/big/nat.go:1260 +0x4b0 fp=0xc2080f53d8 sp=0xc2080f5240
math/big.nat.probablyPrime(0xc2080a0160, 0x10, 0x15, 0x14, 0x1)
    /usr/local/go/src/math/big/nat.go:1445 +0x887 fp=0xc2080f5550 sp=0xc2080f53d8
math/big.(*Int).ProbablyPrime(0xc2080a2240, 0x14, 0xc207ff6101)
    /usr/local/go/src/math/big/int.go:741 +0x4a fp=0xc2080f5580 sp=0xc2080f5550
crypto/rsa.(*PrivateKey).Validate(0xc208060120, 0x0, 0x0)
    /usr/local/go/src/crypto/rsa/rsa.go:110 +0x108 fp=0xc2080f5680 sp=0xc2080f5580
crypto/x509.ParsePKCS1PrivateKey(0xc20806e500, 0x4a8, 0x4aa, 0xc208060120, 0x0, 0x0)
    /usr/local/go/src/crypto/x509/pkcs1.go:77 +0x702 fp=0xc2080f5808 sp=0xc2080f5680
crypto/tls.parsePrivateKey(0xc20806e500, 0x4a8, 0x4aa, 0x0, 0x0, 0x0, 0x0)
    /usr/local/go/src/crypto/tls/tls.go:259 +0x7d fp=0xc2080f58f8 sp=0xc2080f5808
crypto/tls.X509KeyPair(0xc2080431aa, 0x0, 0x200, 0xc20801388f, 0x0, 0x200, 0xc2080a21c0, 0x1, 0x1, 0x0, ...)
    /usr/local/go/src/crypto/tls/tls.go:213 +0x394 fp=0xc2080f5af0 sp=0xc2080f58f8
crypto/tls.LoadX509KeyPair(0xc20809c680, 0x38, 0xc20809c740, 0x37, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /usr/local/go/src/crypto/tls/tls.go:179 +0x16c fp=0xc2080f5bf8 sp=0xc2080f5af0
main.main()
    /go/src/github.com/docker/docker/docker/docker.go:134 +0x1222 fp=0xc2080f5f98 sp=0xc2080f5bf8
runtime.main()
    /usr/local/go/src/runtime/proc.go:63 +0xf3 fp=0xc2080f5fe0 sp=0xc2080f5f98
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc2080f5fe8 sp=0xc2080f5fe0

goroutine 5 [syscall]:
os/signal.loop()
    /usr/local/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
    /usr/local/go/src/os/signal/signal_unix.go:27 +0x35

Comments

I've seen this panic numerous times on this computer, but it doesn't repro consistently, just kind of randomly.

@xing00lian

This comment has been minimized.

Copy link

commented Oct 18, 2016

I also encountered this problem when I first compile.
git branch:
release-branch.go1.4 f8c06b1 cmd/ld, cmd/5l, cmd/8l: support new 386/amd64 relocations
Building:

Building compilers and Go bootstrap tool for host, darwin/amd64.

lib9
libbio
liblink
cmd/cc
cmd/gc
cmd/6l
cmd/6a
cmd/6c
/Users/didi/go1.4/src/cmd/6c/txt.c:995:28: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
/Users/didi/go1.4/src/cmd/6c/txt.c:1045:28: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
cmd/6g
runtime
errors
sync/atomic
sync
io
unicode
unicode/utf8
unicode/utf16
bytes
math
strings
strconv
bufio
sort
container/heap
encoding/base64
syscall
time
os
reflect
fmt
encoding
encoding/json
flag
path/filepath
path
io/ioutil
log
regexp/syntax
regexp
go/token
go/scanner
go/ast
go/parser
os/exec
os/signal
net/url
text/template/parse
text/template
go/doc
go/build
cmd/go
failed MSpanList_Insert 0x4611e0 0x2b54b7658b6f 0x0
fatal error: MSpanList_Insert

runtime stack:
runtime.MSpanList_Insert(0x40afd0, 0x4611e0)
/Users/didi/go1.4/src/runtime/mheap.c:692 +0x8f
runtime.MHeap_Alloc(0x40af60, 0x1, 0x1000000002b, 0x77549)
/Users/didi/go1.4/src/runtime/mheap.c:240 +0x66
runtime.MCentral_CacheSpan(0x4148f8, 0x24f0c0)
/Users/didi/go1.4/src/runtime/mcentral.c:85 +0x167
runtime.MCache_Refill(0x45c000, 0xc20000002b, 0x4605b0)
/Users/didi/go1.4/src/runtime/mcache.c:90 +0xa0

goroutine 1 [running]:
runtime.switchtoM()
/Users/didi/go1.4/src/runtime/asm_amd64.s:198 fp=0xc2080b04d0 sp=0xc2080b04c8
runtime.mallocgc(0x1000, 0x1fc280, 0x40000c200000001, 0x461450)
/Users/didi/go1.4/src/runtime/malloc.go:178 +0x849 fp=0xc2080b0580 sp=0xc2080b04d0
runtime.newarray(0x1fc280, 0x1000, 0x45c000)
/Users/didi/go1.4/src/runtime/malloc.go:365 +0xc1 fp=0xc2080b05b8 sp=0xc2080b0580
runtime.makeslice(0x1f2760, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/Users/didi/go1.4/src/runtime/slice.go:32 +0x15c fp=0xc2080b0600 sp=0xc2080b05b8
os.(_File).readdirnames(0xc208034370, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/didi/go1.4/src/os/dir_unix.go:23 +0xd9 fp=0xc2080b06f0 sp=0xc2080b0600
os.(_File).Readdirnames(0xc208034370, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/didi/go1.4/src/os/doc.go:134 +0x9e fp=0xc2080b0730 sp=0xc2080b06f0
os.(_File).readdir(0xc208034370, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/didi/go1.4/src/os/file_unix.go:159 +0xc5 fp=0xc2080b0828 sp=0xc2080b0730
os.(_File).Readdir(0xc208034370, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/didi/go1.4/src/os/doc.go:115 +0x9e fp=0xc2080b0868 sp=0xc2080b0828
io/ioutil.ReadDir(0xc20803c840, 0x21, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/didi/go1.4/src/io/ioutil/ioutil.go:105 +0xe9 fp=0xc2080b08f0 sp=0xc2080b0868
go/build.(_Context).readDir(0x3fd340, 0xc20803c840, 0x21, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/didi/go1.4/src/go/build/build.go:175 +0xba fp=0xc2080b0930 sp=0xc2080b08f0
go/build.(_Context).Import(0x3fd340, 0x2a6870, 0x1, 0xc20803c5d0, 0x21, 0x0, 0x3fd760, 0x0, 0x0)
/Users/didi/go1.4/src/go/build/build.go:604 +0xe6d fp=0xc2080b1220 sp=0xc2080b0930
go/build.(*Context).ImportDir(0x3fd340, 0xc20803c5d0, 0x21, 0x0, 0x32e3e0, 0x0, 0x0)
/Users/didi/go1.4/src/go/build/build.go:406 +0x6e fp=0xc2080b1270 sp=0xc2080b1220
main.func·025(0xc20803c5d0, 0x21, 0x46dc00, 0xc2080370e0, 0x0, 0x0, 0x0, 0x0)
/Users/didi/go1.4/src/cmd/go/main.go:569 +0x590 fp=0xc2080b13a0 sp=0xc2080b1270
path/filepath.walk(0xc20803c5d0, 0x21, 0x46dc00, 0xc2080370e0, 0xc2080b18f0, 0x0, 0x0)
/Users/didi/go1.4/src/path/filepath/path.go:347 +0x91 fp=0xc2080b14d8 sp=0xc2080b13a0
path/filepath.walk(0xc208099a60, 0x1b, 0x46dc00, 0xc208036eb0, 0xc2080b18f0, 0x0, 0x0)
/Users/didi/go1.4/src/path/filepath/path.go:372 +0x51d fp=0xc2080b1610 sp=0xc2080b14d8
path/filepath.walk(0xc20801fbc0, 0x16, 0x46dc00, 0xc2081105a0, 0xc2080b18f0, 0x0, 0x0)
/Users/didi/go1.4/src/path/filepath/path.go:372 +0x51d fp=0xc2080b1748 sp=0xc2080b1610
path/filepath.Walk(0xc20801fbc0, 0x16, 0xc2080b18f0, 0x0, 0x0)
/Users/didi/go1.4/src/path/filepath/path.go:394 +0xf2 fp=0xc2080b17b0 sp=0xc2080b1748
main.matchPackages(0x7fff5fbffb3e, 0x3, 0x0, 0x0, 0x0)
/Users/didi/go1.4/src/cmd/go/main.go:577 +0x51e fp=0xc2080b1930 sp=0xc2080b17b0
main.allPackages(0x7fff5fbffb3e, 0x3, 0x0, 0x0, 0x0)
/Users/didi/go1.4/src/cmd/go/main.go:481 +0x64 fp=0xc2080b1a00 sp=0xc2080b1930
main.importPathsNoDotExpansion(0xc20800a030, 0x1, 0x1, 0x0, 0x0, 0x0)
/Users/didi/go1.4/src/cmd/go/main.go:312 +0x302 fp=0xc2080b1b08 sp=0xc2080b1a00
main.importPaths(0xc20800a030, 0x1, 0x1, 0x0, 0x0, 0x0)
/Users/didi/go1.4/src/cmd/go/main.go:322 +0x71 fp=0xc2080b1c00 sp=0xc2080b1b08
main.packagesAndErrors(0xc20800a030, 0x1, 0x1, 0x0, 0x0, 0x0)
/Users/didi/go1.4/src/cmd/go/pkg.go:899 +0x1fd fp=0xc2080b1d18 sp=0xc2080b1c00
main.runClean(0x3f9ae0, 0xc20800a030, 0x1, 0x1)
/Users/didi/go1.4/src/cmd/go/clean.go:78 +0x45 fp=0xc2080b1d98 sp=0xc2080b1d18
main.main()
/Users/didi/go1.4/src/cmd/go/main.go:163 +0x608 fp=0xc2080b1f98 sp=0xc2080b1d98
runtime.main()
/Users/didi/go1.4/src/runtime/proc.go:63 +0xf3 fp=0xc2080b1fe0 sp=0xc2080b1f98
runtime.goexit()
/Users/didi/go1.4/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc2080b1fe8 sp=0xc2080b1fe0

goroutine 5 [syscall]:
os/signal.loop()
/Users/didi/go1.4/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
/Users/didi/go1.4/src/os/signal/signal_unix.go:27 +0x35

@mikioh mikioh added the OS-Darwin label Oct 18, 2016

@mikioh

This comment has been minimized.

Copy link
Contributor

commented Oct 18, 2016

@willfaught,

Which version of OS X / macOS are you running? See https://github.com/golang/go/wiki/Darwin. If you are running macOS 10.12 Sierra, you need to use the latest version of Docker including Go 1.7.1 runtime.

@bradfitz

This comment has been minimized.

Copy link
Member

commented Oct 18, 2016

@xing00lian, your issue is #16352. The Go 1.4 branch doesn't compile on Sierra at the moment.

@willfaught

This comment has been minimized.

Copy link
Contributor Author

commented Oct 18, 2016

@bradfitz 10.12 Sierra

Unfortunately, I have to use an old Docker build for my dev env.

How does Docker affect the Go runtime?

@bradfitz

This comment has been minimized.

Copy link
Member

commented Oct 18, 2016

macOS Sierra changed how you fetch the time from the system. Programs built with Go need to be recompiled to Go 1.7+ to work on Sierra. That includes Docker, since Docker is written in Go.

@willfaught

This comment has been minimized.

Copy link
Contributor Author

commented Oct 18, 2016

Wow, I can't believe they made such a big breaking change!

Thanks.

@bradfitz bradfitz closed this Oct 18, 2016

@bradfitz

This comment has been minimized.

Copy link
Member

commented Oct 18, 2016

See #17490

carolynvs added a commit to carolynvs/carina that referenced this issue Dec 23, 2016

Build against go 1.7
Mac OS Sierra has backwards-incompatible changes that require using a
newer version of go with Sierra suppport. See
golang/go#17492 (comment)

trautmane added a commit to saalfeldlab/render that referenced this issue Jun 13, 2017

Upgrade test flapdoodle embedded mongodb library to version 2.0.0 and…
… referenced mongo version to V3_4 to fix intermittent problem running tests on OS X Sierra. From flapdoodle-oss/de.flapdoodle.embed.mongo#190 : ... under current macOs Sierra mongodb 3.2 does not function that well - mongotools (like mongorestore) are built with go 1.4.2 and macOs Sierra had some breaking changes (see golang/go#17492 )

@golang golang locked and limited conversation to collaborators Oct 18, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.