原本使用的golang是1.9版本,今天想升到最新的1.11。遇到如下错误
failed MSpanList_Insert 0x905000 0x9b51f3c97b8 0x0 0x0
fatal error: MSpanList_Insert
runtime stack:
runtime.throw(0x5e5cf0, 0x10)
/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/panic.go:530 +0x90 fp=0x7fff5fbff0b0 sp=0x7fff5fbff098
runtime.(*mSpanList).insert(0x865d08, 0x905000)
/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mheap.go:933 +0x293 fp=0x7fff5fbff0e0 sp=0x7fff5fbff0b0
runtime.(*mheap).freeSpanLocked(0x865500, 0x905000, 0x100, 0x0)
/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mheap.go:809 +0x4be fp=0x7fff5fbff148 sp=0x7fff5fbff0e0
runtime.(*mheap).grow(0x865500, 0x8, 0x0)
网上没搜到好的解决办法,最后把 GOROOT_BOOTSTRAP 指向go1.9的安装目录解决。(默认的GOROOT_BOOTSTRAP是指向go1.4的)
cd ~/go/src
GOROOT_BOOTSTRAP='~/go1.9' ./all.bash