tools / godep

dependency tool for go
http://godoc.org/github.com/tools/godep
BSD 3-Clause "New" or "Revised" License
5.54k stars 454 forks source link

fatal error: MSpanList_Insert #541

Closed MikeSpreitzer closed 7 years ago

MikeSpreitzer commented 7 years ago

Expected behavior

godep save does something useful rather than print a fatal error message.

Actual behavior

mjs10:tpr-example mspreitz$ godep save
failed MSpanList_Insert 0x1005658 0xa5fc763ae71e 0x0
fatal error: MSpanList_Insert

runtime stack:
runtime.MSpanList_Insert(0x638d30, 0x1005658)
    /usr/local/go/src/runtime/mheap.c:692 +0x8f
runtime.MHeap_Alloc(0x638cc0, 0x1, 0x10000000023, 0x23479)
    /usr/local/go/src/runtime/mheap.c:240 +0x66
runtime.MCentral_CacheSpan(0x641d58, 0x1)
    /usr/local/go/src/runtime/mcentral.c:85 +0x167
runtime.MCache_Refill(0x1000000, 0xc200000023, 0xc208012000)
    /usr/local/go/src/runtime/mcache.c:90 +0xa0

goroutine 1 [running]:
runtime.switchtoM()
    /usr/local/go/src/runtime/asm_amd64.s:198 fp=0xc2080851a8 sp=0xc2080851a0
runtime.mallocgc(0x600, 0x30f2c0, 0xc200000001, 0x1)
    /usr/local/go/src/runtime/malloc.go:178 +0x849 fp=0xc208085258 sp=0xc2080851a8
runtime.newarray(0x30f2c0, 0x600, 0x67866)
    /usr/local/go/src/runtime/malloc.go:365 +0xc1 fp=0xc208085290 sp=0xc208085258
runtime.makeslice(0x301ae0, 0x200, 0x600, 0x0, 0x0, 0x0)
    /usr/local/go/src/runtime/slice.go:32 +0x15c fp=0xc2080852d8 sp=0xc208085290
encoding/json.(*Decoder).readValue(0xc20807c480, 0xc207fffe73, 0x0, 0x0)
    /usr/local/go/src/encoding/json/stream.go:117 +0x479 fp=0xc2080853d0 sp=0xc2080852d8
encoding/json.(*Decoder).Decode(0xc20807c480, 0x397940, 0xc2080018c0, 0x0, 0x0)
    /usr/local/go/src/encoding/json/stream.go:44 +0x7b fp=0xc208085470 sp=0xc2080853d0
main.LoadPackages(0xc2080c1500, 0x124, 0x150, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/mspreitz/go-tools/src/github.com/tools/godep/pkg.go:52 +0x439 fp=0xc2080855c8 sp=0xc208085470
main.(*Godeps).Load(0xc20802e640, 0xc20802c020, 0x1, 0x1, 0x0, 0x0)
    /Users/mspreitz/go-tools/src/github.com/tools/godep/dep.go:93 +0x837 fp=0xc2080859d8 sp=0xc2080855c8
main.save(0xc20802b2a0, 0x1, 0x1, 0x0, 0x0)
    /Users/mspreitz/go-tools/src/github.com/tools/godep/save.go:109 +0x3de fp=0xc208085da8 sp=0xc2080859d8
main.runSave(0x6255a0, 0xc20800a010, 0x0, 0x0)
    /Users/mspreitz/go-tools/src/github.com/tools/godep/save.go:75 +0x211 fp=0xc208085e30 sp=0xc208085da8
main.main()
    /Users/mspreitz/go-tools/src/github.com/tools/godep/main.go:84 +0x3f3 fp=0xc208085f98 sp=0xc208085e30
runtime.main()
    /usr/local/go/src/runtime/proc.go:63 +0xf3 fp=0xc208085fe0 sp=0xc208085f98
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc208085fe8 sp=0xc208085fe0

Steps to reproduce behavior

  1. Create a fresh go workspace
  2. go get github.com/MikeSpreitzer/tpr-example. Observe that it builds and works.
  3. go get github.com/tools/godep. Observe that it builds.
  4. Make that godep you just built the one that gets found on your $PATH.
  5. godep save.

godep version output

mjs10:tpr-example mspreitz$ godep version
godep: unknown command "version"
Run 'godep help' for usage.

go version output

mjs10:tpr-example mspreitz$ go version
go version go1.7.4 darwin/amd64

Contents of Godeps.json file

Sorry, there is no such file.

MikeSpreitzer commented 7 years ago

Perhaps because somehow the older godep in /usr/local/go was run.

MikeSpreitzer commented 7 years ago

Dup of https://github.com/golang/go/issues/18544 (because I was actually using an outdated godep).