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

fix: potential null pointer error #11546

Closed
wants to merge 1 commit into from
Closed

Conversation

60ke
Copy link

@60ke 60ke commented Dec 21, 2023

if cs.heaviest is nil cause panic ,when call chain/stmgr/execute.go:TipSetState -> tryLookupTipsetState -> GetTipsetByHeight

if  cs.heaviest is nil cause panic  ,when call chain/stmgr/execute.go:TipSetState -> tryLookupTipsetState -> GetTipsetByHeight
@60ke 60ke requested a review from a team as a code owner December 21, 2023 07:59
@magik6k
Copy link
Contributor

magik6k commented Jan 8, 2024

How are you able to get chainstore into a state where the heaviest tipset is nil? it's loaded on startup, so it should be impossible for it to be nil.

@magik6k magik6k added the need/author-input Hint: Needs Author Input label Jan 8, 2024
@Stebalien
Copy link
Member

How are you able to get chainstore into a state where the heaviest tipset is nil? it's loaded on startup, so it should be impossible for it to be nil.

It's possible in very special cases at startup. I can't remember how, exactly. But I've seen it happen.

Copy link

Thank you for submitting the PR and contributing to lotus! Lotus maintainers need more of your input before merging it, please address the suggested changes or reply to the comments or this PR will be closed in 48 hours. You are always more than welcome to reopen the PR later as well!

Copy link

This PR was closed because it is missing author input. Please feel free to reopen the PR when you get to it! Thank you for your interest in contributing to lotus!

@github-actions github-actions bot closed this Jan 18, 2024
@60ke
Copy link
Author

60ke commented Apr 28, 2024

How are you able to get chainstore into a state where the heaviest tipset is nil? it's loaded on startup, so it should be impossible for it to be nil.

It does not appear in lotus;But my project relies on some api of lotus,It appeared when I called it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/stale need/author-input Hint: Needs Author Input
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants