-
Notifications
You must be signed in to change notification settings - Fork 12
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
server: wait for comet node shutdown #444
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is r4r, but the shutdown corruption revealed in cometbft is fixed in cometbft/cometbft#1879, which we'd definitely want paired with this if and before it ends up on a release branch. |
jchappelow
force-pushed
the
comet-shutdown-wait
branch
from
January 2, 2024 15:17
4bfbecf
to
450e9e3
Compare
cometbft/cometbft#1879 was merged and backported to v0.38.x. |
jchappelow
commented
Jan 8, 2024
To test:
|
cometbft's service Start() methods do not block while running, so we the errgroup.Go for this was returning almost right away. This meant that errgroup.Wait() did not wait for shutdown to complete. The effect was frequent errors from cometbft arising from one of our databases / key stores being shutdown too soon. This is now resolved and the dependencies `closers` aren't closed until the node is actually stopped. However, there is still an internal cometbft bug during block sync (before the nodes switches to consensus mode) because of an unsupervised goroutine, `blocksync.(*Reactor).poolRoutine`. I fixed this bug in blocksync/reactor.go and the errors go away. We may need to PR cometbft to get clean shutdown during block sync.
jchappelow
force-pushed
the
comet-shutdown-wait
branch
from
January 8, 2024 16:49
688cac7
to
077b80e
Compare
brennanjl
approved these changes
Jan 8, 2024
brennanjl
pushed a commit
that referenced
this pull request
Feb 26, 2024
* server: wait for comet node shutdown cometbft's service Start() methods do not block while running, so we the errgroup.Go for this was returning almost right away. This meant that errgroup.Wait() did not wait for shutdown to complete. The effect was frequent errors from cometbft arising from one of our databases / key stores being shutdown too soon. This is now resolved and the dependencies `closers` aren't closed until the node is actually stopped. However, there is still an internal cometbft bug during block sync (before the nodes switches to consensus mode) because of an unsupervised goroutine, `blocksync.(*Reactor).poolRoutine`. I fixed this bug in blocksync/reactor.go and the errors go away. We may need to PR cometbft to get clean shutdown during block sync. * deps: update cometbft to v0.38.x HEAD
brennanjl
pushed a commit
that referenced
this pull request
Feb 26, 2024
* server: wait for comet node shutdown cometbft's service Start() methods do not block while running, so we the errgroup.Go for this was returning almost right away. This meant that errgroup.Wait() did not wait for shutdown to complete. The effect was frequent errors from cometbft arising from one of our databases / key stores being shutdown too soon. This is now resolved and the dependencies `closers` aren't closed until the node is actually stopped. However, there is still an internal cometbft bug during block sync (before the nodes switches to consensus mode) because of an unsupervised goroutine, `blocksync.(*Reactor).poolRoutine`. I fixed this bug in blocksync/reactor.go and the errors go away. We may need to PR cometbft to get clean shutdown during block sync. * deps: update cometbft to v0.38.x HEAD
jchappelow
added a commit
that referenced
this pull request
Feb 26, 2024
* server: wait for comet node shutdown cometbft's service Start() methods do not block while running, so we the errgroup.Go for this was returning almost right away. This meant that errgroup.Wait() did not wait for shutdown to complete. The effect was frequent errors from cometbft arising from one of our databases / key stores being shutdown too soon. This is now resolved and the dependencies `closers` aren't closed until the node is actually stopped. However, there is still an internal cometbft bug during block sync (before the nodes switches to consensus mode) because of an unsupervised goroutine, `blocksync.(*Reactor).poolRoutine`. I fixed this bug in blocksync/reactor.go and the errors go away. We may need to PR cometbft to get clean shutdown during block sync. * deps: update cometbft to v0.38.x HEAD
brennanjl
pushed a commit
that referenced
this pull request
Feb 26, 2024
* server: wait for comet node shutdown cometbft's service Start() methods do not block while running, so we the errgroup.Go for this was returning almost right away. This meant that errgroup.Wait() did not wait for shutdown to complete. The effect was frequent errors from cometbft arising from one of our databases / key stores being shutdown too soon. This is now resolved and the dependencies `closers` aren't closed until the node is actually stopped. However, there is still an internal cometbft bug during block sync (before the nodes switches to consensus mode) because of an unsupervised goroutine, `blocksync.(*Reactor).poolRoutine`. I fixed this bug in blocksync/reactor.go and the errors go away. We may need to PR cometbft to get clean shutdown during block sync. * deps: update cometbft to v0.38.x HEAD
brennanjl
pushed a commit
that referenced
this pull request
Feb 26, 2024
* server: wait for comet node shutdown cometbft's service Start() methods do not block while running, so we the errgroup.Go for this was returning almost right away. This meant that errgroup.Wait() did not wait for shutdown to complete. The effect was frequent errors from cometbft arising from one of our databases / key stores being shutdown too soon. This is now resolved and the dependencies `closers` aren't closed until the node is actually stopped. However, there is still an internal cometbft bug during block sync (before the nodes switches to consensus mode) because of an unsupervised goroutine, `blocksync.(*Reactor).poolRoutine`. I fixed this bug in blocksync/reactor.go and the errors go away. We may need to PR cometbft to get clean shutdown during block sync. * deps: update cometbft to v0.38.x HEAD
brennanjl
pushed a commit
that referenced
this pull request
Feb 26, 2024
* server: wait for comet node shutdown cometbft's service Start() methods do not block while running, so we the errgroup.Go for this was returning almost right away. This meant that errgroup.Wait() did not wait for shutdown to complete. The effect was frequent errors from cometbft arising from one of our databases / key stores being shutdown too soon. This is now resolved and the dependencies `closers` aren't closed until the node is actually stopped. However, there is still an internal cometbft bug during block sync (before the nodes switches to consensus mode) because of an unsupervised goroutine, `blocksync.(*Reactor).poolRoutine`. I fixed this bug in blocksync/reactor.go and the errors go away. We may need to PR cometbft to get clean shutdown during block sync. * deps: update cometbft to v0.38.x HEAD
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cometbft's service
Start()
methods do not block while running, so we theerrgroup.Go
for this was returning almost right away. This meant thaterrgroup.Wait()
did not wait for shutdown to complete. The effect was frequent errors from cometbft arising from one of our databases / key stores being shutdown too soon.This is now resolved and the dependencies
closers
aren't closed until the node is actually stopped.However, there is still an internal cometbft bug during block sync (before the nodes switches to consensus mode) because of an unsupervised goroutine,
blocksync.(*Reactor).poolRoutine
. I fixed this bug in blocksync/reactor.go (their code) and the errors go away. We may need to PR cometbft to get clean shutdown during block sync.