-
Notifications
You must be signed in to change notification settings - Fork 20k
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
eth: fix potential hang in waitSnapExtension #28744
Conversation
The fix refers to this PR, but the blocking scenario is completely different from it |
I appreciate the clear description. The fix seems weird though, and could be improved to not use a timeout. How about we just add a |
@fjl Yes, your modification suggestion is more reasonable. I have updated it. Please review it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This should fix a rare hang in waitSnapExtension during shutdown.
When geth is shut down gracefully, the running eth protocol blocks in waitSnapExtension
Steps to reproduce:
runEthPeer
function. At this time, theincHandlers
function returns true, waits for snap extension, and blocks in thewaitSnapExtension
.runSnapExtension
function. At this time, theincHandlers
function returns false and will not enter theregisterSnapExtension
.runEthPeer
function has been blocked inwaitSnapExtension
, and the ETH handler cannot exit normally.