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

Off-by-one in SME #57

Closed
jlowellwofford opened this issue Feb 10, 2019 · 0 comments · Fixed by #58
Closed

Off-by-one in SME #57

jlowellwofford opened this issue Feb 10, 2019 · 0 comments · Fixed by #58

Comments

@jlowellwofford
Copy link
Contributor

When handling unexpected discoveries, there appears to be an off-by-one error in the SME that eventually tries to advance a chain that has no more mutations. Results in:

08:58:09.303:kraken:DEBUG:StateMutationEngine:123e4567-e89d-12d3-a456-425455440096 found a new path
panic: runtime error: index out of range

goroutine 24 [running]:
github.com/hpc/kraken/core.(*StateMutationEngine).advanceMutation(0xc0001c6000, 0xc0000c73e0, 0x24, 0xc000394b80)
	/home/vagrant/go/src/github.com/hpc/kraken/core/StateMutationEngine.go:730 +0x61a
github.com/hpc/kraken/core.(*StateMutationEngine).handleUnexpected(0xc0001c6000, 0xc0000c73e0, 0x24, 0xc0000c7405, 0x9, 0x9ee0e0, 0xc00041e6e8, 0x185)
	/home/vagrant/go/src/github.com/hpc/kraken/core/StateMutationEngine.go:818 +0xded
github.com/hpc/kraken/core.(*StateMutationEngine).updateMutation(0xc0001c6000, 0xc0000c73e0, 0x24, 0xc0000c7405, 0x9, 0xab7c60, 0xc00038f260, 0x99)
	/home/vagrant/go/src/github.com/hpc/kraken/core/StateMutationEngine.go:878 +0x1175
github.com/hpc/kraken/core.(*StateMutationEngine).handleEvent(0xc0001c6000, 0xb771a0, 0xc0001dca50)
	/home/vagrant/go/src/github.com/hpc/kraken/core/StateMutationEngine.go:971 +0x336
github.com/hpc/kraken/core.(*StateMutationEngine).Run(0xc0001c6000)
	/home/vagrant/go/src/github.com/hpc/kraken/core/StateMutationEngine.go:286 +0x6c8
created by github.com/hpc/kraken/core.(*Kraken).Run
	/home/vagrant/go/src/github.com/hpc/kraken/core/Kraken.go:198 +0x10a
got stream read error on mutation stream: rpc error: code = Unavailable desc = transport is closing
got stream read error on mutation stream: rpc error: code = Unavailable desc = transport is closing
got stream send error on logger stream: EOF
got stream send error on logger stream: EOF
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

Successfully merging a pull request may close this issue.

1 participant