Skip to content

panic: runtime error: invalid memory address or nil pointer dereference #199

@tomascasir

Description

@tomascasir

Hi,
I'm trying to clone different repos through git2consul and only with one specific repo we are getting the following stack trace error:

INFO[0000] Starting git2consul version: v0.1.1
INFO[0000] Setting configuration with sane defaults caller=config
INFO[0006] Cloned repository KV Storage Global caller=repository
INFO[0010] Cloned repository KV Storage Common caller=repository
INFO[0014] Cloned repository KV Storage Prod-Common caller=repository
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x79e237]

goroutine 489 [running]:
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).recallByHashNonSeekable(0xc00017c120, 0xfd163608dfffbf7, 0xbc8e4db56bed57ec, 0xa7a6fa9c, 0x0, 0x0, 0xc000169e70, 0xc00007f4c0)
	/home/travis/gopath/pkg/mod/gopkg.in/src-d/go-git.v4@v4.4.0/plumbing/format/packfile/decoder.go:465 +0x127
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).recallByHash(0xc00017c120, 0xfd163608dfffbf7, 0xbc8e4db56bed57ec, 0xa7a6fa9c, 0x0, 0x0, 0x0, 0x0)
	/home/travis/gopath/pkg/mod/gopkg.in/src-d/go-git.v4@v4.4.0/plumbing/format/packfile/decoder.go:456 +0x4d
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).fillREFDeltaObjectContent(0xc00017c120, 0x9d1280, 0xc0000e0080, 0xfd163608dfffbf7, 0xbc8e4db56bed57ec, 0xa7a6fa9c, 0x0, 0xc000169da0, 0x7a523f)
	/home/travis/gopath/pkg/mod/gopkg.in/src-d/go-git.v4@v4.4.0/plumbing/format/packfile/decoder.go:378 +0x274
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).decodeByHeader(0xc00017c120, 0xc00030c080, 0x0, 0x0, 0x0, 0x0)
	/home/travis/gopath/pkg/mod/gopkg.in/src-d/go-git.v4@v4.4.0/plumbing/format/packfile/decoder.go:306 +0x127
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).doDecodeObject(0xc00017c120, 0xc00037de81, 0x9d1280, 0xc0000e0040, 0x0, 0x0)
	/home/travis/gopath/pkg/mod/gopkg.in/src-d/go-git.v4@v4.4.0/plumbing/format/packfile/decoder.go:233 +0x5d
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObject(...)
	/home/travis/gopath/pkg/mod/gopkg.in/src-d/go-git.v4@v4.4.0/plumbing/format/packfile/decoder.go:223
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).decodeObjects(0xc00017c120, 0xf46, 0x0, 0x0)
	/home/travis/gopath/pkg/mod/gopkg.in/src-d/go-git.v4@v4.4.0/plumbing/format/packfile/decoder.go:170 +0x4f
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).doDecode(0xc00017c120, 0x0, 0x0)
	/home/travis/gopath/pkg/mod/gopkg.in/src-d/go-git.v4@v4.4.0/plumbing/format/packfile/decoder.go:160 +0x189
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).Decode(0xc00017c120, 0x0, 0x0, 0xc000000000, 0x0, 0x0)
	/home/travis/gopath/pkg/mod/gopkg.in/src-d/go-git.v4@v4.4.0/plumbing/format/packfile/decoder.go:139 +0xa0
gopkg.in/src-d/go-git.v4/storage/filesystem/internal/dotgit.(*PackWriter).buildIndex(0xc000368000)
	/home/travis/gopath/pkg/mod/gopkg.in/src-d/go-git.v4@v4.4.0/storage/filesystem/internal/dotgit/writers.go:64 +0x95
created by gopkg.in/src-d/go-git.v4/storage/filesystem/internal/dotgit.newPackWrite
	/home/travis/gopath/pkg/mod/gopkg.in/src-d/go-git.v4@v4.4.0/storage/filesystem/internal/dotgit/writers.go:52 +0x324

I noticed after the following log: INFO[0014] Cloned repository KV Storage Prod-Common caller=repository is throwing the error with the repo that we expect to clone.

Can you give us some orientation to tackle this issue? Anybody faces with this error as well?

Thank you in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions