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

client: Fix unclean shutdown scenario where SIGINT may come before client fully started #2677

Merged
merged 1 commit into from
May 4, 2023

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented May 4, 2023

It may take client a little while to fully start and bootstrap its services (especially if there are pending blocks to be executed). If SIGINT/CTRL + C comes before that, client may end up in an unclean shutdown

image

This PR hooks up shutdown handler as soon as client is started, and also makes sure client is properly started before initiating a clean shutdown:

image

PS: Build on top of client memory optimizations PR and is pointing to that branch

So pls rebase and merge afterwards 2675 is merged and with the base branch of this PR updated to develop-v7

Base automatically changed from client-memory-optimizations to develop-v7 May 4, 2023 06:52
@codecov
Copy link

codecov bot commented May 4, 2023

Codecov Report

❗ No coverage uploaded for pull request base (develop-v7@9b85ff1). Click here to learn what that means.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 90.30% <0.00%> (?)
blockchain 90.45% <0.00%> (?)
client 86.88% <0.00%> (?)
common 95.76% <0.00%> (?)
devp2p 91.89% <0.00%> (?)
ethash ∅ <0.00%> (?)
evm 79.35% <0.00%> (?)
statemanager 88.53% <0.00%> (?)
trie 89.68% <0.00%> (?)
tx 95.50% <0.00%> (?)
util 81.34% <0.00%> (?)
vm 84.39% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

@holgerd77
Copy link
Member

Have admin merged 2675, thought this would ease the process, PR here is still off with commits though, might need an update.

@g11tech
Copy link
Contributor Author

g11tech commented May 4, 2023

Have admin merged 2675, thought this would ease the process, PR here is still off with commits though, might need an update.

yea noticed 🙂 , updated

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

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

Great structural approvement! 🎉

Will approve and merge.

@holgerd77 holgerd77 merged commit e4075b5 into develop-v7 May 4, 2023
@holgerd77 holgerd77 deleted the fix-unclean-shutdown branch May 4, 2023 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants