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

[bug]: maxbackoff not respected #9294

Open
JssDWt opened this issue Nov 21, 2024 · 0 comments
Open

[bug]: maxbackoff not respected #9294

JssDWt opened this issue Nov 21, 2024 · 0 comments
Labels
bug Unintended code behaviour p2p Code related to the peer-to-peer behaviour P2 should be fixed if one has time

Comments

@JssDWt
Copy link
Contributor

JssDWt commented Nov 21, 2024

Background

maxbackoff is not respected by connections managed by btcd's connection manager. If you set maxbackoff=1s in the config, the initial schedule attempt will take into account the maxbackoff, but the reconnect requests will not. Example logs:

2024-11-21 13:20:59.373 [DBG] SRVR: Scheduling connection re-establishment to persistent peer 02fb6f53b5f7363e937bc86b1c99afebdcd52e239b6a632cca37caedad4866d850 in 1s
2024-11-21 13:21:00.374 [DBG] SRVR: Attempting to re-establish persistent connection to peer 02fb6f53b5f7363e937bc86b1c99afebdcd52e239b6a632cca37caedad4866d850
2024-11-21 13:21:00.374 [DBG] SRVR: Attempting persistent connection to channel peer 02fb6f53b5f7363e937bc86b1c99afebdcd52e239b6a632cca37caedad4866d850@127.0.0.1:35947
2024-11-21 13:21:00.374 [DBG] CMGR: Attempting to connect to 02fb6f53b5f7363e937bc86b1c99afebdcd52e239b6a632cca37caedad4866d850@127.0.0.1:35947 (reqid 1)
2024-11-21 13:21:00.375 [DBG] CMGR: Failed to connect to 02fb6f53b5f7363e937bc86b1c99afebdcd52e239b6a632cca37caedad4866d850@127.0.0.1:35947 (reqid 1): dial tcp 127.0.0.1:35947: connect: connection refused
2024-11-21 13:21:00.375 [DBG] CMGR: Retrying connection to 02fb6f53b5f7363e937bc86b1c99afebdcd52e239b6a632cca37caedad4866d850@127.0.0.1:35947 (reqid 1) in 5s
2024-11-21 13:21:05.375 [DBG] CMGR: Attempting to connect to 02fb6f53b5f7363e937bc86b1c99afebdcd52e239b6a632cca37caedad4866d850@127.0.0.1:35947 (reqid 1)
2024-11-21 13:21:05.376 [DBG] CMGR: Failed to connect to 02fb6f53b5f7363e937bc86b1c99afebdcd52e239b6a632cca37caedad4866d850@127.0.0.1:35947 (reqid 1): dial tcp 127.0.0.1:35947: connect: connection refused
2024-11-21 13:21:05.376 [DBG] CMGR: Retrying connection to 02fb6f53b5f7363e937bc86b1c99afebdcd52e239b6a632cca37caedad4866d850@127.0.0.1:35947 (reqid 1) in 10s

Your environment

  • version of lnd: 0.18.3
  • which operating system (uname -a on *Nix): any
  • version of btcd, bitcoind, or other backend: irrelevant
  • any other relevant environment details

Steps to reproduce

  • Connect two nodes with a channel. Node A and Node B. Set maxbackoff=1s to node A.
  • Stop node B

Expected behaviour

A should attempt reconnects every second (respecting maxbackoff)

Actual behaviour

A will attempt reconnects in growing intervals

@JssDWt JssDWt added bug Unintended code behaviour needs triage labels Nov 21, 2024
@saubyk saubyk added P2 should be fixed if one has time p2p Code related to the peer-to-peer behaviour and removed needs triage labels Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unintended code behaviour p2p Code related to the peer-to-peer behaviour P2 should be fixed if one has time
Projects
None yet
Development

No branches or pull requests

2 participants