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

logs: spamming of "SPV: Peering attempt failed" #2433

Open
norwnd opened this issue Oct 11, 2024 · 4 comments · May be fixed by #2442
Open

logs: spamming of "SPV: Peering attempt failed" #2433

norwnd opened this issue Oct 11, 2024 · 4 comments · May be fixed by #2442

Comments

@norwnd
Copy link

norwnd commented Oct 11, 2024

I was looking into decred/dcrdex#3000 - looking into dcrwallet neutrino logs I've noticed there is a lot of lines similar to this one being logged (here is a .gz snapshot neutrino saves as an example):

2024-10-11 11:49:44.308 [WRN] SPV: Peering attempt failed: localpeer.ConnectOutbound([2a01:4f9:c012:ceaf::1]:9108): dial tcp [2a01:4f9:c012:ceaf::1]:9108: connect: no route to host
2024-10-11 11:49:44.309 [WRN] SPV: Peering attempt failed: localpeer.ConnectOutbound(51.79.173.96:9108): dial tcp 51.79.173.96:9108: connect: network is unreachable

Couple of points on this:

  • at the very least, logging that statement that often is leading to "useful" logs being rotated out (plus it's unnecessary resources waste, might even contribute to high CPU usage (on Mac) after network disconnect dcrdex#3017)
  • but also can potentially signal some deeper underlying issue with how networking is handled

To reproduce: I was running dexc, shut my laptop lid + disconnecting internet cable, re-opened it several hours later + reconnected internet cable (and ended up observing decred/dcrdex#3000 + this spam in dcrwallet logs) just plug off internet cable for several minutes and watch logs grow.

@jrick
Copy link
Member

jrick commented Oct 15, 2024

This isn't really a log spam problem as it is a connection logic problem.

You have no routes to reach these peers, so all connection attempts immediately fail while the wallet is trying to achieve 8 outbound peers.

(also, we don't use neutrino)

@norwnd
Copy link
Author

norwnd commented Oct 15, 2024

(also, we don't use neutrino)

Is this dex-specific then ? In that case probably want to move this issue to https://github.com/decred/dcrdex/issues

@jrick
Copy link
Member

jrick commented Oct 15, 2024

dcrwallet has its own spv implementation. it doesn't have any special name or branding or anything. neutrino is the name of a different implementation used by btcwallet (but afaik, they are broadly similar in terms of how they work and the filters that they use).

@norwnd
Copy link
Author

norwnd commented Oct 15, 2024

Well, the log files written by Bison Wallet are called neutrino... so I'm just calling those as they are,

the connection attempts that result in these logs still happen somewhere in dcrwallet codebase right ? To my understanding, there should be a delay between retries:

  • to not write so many logs
  • to not overwhelm peers with requests (if that can be a problem)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants