Skip to content

panic on git pull #52

@leonklingele

Description

@leonklingele
# Installed via Homebrew
$ dgit version
dgit version v0.0.11-alpha

$ git init
Initialized empty Git repository in /tmp/.git/

$ dgit init
What is your full repo name? demo/demo█

dgit would like to add the 'dgit' remote to this repo so that you can fetch directly from dgit.

Is that ok? y█

Success, dgit is now accessible under the 'dgit' remote.
[..]

$ git remote -v
dgit	dgit://demo/demo (fetch)
dgit	dgit://demo/demo (push)

$ git pull dgit
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x49033c8]

goroutine 1 [running]:
github.com/quorumcontrol/dgit/storage/siaskynet.(*ObjectStorage).EncodedObject(0xc0008a67c0, 0x8cc43ca31694a381, 0xbd6ff0d74a50780f, 0x3fafe2a349, 0x4816b48, 0x30, 0x30, 0xc0008e1470)
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/storage/siaskynet/object.go:313 +0x678
github.com/go-git/go-git/v5/plumbing/revlist.processObject(0x2d70d870, 0xc0007a48c0, 0xf8cc43ca31694a3, 0x49bd6ff0d74a5078, 0xc03fafe2a3, 0xc0008e1470, 0xc0005c32d8, 0x0, 0x0, 0x0, ...)
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/go/pkg/mod/github.com/go-git/go-git/v5@v5.0.1-0.20200319142726-f6305131a06b/plumbing/revlist/revlist.go:88 +0xc0
github.com/go-git/go-git/v5/plumbing/revlist.objects(0x2d70d870, 0xc0007a48c0, 0xc0007ac000, 0x1, 0x1, 0x0, 0x0, 0x0, 0xc0004cf300, 0x0, ...)
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/go/pkg/mod/github.com/go-git/go-git/v5@v5.0.1-0.20200319142726-f6305131a06b/plumbing/revlist/revlist.go:63 +0x264
github.com/go-git/go-git/v5/plumbing/revlist.ObjectsWithStorageForIgnores(0x2d70d870, 0xc0007a48c0, 0x2d70d870, 0xc0007a48c0, 0xc0007ac000, 0x1, 0x1, 0x0, 0x0, 0x0, ...)
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/go/pkg/mod/github.com/go-git/go-git/v5@v5.0.1-0.20200319142726-f6305131a06b/plumbing/revlist/revlist.go:42 +0x124
github.com/go-git/go-git/v5/plumbing/revlist.Objects(...)
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/go/pkg/mod/github.com/go-git/go-git/v5@v5.0.1-0.20200319142726-f6305131a06b/plumbing/revlist/revlist.go:24
github.com/go-git/go-git/v5/plumbing/transport/server.(*upSession).objectsToUpload(0xc0008a67e0, 0xc00015fec0, 0x0, 0x0, 0x0, 0x0, 0x4a84600)
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/go/pkg/mod/github.com/go-git/go-git/v5@v5.0.1-0.20200319142726-f6305131a06b/plumbing/transport/server/server.go:184 +0x1aa
github.com/go-git/go-git/v5/plumbing/transport/server.(*upSession).UploadPack(0xc0008a67e0, 0x4e8e9c0, 0xc0002e7f00, 0xc00015fec0, 0x0, 0x0, 0x0)
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/go/pkg/mod/github.com/go-git/go-git/v5@v5.0.1-0.20200319142726-f6305131a06b/plumbing/transport/server/server.go:160 +0x128
github.com/go-git/go-git/v5.(*Remote).fetchPack(0xc0005c3930, 0x4e8e9c0, 0xc0002e7f00, 0xc0005c3b38, 0x4e87940, 0xc0008a67e0, 0xc00015fec0, 0x0, 0x0)
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/go/pkg/mod/github.com/go-git/go-git/v5@v5.0.1-0.20200319142726-f6305131a06b/remote.go:380 +0x7f
github.com/go-git/go-git/v5.(*Remote).fetch(0xc0005c3930, 0x4e8e9c0, 0xc0002e7f00, 0xc0005c3b38, 0x0, 0x0, 0x0, 0x0)
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/go/pkg/mod/github.com/go-git/go-git/v5@v5.0.1-0.20200319142726-f6305131a06b/remote.go:328 +0x6ac
github.com/go-git/go-git/v5.(*Remote).FetchContext(...)
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/go/pkg/mod/github.com/go-git/go-git/v5@v5.0.1-0.20200319142726-f6305131a06b/remote.go:263
github.com/quorumcontrol/dgit/remotehelper.(*Runner).Run(0xc0005c3cb0, 0x4e8e9c0, 0xc0002e7f00, 0x7fff5fbff7e3, 0x4, 0x7fff5fbff7e8, 0x10, 0x0, 0x0)
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/remotehelper/runner.go:236 +0x19e7
github.com/quorumcontrol/dgit/cmd.glob..func2(0x56b9d60, 0xc00031eaa0, 0x2, 0x2)
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/cmd/remotehelper.go:68 +0x8ba
github.com/spf13/cobra.(*Command).execute(0x56b9d60, 0xc00031ea60, 0x2, 0x2, 0x56b9d60, 0xc00031ea60)
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830 +0x29d
github.com/spf13/cobra.(*Command).ExecuteC(0x56b9fe0, 0x40439ea, 0x55a5dc0, 0xc000000180)
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/quorumcontrol/dgit/cmd.Execute()
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/cmd/root.go:25 +0x36
main.main()
	/tmp/dgit-20200328-88368-1hlrr3v/quorumcontrol-dgit-512ba95/main.go:11 +0x45

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions