bash-git-prompt
bash-git-prompt copied to clipboard
Go 1.4 errors on Mac OSX since upgrading to Sierra
My installation used to work fine, until I upgraded my Mac to Sierra. Now I get errors like the following when I'm in a directory that is a git repo:
$ git status
failed MSpanList_Insert 0x761000 0x38b6295a691 0x0
fatal error: MSpanList_Insert
runtime stack:
runtime.throw(0x67580b)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/panic.go:491 +0xad fp=0x7fff5fbff0f0 sp=0x7fff5fbff0c0
runtime.MSpanList_Insert(0x69f208, 0x761000)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/mheap.c:692 +0x8f fp=0x7fff5fbff118 sp=0x7fff5fbff0f0
MHeap_FreeSpanLocked(0x69be00, 0x761000, 0x100)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/mheap.c:583 +0x163 fp=0x7fff5fbff158 sp=0x7fff5fbff118
MHeap_Grow(0x69be00, 0x8, 0x0)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/mheap.c:420 +0x1a8 fp=0x7fff5fbff198 sp=0x7fff5fbff158
MHeap_AllocSpanLocked(0x69be00, 0x1, 0x0)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/mheap.c:298 +0x365 fp=0x7fff5fbff1d8 sp=0x7fff5fbff198
mheap_alloc(0x69be00, 0x1, 0x12, 0x0)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/mheap.c:190 +0x121 fp=0x7fff5fbff200 sp=0x7fff5fbff1d8
runtime.MHeap_Alloc(0x69be00, 0x1, 0x10000000012, 0xcf29)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/mheap.c:240 +0x66 fp=0x7fff5fbff238 sp=0x7fff5fbff200
MCentral_Grow(0x6a3b78, 0x0)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/mcentral.c:197 +0x8b fp=0x7fff5fbff2a0 sp=0x7fff5fbff238
runtime.MCentral_CacheSpan(0x6a3b78, 0x0)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/mcentral.c:85 +0x167 fp=0x7fff5fbff2d8 sp=0x7fff5fbff2a0
runtime.MCache_Refill(0x75d000, 0x12, 0x0)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/mcache.c:90 +0xa0 fp=0x7fff5fbff300 sp=0x7fff5fbff2d8
runtime.mcacheRefill_m()
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/malloc.c:368 +0x57 fp=0x7fff5fbff320 sp=0x7fff5fbff300
runtime.onM(0x5327a8)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/asm_amd64.s:273 +0x9a fp=0x7fff5fbff328 sp=0x7fff5fbff320
runtime.mallocgc(0x120, 0x444dc0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/malloc.go:178 +0x849 fp=0x7fff5fbff3d8 sp=0x7fff5fbff328
runtime.newobject(0x444dc0, 0x75d000)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/malloc.go:353 +0x49 fp=0x7fff5fbff400 sp=0x7fff5fbff3d8
runtime.newG(0x268ca)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/proc.go:233 +0x2a fp=0x7fff5fbff418 sp=0x7fff5fbff400
allocg(0x68bb00)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/proc.c:925 +0x1f fp=0x7fff5fbff428 sp=0x7fff5fbff418
runtime.malg(0x8000, 0x68bcc0)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/proc.c:2106 +0x1f fp=0x7fff5fbff458 sp=0x7fff5fbff428
runtime.mpreinit(0x68c2e0)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/os_darwin.c:137 +0x27 fp=0x7fff5fbff470 sp=0x7fff5fbff458
mcommoninit(0x68c2e0)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/proc.c:201 +0xc9 fp=0x7fff5fbff498 sp=0x7fff5fbff470
runtime.schedinit()
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/proc.c:138 +0x55 fp=0x7fff5fbff4c0 sp=0x7fff5fbff498
runtime.rt0_go(0x7fff5fbff4f8, 0x2, 0x7fff5fbff4f8, 0x0, 0x0, 0x2, 0x7fff5fbff6d8, 0x7fff5fbff6dc, 0x0, 0x7fff5fbff6e3, ...)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/asm_amd64.s:95 +0x116 fp=0x7fff5fbff4c8 sp=0x7fff5fbff4c0
These errors occur randomly and non-deterministically. But they do occur reliably, approximately every 5-10 commands. If I just type git status over and over the error will occur after a few goes.
It seems like bash-git-prompt is the cause because if I remove it from my .bash_profile then the errors go away.
From my reading around the internet, it looks like Go 1.4 has some known issue with Sierra. I have upgraded Go on my machine, as recommended, but it hasn't helped.
In fact, the path referenced in the error doesn't exist on my machine: /usr/local/Cellar/go/1.4.1
Further reading has suggested that perhaps the application is using a Go library from 1.4, and should be rebuilt using a newer version of Go (1.7 or higher, I think). I don't see any Go in the source, but the errors for sure go away when I remove git-bash-prompt. So I can only conclude it has something to do with git-bash-prompt in some way.
I'm looking for any suggestions or ideas what will relieve my pain. I've used git-bash-prompt for a while and have configured it to perfection. But I can't put up with these constant errors for much longer.
This git prompt is bash only. There is no dependency on Go. Maybe there is some other thing, that manipulates the prompt too but with go?
it seems to have more to do with git than with this prompt: https://github.com/golang/go/issues/17570 https://github.com/smartystreets/goconvey/issues/455
Thanks, @magicmonty. The weird part is that the errors don't occur if I turn off bash-git-prompt.
Perhaps bash-git-prompt is doing something with git under the covers that I don't normally do, such as using a different command or different options.
It's probably not bash-git-prompt per se, but some interplay between bash-git-prompt and git that's causing the problem. I'm just not sure how to get to the bottom of it.
Sure, this prompt relies on Git to get the Git information to display. So if Git is broken, so the prompt will break too.
i had this issue due to hub. do you have hub installed?
brew unlink hub; brew install hub fixed it for me
That seems to have fixed it, @er0ck. I'll see how it goes over the next couple of days, but so far it hasn't reproduced.
This has caused me months of pain, so thank you very much!!!
@er0ck this fixed an issue I thought I had fixed before. Thanks!