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

Zebra node may fail to connect to a komodod node #50

Closed
dimxy opened this issue Apr 9, 2023 · 0 comments
Closed

Zebra node may fail to connect to a komodod node #50

dimxy opened this issue Apr 9, 2023 · 0 comments

Comments

@dimxy
Copy link
Collaborator

dimxy commented Apr 9, 2023

How to reproduce:
this easer to observe on small testnet chain with only a zebra and komodod node. The komodod node is the listener and th zebra node has its address in the zebra config.
Start komodod node with the -debug=net param, then start a zebra node. Ensure the komodod node receive "getaddr" message and stop the zebra node with ctrl-C and start it again. You may need to do this several times. Eventually you will see that the zebra node started with no connection available.
There is an error if "info" level is enabled for zebra_network:
add_initial_peers: zebra_network::peer_set::initialize: an initial peer connection failed successes=0 errors=1 addr=127.0.0.1:17770 e=request timed out

The reason for this error is that komodod, if it has not reached the max connections of 16, regularly calls addrman.Select() to get the next address to try to connect. This Select() call may lock the addrman object for several minutes (!). So any "getaddr" request is put on lock and all the p2p message pump is stopped until the addrman is unlocked.
There is an issue about that in komodo: KomodoPlatform/komodo#423.

@dimxy dimxy closed this as completed Jul 4, 2023
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

No branches or pull requests

1 participant