Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slice bounds out of range error #163

Closed
Gr33nbl00d opened this issue Jan 18, 2019 · 13 comments
Closed

slice bounds out of range error #163

Gr33nbl00d opened this issue Jan 18, 2019 · 13 comments

Comments

@Gr33nbl00d
Copy link

What i get after running
hercules --devs <repo> | python labours.py -m devs

2417 / 29722 1h58m45spanic: runtime error: slice bounds out of range

goroutine 4816 [running]:
gopkg.in/src-d/hercules.v6/internal/plumbing.(*RenameAnalysis).blobsAreClose(0xc000a49580, 0xc04aa1e370, 0xc00c8b60a0, 0xc00b80ee48, 0x9, 0xc0933c3f90)
c:/gopath/src/gopkg.in/src-d/hercules.v6/internal/plumbing/renames.go:411 +0xb30
gopkg.in/src-d/hercules.v6/internal/plumbing.(*RenameAnalysis).Consume.func1(0x0, 0x0)
c:/gopath/src/gopkg.in/src-d/hercules.v6/internal/plumbing/renames.go:232 +0x41b
gopkg.in/src-d/hercules.v6/internal/plumbing.(*RenameAnalysis).Consume.func3(0xc00b313950, 0xc00650cd30)
c:/gopath/src/gopkg.in/src-d/hercules.v6/internal/plumbing/renames.go:314 +0x2e
created by gopkg.in/src-d/hercules.v6/internal/plumbing.(*RenameAnalysis).Consume
c:/gopath/src/gopkg.in/src-d/hercules.v6/internal/plumbing/renames.go:314 +0x1a7b

No data has been read - has Hercules crashed?

@vmarkovtsev
Copy link
Collaborator

This is clearly a crash @Gr33nbl00d

Can you send me the repo you analyzed; if it is not possible, I will try to suggest fixes but I will need your assistance to test.

@Gr33nbl00d
Copy link
Author

Hi no problem it is quite problematic to send you this repo as it is really big 1.7M Lines of Code and also im not allowed as it is confidential. Its is reproducable and crashes always on the same step with the same error. No Problem i will try to help :)

@vmarkovtsev
Copy link
Collaborator

OK. If you are able to build Hercules, then I can send you a patch which prints the hashes of the two offending compared Git blobs, then you execute git show <hash> for each and send me the output (file contents) through email. Does it sound good?

@Gr33nbl00d
Copy link
Author

Yes sounds good, but i have to admit i never worked with GO yet ;) so i have to fiddle a bit arround to find out how to compile it :)

@vmarkovtsev
Copy link
Collaborator

@Gr33nbl00d Please use the binary from "debug" release, it contains the patch: https://github.com/src-d/hercules/releases/tag/debug

@Gr33nbl00d
Copy link
Author

thank you i will try

@Gr33nbl00d
Copy link
Author

ok the new output is:

hercules --devs . | python labours.py -m devs
2417 / 30036 2h13m9s2019/01/21 12:11:06
2019/01/21 12:11:06 ecc236816c8bddf3523d39ec0f7650591c829fb6
2019/01/21 12:11:06 7f06d8f55b010f2daf01d2b50747c2ba2ff11f8d
panic: runtime error: slice bounds out of range [recovered]
panic: runtime error: slice bounds out of range

goroutine 4846 [running]:
gopkg.in/src-d/hercules.v6/internal/plumbing.(*RenameAnalysis).blobsAreClose.func1(0xc004f24af0, 0xc005fa43c0)
c:/gopath/src/gopkg.in/src-d/hercules.v6/internal/plumbing/renames.go:367 +0x19d
panic(0xe8a9a0, 0xd64140)
C:/go/src/runtime/panic.go:513 +0x1c7
gopkg.in/src-d/hercules.v6/internal/plumbing.(*RenameAnalysis).blobsAreClose(0xc0009e8790, 0xc004f24af0, 0xc005fa43c0, 0xc00ac16700, 0x0, 0x0)
c:/gopath/src/gopkg.in/src-d/hercules.v6/internal/plumbing/renames.go:418 +0xb9f
gopkg.in/src-d/hercules.v6/internal/plumbing.(*RenameAnalysis).Consume.func1(0x0, 0x0)
c:/gopath/src/gopkg.in/src-d/hercules.v6/internal/plumbing/renames.go:232 +0x41b
gopkg.in/src-d/hercules.v6/internal/plumbing.(*RenameAnalysis).Consume.func3(0xc038909360, 0xc0009e98d0)
c:/gopath/src/gopkg.in/src-d/hercules.v6/internal/plumbing/renames.go:314 +0x2e
created by gopkg.in/src-d/hercules.v6/internal/plumbing.(*RenameAnalysis).Consume
c:/gopath/src/gopkg.in/src-d/hercules.v6/internal/plumbing/renames.go:314 +0x1a7b

No data has been read - has Hercules crashed?

@vmarkovtsev
Copy link
Collaborator

Good, so now I need you to run

git show ecc236816c8bddf3523d39ec0f7650591c829fb6 | gzip > file1.gz
git show 7f06d8f55b010f2daf01d2b50747c2ba2ff11f8d | gzip > file2.gz

And send me those two files. My email can be taken from e.g. https://github.com/src-d/hercules/commit/b8fb564c3acd2da61027c9f909a22e33c9c1626b.patch

@Gr33nbl00d
Copy link
Author

i send you a link with the files direct sending of files did not work because of an email gateway error i got.

Florian

@vmarkovtsev
Copy link
Collaborator

I downloaded the files successfully, thanks. I will reproduce the problem this week and push the fix asap.

@Gr33nbl00d
Copy link
Author

Ok no Problem take your time :) I am glad i could help and looking forward for your fix :)

vmarkovtsev added a commit to vmarkovtsev/hercules that referenced this issue Jan 23, 2019
Fixes src-d#163

Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
vmarkovtsev added a commit to vmarkovtsev/hercules that referenced this issue Jan 23, 2019
Fixes src-d#163

Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
vmarkovtsev added a commit to vmarkovtsev/hercules that referenced this issue Jan 23, 2019
Fixes src-d#163

Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
vmarkovtsev added a commit to vmarkovtsev/hercules that referenced this issue Jan 23, 2019
Fixes src-d#163

Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
vmarkovtsev added a commit to vmarkovtsev/hercules that referenced this issue Jan 23, 2019
Fixes src-d#163

Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
vmarkovtsev added a commit to vmarkovtsev/hercules that referenced this issue Jan 23, 2019
Fixes src-d#163

Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
vmarkovtsev added a commit to vmarkovtsev/hercules that referenced this issue Jan 23, 2019
Fixes src-d#163

Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
@vmarkovtsev
Copy link
Collaborator

vmarkovtsev commented Jan 23, 2019

@Gr33nbl00d Looks like I fixed the bug. I am publishing a new release later today.

@vmarkovtsev vmarkovtsev reopened this Jan 23, 2019
@vmarkovtsev
Copy link
Collaborator

Should be fixed in https://github.com/src-d/hercules/releases/tag/v7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants