-
Notifications
You must be signed in to change notification settings - Fork 17
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
bug: sync stuck due to networking error #240
Comments
Thanks for opening an issue @hunjixin. I will take a closer look and report you back asap. |
there are about 70 peers when session created in mocha testnet. you can add log to confirm that hasPeer channel was drained. |
any progress? |
Hey @hunjixin. I'm working on a proposal. The PR will be opened soon. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
reproduce on mocha network
the sync goroutine is stucking
![image](https://private-user-images.githubusercontent.com/41407352/401417195-01a6bc09-be6d-4d4f-9551-ee4f33fd2c5e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5ODExMDcsIm5iZiI6MTczODk4MDgwNywicGF0aCI6Ii80MTQwNzM1Mi80MDE0MTcxOTUtMDFhNmJjMDktYmU2ZC00ZDRmLTk1NTEtZWU0ZjMzZmQyYzVlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDAyMTMyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUwY2RjYzI0YmUxMTMyOTg1NGU3MjI4YjMzNWNmZjk5OWRiMTZkZTEwMDlhNTJjOGFlZTExOTBjNjZiZjg3M2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.SaH57LA6gcZJcCjljUOeqtif2sDGqYWkiYpszeZyNEQ)
if network is down, the peers in peerQuene will always be in a decreasing state due to errors that not a ErrNotFound one(network connect fail etc). and eventually run out of the havePeer channel. in this time GetRangeByHeight alway wait for hasPeer channel while getRangeByHeight wait for the result channel
a candidate fix is push back the peer state for errEmptyResponse error. #238
but another fix is to add timeout for
GetRangeByHeight
The text was updated successfully, but these errors were encountered: