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

x/tools/cmd/goimports: "fatal error: MSpanList_Insert" #25217

matthieu526 opened this issue May 2, 2018 · 3 comments

x/tools/cmd/goimports: "fatal error: MSpanList_Insert" #25217

matthieu526 opened this issue May 2, 2018 · 3 comments


Copy link

@matthieu526 matthieu526 commented May 2, 2018

Hello guys !

Last week I updated to macOS High Sierra 10.13.4 (with already installed 1.10.1 darwin/amd64 go version). Since then, my prepush script doesn't work anymore. This one launches a goimports -w, but now fails every time with this error :

fatal error: MSpanList_Insert

runtime stack:
runtime.throw(0x255a80, 0x10)
	/usr/local/go/src/runtime/panic.go:530 +0x90 fp=0x7ffeefbff320 sp=0x7ffeefbff308
runtime.(*mSpanList).insert(0x3ba328, 0x411000)
	/usr/local/go/src/runtime/mheap.go:933 +0x293 fp=0x7ffeefbff350 sp=0x7ffeefbff320
runtime.(*mheap).freeSpanLocked(0x3b9b20, 0x411000, 0x100, 0x0)
	/usr/local/go/src/runtime/mheap.go:809 +0x4be fp=0x7ffeefbff3b8 sp=0x7ffeefbff350
runtime.(*mheap).grow(0x3b9b20, 0x8, 0x0)
	/usr/local/go/src/runtime/mheap.go:675 +0x2a0 fp=0x7ffeefbff410 sp=0x7ffeefbff3b8
runtime.(*mheap).allocSpanLocked(0x3b9b20, 0x1, 0x0)
	/usr/local/go/src/runtime/mheap.go:553 +0x4e3 fp=0x7ffeefbff468 sp=0x7ffeefbff410
runtime.(*mheap).alloc_m(0x3b9b20, 0x1, 0x15, 0x0)
	/usr/local/go/src/runtime/mheap.go:437 +0x119 fp=0x7ffeefbff498 sp=0x7ffeefbff468
	/usr/local/go/src/runtime/mheap.go:502 +0x41 fp=0x7ffeefbff4c8 sp=0x7ffeefbff498
	/usr/local/go/src/runtime/asm_amd64.s:307 +0xab fp=0x7ffeefbff4d0 sp=0x7ffeefbff4c8
runtime.(*mheap).alloc(0x3b9b20, 0x1, 0x10000000015, 0x1003f)
	/usr/local/go/src/runtime/mheap.go:503 +0x63 fp=0x7ffeefbff518 sp=0x7ffeefbff4d0
runtime.(*mcentral).grow(0x3bb720, 0x0)
	/usr/local/go/src/runtime/mcentral.go:209 +0x93 fp=0x7ffeefbff580 sp=0x7ffeefbff518
runtime.(*mcentral).cacheSpan(0x3bb720, 0x3b65f8)
	/usr/local/go/src/runtime/mcentral.go:89 +0x47d fp=0x7ffeefbff5c0 sp=0x7ffeefbff580
runtime.(*mcache).refill(0x40d000, 0x15, 0x7ffeefbff628)
	/usr/local/go/src/runtime/mcache.go:119 +0xcc fp=0x7ffeefbff5f8 sp=0x7ffeefbff5c0
	/usr/local/go/src/runtime/malloc.go:642 +0x2b fp=0x7ffeefbff618 sp=0x7ffeefbff5f8
	/usr/local/go/src/runtime/asm_amd64.s:307 +0xab fp=0x7ffeefbff620 sp=0x7ffeefbff618
runtime.mallocgc(0x180, 0x21f340, 0x0, 0x800000000)
	/usr/local/go/src/runtime/malloc.go:643 +0x869 fp=0x7ffeefbff6f8 sp=0x7ffeefbff620
runtime.newobject(0x21f340, 0x3b69f0)
	/usr/local/go/src/runtime/malloc.go:781 +0x42 fp=0x7ffeefbff720 sp=0x7ffeefbff6f8
runtime.malg(0x8000, 0x3b6c60)
	/usr/local/go/src/runtime/proc.go:2634 +0x27 fp=0x7ffeefbff758 sp=0x7ffeefbff720
	/usr/local/go/src/runtime/os1_darwin.go:140 +0x1f fp=0x7ffeefbff770 sp=0x7ffeefbff758
	/usr/local/go/src/runtime/proc.go:494 +0x105 fp=0x7ffeefbff7b8 sp=0x7ffeefbff770
	/usr/local/go/src/runtime/proc.go:434 +0x79 fp=0x7ffeefbff800 sp=0x7ffeefbff7b8
runtime.rt0_go(0x7ffeefbff838, 0x3, 0x7ffeefbff838, 0x0, 0x0, 0x3, 0x7ffeefbff9f0, 0x7ffeefbff9fa, 0x7ffeefbff9fd, 0x0, ...)
	/usr/local/go/src/runtime/asm_amd64.s:138 +0x132 fp=0x7ffeefbff808 sp=0x7ffeefbff800

I googled it, but couldn't seem to find a suitable solution (for the record go wasn't installed with brew). If someone has an idea it could be nice 😄


@agnivade agnivade changed the title goimports commands produce a "fatal error: MSpanList_Insert" x/tools/cmd/goimports: "fatal error: MSpanList_Insert" May 2, 2018
@gopherbot gopherbot added this to the Unreleased milestone May 2, 2018
Copy link

@agnivade agnivade commented May 2, 2018

Do you have a sample file against which, if goimports is run, causes this error deterministiclly ?

Copy link

@josharian josharian commented May 2, 2018

IIRC @bcmills fixed a race in goimports recently. Would you try re-installing goimports from an updated source? Thanks.

Copy link

@matthieu526 matthieu526 commented May 2, 2018

I updated goimports and now it works ! Thanks a lot.

@matthieu526 matthieu526 closed this May 2, 2018
@golang golang locked and limited conversation to collaborators May 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.