erigon icon indicating copy to clipboard operation
erigon copied to clipboard

Number of DNS requests seem excessive

Open joshieDo opened this issue 3 years ago • 15 comments

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

joshieDo avatar Aug 22 '22 20:08 joshieDo

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.

github-actions[bot] avatar Oct 02 '22 04:10 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Oct 10 '22 04:10 github-actions[bot]

Need re-check if it’s still true or not

AskAlexSharov avatar Feb 15 '23 02:02 AskAlexSharov

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

antbelcastro avatar Feb 19 '23 21:02 antbelcastro

Linked issues:

  • https://github.com/ledgerwatch/erigon/issues/6876
  • https://github.com/anacrolix/torrent/issues/817

revitteth avatar Feb 23 '23 16:02 revitteth

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.

github-actions[bot] avatar Apr 07 '23 02:04 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Apr 14 '23 02:04 github-actions[bot]

i have the same problem. #9330

victorelec14 avatar Jan 27 '24 20:01 victorelec14

@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

battlmonstr avatar Jun 10 '24 14:06 battlmonstr

Fixed. Will be a part of the next 2.6x release.

battlmonstr avatar Jun 14 '24 06:06 battlmonstr

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 avatar Jun 21 '24 09:06 yperbasis

@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?

battlmonstr avatar Jun 21 '24 12:06 battlmonstr

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.

wmitsuda avatar Jun 25 '24 19:06 wmitsuda

@yperbasis @wmitsuda please help with reproduction by doing this in GoLand:

  1. set an env var: GODEBUG=netdns=2 - it will log all DNS requests (in configuration settings - Environment, use name: GODEBUG, value: netdns=2)

  2. set a breakpoint in : /usr/local/go/src/net/lookup.go - Resolver.lookupIPAddr (could be found by Navigate - Search everywhere - symbols - paste lookupIPAddr)

  3. in the breakpoint options (right click a breakpoint - press "More") set:

    • Suspend execution = OFF
    • Log: stack trace = ON
  4. try to reproduce, and send the log here

battlmonstr avatar Jun 26 '24 07:06 battlmonstr

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.

wmitsuda avatar Jun 26 '24 19:06 wmitsuda