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

chain: make sure to WaitForShutdown #964

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

yyforyongyu
Copy link
Collaborator

Simple fix - looks like we forgot to call WaitForShutdown and, add a nil bucket check which was found panic in one of lnd's itests.

Copy link
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes, LGTM 🎉

Comment on lines 250 to 252
if addrmgrNs == nil {
return fmt.Errorf("%w: empty waddrmgr bucket", ErrEmptyBucket)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm wondering how this can be nil if it is always created on DB construction via the create function. It's also used in many other places without first doing a nil check. So if we can determine why it can be nil here, then those would also need to be updated?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe the lnd itest panic reveals some info re the path taken here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good question - should have kept the logs back then. This was seen in postgres, that somehow there's a goroutine accessing this data during shutdown, yet I guess the data was already GCed at the moment. Now that you mention it I think we should just let it happen and then decide what was the cause there, removed.

Copy link
Collaborator

@ellemouton ellemouton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! 🤖

@guggero guggero merged commit b4ff607 into btcsuite:master Nov 13, 2024
3 checks passed
@yyforyongyu yyforyongyu deleted the fix-shutdown branch November 13, 2024 13:47
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 this pull request may close these issues.

3 participants