Skip to content

Conversation

@TheBlueMatt
Copy link
Contributor

Since #9229 we no longer can break out of a DNS lookup midway through, and have to wait for libc to time out. In most places we check for interrupt immediately before/after, so this is not a huge deal, except in the dnsseed lookup thread. In that thread, we loop over all dnsseeds and will have to wait for each to timeout. This appears to be the cause of the long wait in #10210.

Until upstream glibc fixes the issue (https://sourceware.org/bugzilla/show_bug.cgi?id=20874) with getaddrinfo_a or we move to libevent's DNS lookup library, the best we can do is insert more agressive checks between lookups, which we do here.

@TheBlueMatt
Copy link
Contributor Author

Should likely get backported for 0.14.2 (if we do one).

@theuni
Copy link
Member

theuni commented Apr 14, 2017

Hmm, I could've sworn we already did this.

drop the (), then utACK :)

@TheBlueMatt TheBlueMatt force-pushed the 2017-04-dnsseed-break branch from c52afd9 to b2c9254 Compare April 14, 2017 20:52
Copy link
Member

@theuni theuni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK b2c9254

@maflcko maflcko added this to the 0.14.2 milestone Apr 14, 2017
Copy link
Contributor

@gmaxwell gmaxwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK.

@maflcko maflcko added the P2P label Apr 15, 2017
@laanwj
Copy link
Member

laanwj commented Apr 17, 2017

utACK b2c9254

@sipa
Copy link
Member

sipa commented Apr 17, 2017

utACK b2c9254

@sipa sipa merged commit b2c9254 into bitcoin:master Apr 17, 2017
sipa added a commit that referenced this pull request Apr 17, 2017
b2c9254 Check interruptNet during dnsseed lookups (Matt Corallo)

Tree-SHA512: a76b5749b085d5571ac65a6925bb1c50fa1d02c02854d9126224dc2ec419eb9103f7c92bf9a0bbd39c7dee93a2266dc3973fb16b48e8daea057f45d452e2513c
@jonasschnelli jonasschnelli mentioned this pull request May 31, 2017
codablock pushed a commit to codablock/dash that referenced this pull request Jan 26, 2018
b2c9254 Check interruptNet during dnsseed lookups (Matt Corallo)

Tree-SHA512: a76b5749b085d5571ac65a6925bb1c50fa1d02c02854d9126224dc2ec419eb9103f7c92bf9a0bbd39c7dee93a2266dc3973fb16b48e8daea057f45d452e2513c
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
b2c9254 Check interruptNet during dnsseed lookups (Matt Corallo)

Tree-SHA512: a76b5749b085d5571ac65a6925bb1c50fa1d02c02854d9126224dc2ec419eb9103f7c92bf9a0bbd39c7dee93a2266dc3973fb16b48e8daea057f45d452e2513c
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 27, 2019
b2c9254 Check interruptNet during dnsseed lookups (Matt Corallo)

Tree-SHA512: a76b5749b085d5571ac65a6925bb1c50fa1d02c02854d9126224dc2ec419eb9103f7c92bf9a0bbd39c7dee93a2266dc3973fb16b48e8daea057f45d452e2513c
furszy added a commit to PIVX-Project/PIVX that referenced this pull request Jan 13, 2021
5c56a13 Check interruptNet during dnsseed lookups (Matt Corallo)

Pull request description:

  Coming straight from bitcoin#10215.
  As the description says there, this could be a cause of long waits at shutdown.

ACKs for top commit:
  random-zebra:
    utACK 5c56a13
  Fuzzbawls:
    utACK 5c56a13

Tree-SHA512: 072062bc890d51ded86f7cc252bd72989b09fd856a3f46ebeefcebd518ec5c694bb70b9a64fbb50bea777d26c9d53fa0c3ca299ad800d649aea0103f894e7a61
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants