60s timeouts during IBD #9314

issue rebroad openend this issue on December 10, 2016
  1. rebroad commented at 6:56 am on December 10, 2016: contributor

    During IBD when many blocks are being UpdateTip()ed it can be very common for many new connections to be made but most of them timeout due to no messages being sent or received during the first 60 seconds. This was made worse recently by 902768099cb92b39f5ff509cd91fdd8970759b8a as now the version message is now sent from the messaging processing thread (and no longer the network connection thread) so the timeouts can occur from the remove peer also.

    Possible fixes are 1) to ensure the version message is sent upon connection from the network handling thread instead of the message processing thread which freezes during UpdateTip(), and 2) to change the disconnection logic for the 60s timeout so that it uses a timestamp set within the message processing thread (rather than a timestamp set possibly more than 60 seconds before it even gets a chance to process any messages).

  2. laanwj added the label P2P on Dec 10, 2016
  3. theuni commented at 6:21 am on December 12, 2016: member

    This is known and will be fixed with the upcoming async changes.

    https://github.com/bitcoin/bitcoin/commit/902768099cb92b39f5ff509cd91fdd8970759b8a didn’t change the sending thread for version, it should still (unfortunately) sent on the sockethander thread, since the optimistic send should always succeed.

  4. fanquake closed this on Oct 7, 2017

  5. DrahtBot locked this on Sep 8, 2021


rebroad theuni

Labels
P2P


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-06-03 09:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me