The sync is based on bytesrecv_per_msg["verack"]. However, the bytes are counted before processing the message, so they are not sufficient to ensure the connection is fully up.
test: Fix intermittent timeout in p2p_permissions.py #26854
pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2301-test-timeout-p2p-perm-💙 changing 1 files +4 −0-
maflcko commented at 1:44 PM on January 9, 2023: member
- maflcko force-pushed on Jan 9, 2023
-
DrahtBot commented at 1:44 PM on January 9, 2023: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers ACK mzumsande, aureleoules If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
- DrahtBot added the label Tests on Jan 9, 2023
-
mzumsande commented at 7:20 PM on January 9, 2023: contributor
This runs into other timeouts (
p2p_node_network_limited.py, see CI) although the test passes for me locally. -
test: Fix intermittent timeout in p2p_permissions.py fa1bf4e705
- maflcko force-pushed on Jan 11, 2023
-
maflcko commented at 2:21 PM on January 11, 2023: member
Thanks. Fixed by replacing
==with>=. (There can only be oneverackmsg, but there can be multiplepongmsgs per connection) -
maflcko commented at 5:04 PM on January 11, 2023: member
Seems likely, but not sure if this is possible to tell without having Cirrus CI upload the full datadir + test log of the failure
-
mzumsande commented at 8:36 PM on January 11, 2023: contributor
ACK fa1bf4e7052e617dd0e5c8c54969d84314af9577
This makes the test code dependent on their being a ping right after connection setup (which is the case today because
m_ping_start=0usinitially, but one could imagine other ways of initialization.Another possibility might be to expose
fSuccessfullyConnectedvia RPC (e.g. ingetpeerinfo) and use that, but I'm not sure if that is better if that field is not really interesting to user and just used by tests. -
maflcko commented at 10:16 PM on January 11, 2023: member
(which is the case today because m_ping_start=0us initially, but one could imagine other ways of initialization.
In the unlikely case that this is changed, it should be possible to just call the
pingRPC at the right time to achieve the same. - aureleoules approved
-
aureleoules commented at 11:44 AM on January 12, 2023: member
ACK fa1bf4e7052e617dd0e5c8c54969d84314af9577
I verified I could reproduce the failure on master with
rrbut not on this branch. - maflcko merged this on Jan 12, 2023
- maflcko closed this on Jan 12, 2023
- maflcko deleted the branch on Jan 12, 2023
- sidhujag referenced this in commit cb433cfd2d on Jan 12, 2023
- bitcoin locked this on Jan 12, 2024