Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Jan 9, 2023

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.

@maflcko maflcko force-pushed the 2301-test-timeout-p2p-perm- branch from 33dc224 to fa3a90d Compare January 9, 2023 13:44
@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 9, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

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 DrahtBot added the Tests label Jan 9, 2023
@fanquake fanquake linked an issue Jan 9, 2023 that may be closed by this pull request
Copy link
Contributor

@mzumsande mzumsande left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This runs into other timeouts (p2p_node_network_limited.py, see CI) although the test passes for me locally.

@maflcko maflcko force-pushed the 2301-test-timeout-p2p-perm- branch from fa3a90d to fa1bf4e Compare January 11, 2023 14:20
@maflcko
Copy link
Member Author

maflcko commented Jan 11, 2023

Thanks. Fixed by replacing == with >=. (There can only be one verack msg, but there can be multiple pong msgs per connection)

@mzumsande
Copy link
Contributor

mzumsande commented Jan 11, 2023

Is this also a fix for the mempool timeouts in #26440?

@maflcko
Copy link
Member Author

maflcko commented Jan 11, 2023

Seems likely, but not sure if this is possible to tell without having Cirrus CI upload the full datadir + test log of the failure

Copy link
Contributor

@mzumsande mzumsande left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa1bf4e

This makes the test code dependent on their being a ping right after connection setup (which is the case today because m_ping_start=0us initially, but one could imagine other ways of initialization.

Another possibility might be to expose fSuccessfullyConnected via RPC (e.g. in getpeerinfo) 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
Copy link
Member Author

maflcko commented Jan 11, 2023

(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 ping RPC at the right time to achieve the same.

Copy link
Contributor

@aureleoules aureleoules left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa1bf4e

I verified I could reproduce the failure on master with rr but not on this branch.

@maflcko maflcko merged commit edc3d1b into bitcoin:master Jan 12, 2023
@maflcko maflcko deleted the 2301-test-timeout-p2p-perm-💙 branch January 12, 2023 12:00
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jan 12, 2023
@bitcoin bitcoin locked and limited conversation to collaborators Jan 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

p2p_permissions intermittent timeout
4 participants