microplane icon indicating copy to clipboard operation
microplane copied to clipboard

SIGSEV when sync status of multiple repos

Open Moser-ss opened this issue 4 years ago • 1 comments

When I am syncing more than 60 repositories I am getting this error message

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1375f36]

goroutine 31 [running]:
github.com/Clever/microplane/sync.GithubSyncPush(0x14d88f0, 0xc0000ba008, 0xc0000b8360, 0x12, 0xc0000bbf00, 0x9, 0x0, 0x0, 0xc0000bbf0a, 0x6, ...)
	github.com/Clever/microplane/sync/syncGithub.go:40 +0x316
github.com/Clever/microplane/cmd.syncPush(0xc0000b8360, 0x12, 0xc0000bbf00, 0x9, 0x0, 0x0, 0xc0000bbf0a, 0x6, 0x0, 0x0, ...)
	github.com/Clever/microplane/cmd/sync.go:87 +0x385
github.com/Clever/microplane/cmd.syncOneRepo(0xc0000b8360, 0x12, 0xc0000bbf00, 0x9, 0x0, 0x0, 0xc0000bbf0a, 0x6, 0x0, 0x0, ...)
	github.com/Clever/microplane/cmd/sync.go:58 +0x278
github.com/Clever/microplane/cmd.parallelizeLimited.func1(0xc0000965f0, 0x14d88f0, 0xc0000ba008, 0xc0000a5f80, 0x1476c08, 0xc0000b8360, 0x12, 0xc0000bbf00, 0x9, 0x0, ...)
	github.com/Clever/microplane/cmd/helpers.go:48 +0x111
created by github.com/Clever/microplane/cmd.parallelizeLimited
	github.com/Clever/microplane/cmd/helpers.go:43 +0x198 

Moser-ss avatar Oct 08 '21 11:10 Moser-ss

After some debugging, I saw the root of the problem. One of my PRs has the property merge_commit_sha as null. Also, I found this article mention that the property is deprecated. And this property is used in several place So I think we need to rethink how to use that property

Moser-ss avatar Oct 11 '21 09:10 Moser-ss