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

lotus chain sethead --epoch ---> panic: runtime error: index out of range [-1] #6125

Closed
Derek-zd opened this issue Apr 28, 2021 · 5 comments · Fixed by #6133
Closed

lotus chain sethead --epoch ---> panic: runtime error: index out of range [-1] #6125

Derek-zd opened this issue Apr 28, 2021 · 5 comments · Fixed by #6133
Assignees
Labels
kind/bug Kind: Bug

Comments

@Derek-zd
Copy link

Note: For security-related bugs/issues, please follow the security policy.

Describe the bug
A clear and concise description of what the bug is.
(If you are not sure what the bug is, try to figure it out via a discussion first!

Version (run lotus version):
1.8.0
To Reproduce
Steps to reproduce the behavior:

  1. Run ' lotus chain sethead --epoch 710309'

  2. See error
    lotus daemon Process crash

Expected behavior
A clear and concise description of what you expected to happen.

Logs
Provide daemon/miner/worker logs, and goroutines(if available) for troubleshooting.
panic: runtime error: index out of range [-1]

goroutine 842 [running]:
github.com/filecoin-project/lotus/blockstore/splitstore.(*SplitStore).HeadChange(0xc001b03600, 0xc07b912030, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
/root/workspace/diancun/lotus/blockstore/splitstore/splitstore.go:410 +0x1ac
github.com/filecoin-project/lotus/chain/store.(*ChainStore).reorgWorker.func1(0xc0001702d0, 0xc00105b800, 0xc068c0c780, 0x33f02c0, 0xc067e2fe40)
/root/workspace/diancun/lotus/chain/store/store.go:525 +0x695
created by github.com/filecoin-project/lotus/chain/store.(*ChainStore).reorgWorker
/root/workspace/diancun/lotus/chain/store/store.go:490 +0x118

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@Derek-zd
Copy link
Author

1.6.0 is also available.

@Derek-zd Derek-zd changed the title [BUG] lotus chain sethead --epoch ---> panic: runtime error: index out of range [-1] Apr 28, 2021
@jennijuju
Copy link
Member

@Derek-zd are you using splitstore?

@Derek-zd
Copy link
Author

yes

@jennijuju jennijuju added need/team-input Hint: Needs Team Input and removed hint/needs-triaging labels Apr 29, 2021
@jennijuju
Copy link
Member

@vyzo @raulk mind taking a look please?

@Derek-zd
Copy link
Author

image

@Stebalien Stebalien self-assigned this Apr 29, 2021
Stebalien added a commit that referenced this issue Apr 29, 2021
Calling, e.g., `lotus chain sethead` on an ancestor tipset won't apply
any new blocks, it'll just revert a bunch. This will lead to HeadChange
calls with no new blocks to apply.

fixes #6125
Stebalien added a commit that referenced this issue Apr 29, 2021
Calling, e.g., `lotus chain sethead` on an ancestor tipset won't apply
any new blocks, it'll just revert a bunch. This will lead to HeadChange
calls with no new blocks to apply.

fixes #6125
linguohua pushed a commit to linguohua/lotus that referenced this issue May 20, 2021
Calling, e.g., `lotus chain sethead` on an ancestor tipset won't apply
any new blocks, it'll just revert a bunch. This will lead to HeadChange
calls with no new blocks to apply.

fixes filecoin-project#6125
@TippyFlitsUK TippyFlitsUK removed the need/team-input Hint: Needs Team Input label Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Kind: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants