Number of DNS requests seem excessive
System information
Erigon version: erigon version 2022.99.99-dev-18f9313c
OS & Version: ubuntu 22.04 lxc
Commit hash : 18f9313c
erigon --torrent.maxpeers=10 --discovery.dns="" --datadir=/data --chain=goerli --prune=hrtc
I apologize if it's not a proper issue/bug.
I've recently brought up a goerli node, and noticed that my DNS server is getting a lot of request. Around 3000 per 10 minutes. And they're all properly resolved, as far as I can see.
Seems excessive? Is it normal?
tracker.openbittorrent.com | 101168 |
open.tracker.cl | 77071 |
tracker.opentrackr.org | 74281 |
9.rarbg.com
This issue is stale because it has been open for 40 days with no activity. Remove stale label or comment, or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
Need re-check if it’s still true or not
Hey @AskAlexSharov, I've just tried a resync from scratch - the calls are still made even after sync is complete Tested on v2.38.1
Linked issues:
- https://github.com/ledgerwatch/erigon/issues/6876
- https://github.com/anacrolix/torrent/issues/817
This issue is stale because it has been open for 40 days with no activity. Remove stale label or comment, or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
i have the same problem. #9330
@joshieDo , @mondsen , @revitteth , @antbelcastro , @luncht1me , @victorelec14 are you interested in testing a fix for this? it is available on a branch pr/5145_rel based on erigon stable v2.60.1 , try with :
git fetch
git checkout pr/5145_rel
make erigon
Fixed. Will be a part of the next 2.6x release.
I'm still experiencing this issue even with PR #10739 on my Linux box. Namely, DNS resolution doesn't work across the OS (e.g. in the browser) when Erigon's snapshot downloader is active.
@yperbasis how do you test? run the command above (--torrent.maxpeers=10 --discovery.dns="" --datadir=/data --chain=goerli --prune=hrtc) and then open a web browser? what's the error there? what happens if you run dig <name> or host <name> in the command line?
I have a feeling (no concrete repro yet) that I may be suffering from this issue sometimes as well.
today it happened again: I was running Erigon main on my macbook, normal sync, suddenly DNS resolution stopped working, my browser can't open any website. After some time it got back to normal, unfortunately it happened just as I was going to try a dig command. I assume something is making my router go crazy, hence DNS resolution being temporarily blocked/failing.
will post here if I get more concrete evidence, but just letting you know.
@yperbasis @wmitsuda please help with reproduction by doing this in GoLand:
-
set an env var:
GODEBUG=netdns=2- it will log all DNS requests (in configuration settings - Environment, use name:GODEBUG, value:netdns=2) -
set a breakpoint in : /usr/local/go/src/net/lookup.go - Resolver.lookupIPAddr (could be found by Navigate - Search everywhere - symbols - paste
lookupIPAddr) -
in the breakpoint options (right click a breakpoint - press "More") set:
- Suspend execution = OFF
- Log: stack trace = ON
-
try to reproduce, and send the log here
I realized that my case may be related to the use of Cloudflare WARP on desktop, but not sure. maybe Erigon is making WARP go crazy. Will keep testing it.
@battlmonstr I use vscode, not sure if breakpoint logging is support there, but I'll find some way.