Fwd: Increasing resolver timeout

Alberto Salvia Novella es20490446e@gmail.com
Fri Nov 8 17:20:00 GMT 2019


For example we have the following bug:

$ time ping -c1 "google.com""
0% packet loss
0m5,064s

$ time (ip=$(getent ahostsv4 "google.es" | awk '{ print $1 }' |
head -n1); ping -c1 "${ip}")
0% packet loss
0m0,042s

The extra time on the first case it's caused by a router mistakenly not 
returning the IPv6 DNS reply, so the command just sits till it timeouts.

The point is this, the bug has been there for a long time unnoticed 
simply because with 5s timeout the delay simply felt within normal. It 
wasn't till I started programing server stuff where I noticed that 
retrieving the data just took so long.

So probably we would be better having a longer timeout, like about 10s. 
So if there is any network anomaly it would be obvious to any person 
operating it.

Alberto <https://es20490446e.wordpress.com>



More information about the Libc-alpha mailing list