Repository navigation
test: fix intermittent failure in p2p_getaddr_caching.py - #28144
Merged
Merged
Conversation
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
1 task done
mzumsande
force-pushed
the
202307_getaddr_caching_fix
branch
from
July 25, 2023 01:17
73c6d9d to
e4d3787
Compare
Member
|
Concept ACK, thank you for looking into it. |
vasild
approved these changes
Jul 25, 2023
vasild
left a comment
Contributor
There was a problem hiding this comment.
ACK e4d37875e6a440748623250d77ec3be523a1d34d
Today I learned something new: it is possible to have duplicate (srcaddr, srcport) for TCP connections if the destination is different. Thank you!
Only the combined addr:port of source and destination must be unique. If the destination is different, the same addr:port for the source may be used by the OS.
python p2p instances will automatically send a getaddr msg after connecting, the explicit message was a duplicate that was being ignored.
mzumsande
force-pushed
the
202307_getaddr_caching_fix
branch
from
July 25, 2023 14:47
e4d3787 to
8a20f76
Compare
Contributor
Author
vasild
approved these changes
Jul 25, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #28133
In the consistency check, it's not enough to check that our address/port is unique, only the combination of source and target must be unique. Otherwise, the OS may reuse ports for connections to different
-addrbind, which was happening in the failed runs.While at it, the second commit cleans up duplicate
getaddrmessages inp2p_getaddr_caching.pythat do nothing but generateIgnoring repeated "getaddr"log messages (and cleans up some whitespace the python linter complains about).