Concurrent map write in idxfile.MemoryIndex
Author: MichaelMureCreated Nov 14, 2020Updated Sep 30, 2026
Labelsbugno-autoclose
Concurrent write is happening here: https://github.com/go-git/go-git/blob/master/plumbing/format/idxfile/idxfile.go#L133
fatal error: concurrent map writes
goroutine 46 [running]:
runtime.throw(0xebb46a, 0x15)
/usr/local/go/src/runtime/panic.go:1116 +0x72 fp=0xc000362fb8 sp=0xc000362f88 pc=0x437a92
runtime.mapassign_fast64(0xd64be0, 0xc0002ddaa0, 0x1420c4, 0x1420c4)
/usr/local/go/src/runtime/map_fast64.go:176 +0x325 fp=0xc000362ff8 sp=0xc000362fb8 pc=0x4146e5
github.com/go-git/go-git/v5/plumbing/format/idxfile.(*MemoryIndex).FindOffset(0xc000444000, 0x185f83a71e9ca3c7, 0xebea5274d7fe25b5, 0x64ea983a, 0xe74860, 0xc00008ad20, 0x18)
/home/pdp/go/pkg/mod/github.com/go-git/go-git/[email protected]/plumbing/format/idxfile/idxfile.go:133 +0xec fp=0xc000363048 sp=0xc000362ff8 pc=0x8eeacc
github.com/go-git/go-git/v5/storage/filesystem.(*ObjectStorage).findObjectInPackfile(0xc000299cd8, 0x185f83a71e9ca3c7, 0xebea5274d7fe25b5, 0x64ea983a64ea983a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f19f8582b10)
/home/pdp/go/pkg/mod/github.com/go-git/go-git/[email protected]/storage/filesystem/object.go:513 +0x114 fp=0xc000363108 sp=0xc000363048 pc=0x919f34
github.com/go-git/go-git/v5/storage/filesystem.(*ObjectStorage).getFromPackfile(0xc000299cd8, 0x185f83a71e9ca3c7, 0xebea5274d7fe25b5, 0x64ea983a, 0x0, 0x0, 0x0, 0x0)
/home/pdp/go/pkg/mod/github.com/go-git/go-git/[email protected]/storage/filesystem/object.go:429 +0xa9 fp=0xc0003631f8 sp=0xc000363108 pc=0x9194e9
github.com/go-git/go-git/v5/storage/filesystem.(*ObjectStorage).EncodedObject(0xc000299cd8, 0x5f83a71e9ca3c703, 0xea5274d7fe25b518, 0x64ea983aeb, 0x0, 0x0, 0x0, 0x0)
/home/pdp/go/pkg/mod/github.com/go-git/go-git/[email protected]/storage/filesystem/object.go:317 +0x6e fp=0xc000363298 sp=0xc0003631f8 pc=0x91880e
github.com/go-git/go-git/v5/plumbing/object.GetBlob(0x1006900, 0xc000299cc0, 0x185f83a71e9ca3c7, 0xebea5274d7fe25b5, 0xc064ea983a, 0xc00003a508, 0x7, 0xc00003a508)
/home/pdp/go/pkg/mod/github.com/go-git/go-git/[email protected]/plumbing/object/blob.go:23 +0x4e fp=0xc0003632e8 sp=0xc000363298 pc=0x8b45ee
github.com/go-git/go-git/v5.(*Repository).BlobObject(...)
/home/pdp/go/pkg/mod/github.com/go-git/go-git/[email protected]/repository.go:1350
...Source: go-git/go-git